[Mac] clicking caption track glyph should dismiss menu
https://bugs.webkit.org/show_bug.cgi?id=117621

We now correctly capture all click events while the captions track menu
is showing, and ensure that no other control in the media player can be
activated as the track list gets dismissed by clicking anywhere but on
itself.

Reviewed by Eric Carlson.

* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::showClosedCaptionTrackList):
Make the controls panel non-interactive and track click events in the
capture phase also on the controls container itself such that we can
identify correctly whether a click in the <video> shadow tree is on
the track list or another element (the target could only be resolved
to a shadow tree node if the event is handled within the shadow tree).

(WebCore::MediaControlsApple::hideClosedCaptionTrackList):
Make the controls panel interactive again and remove the new click
event handler on the controls container.

(WebCore::MediaControlsApple::handleClickEvent):
Capture any click event that targets a node anywhere outside of the track
list container and its subtree and hide the track list in this condition.

(WebCore::MediaControlsAppleEventListener::handleEvent):
Call handleClickEvent() on the media controls when a click event is handled.

* html/shadow/MediaControlsApple.h:
New public handleClickEvent() API such that it can be called from
MediaControlsAppleEventListener::handleEvent().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening. Generate new baseline to some tests and bot greening.

Patch by Gabor Abraham <abrhm@inf.u-szeged.hu> on 2013-06-14

* platform/qt-5.0-wk2/TestExpectations:
* platform/qt-5.0-wk2/animations/3d/change-transform-in-end-event-expected.png: Added.
* platform/qt-5.0-wk2/fast/borders/border-left-right-same-bottom-different-color-expected.png: Added.
* platform/qt-5.0-wk2/fast/borders/border-radius-percent-expected.png: Added.
* platform/qt-5.0-wk2/fast/borders/border-radius-wide-border-05-expected.png: Added.
* platform/qt-5.0-wk2/fast/borders/border-radius-with-box-shadow-01-expected.png: Added.
* platform/qt-5.0-wk2/fast/borders/border-radius-with-box-shadow-expected.png: Added.
* platform/qt-5.0-wk2/fast/css-generated-content/details-summary-before-after-expected.png: Added.
* platform/qt-5.0-wk2/fast/css-generated-content/details-summary-before-after-expected.txt: Added.
* platform/qt-5.0-wk2/fast/forms/zoomed-controls-expected.png: Added.
* platform/qt-5.0-wk2/fast/gradients/unprefixed-color-stop-units-expected.png: Added.
* platform/qt-5.0-wk2/fast/gradients/unprefixed-generated-gradients-expected.png: Added.
* platform/qt-5.0-wk2/fast/gradients/unprefixed-linear-angle-gradients-expected.png: Added.
* platform/qt-5.0-wk2/fast/gradients/unprefixed-linear-right-angle-gradients-expected.png: Added.
* platform/qt-5.0-wk2/fast/gradients/unprefixed-list-item-gradient-expected.png: Added.
* platform/qt-5.0-wk2/fast/gradients/unprefixed-radial-gradients-expected.png: Added.
* platform/qt-5.0-wk2/fast/gradients/unprefixed-radial-gradients3-expected.png: Added.
* platform/qt-5.0-wk2/fast/gradients/unprefixed-repeating-end-fill-expected.png: Added.
* platform/qt-5.0-wk2/fast/gradients/unprefixed-repeating-linear-gradient-expected.png: Added.
* platform/qt-5.0-wk2/fast/gradients/unprefixed-repeating-radial-gradients-expected.png: Added.
* platform/qt-5.0-wk2/fast/gradients/unprefixed-zero-range-repeating-gradient-hang-expected.png: Added.
* platform/qt-5.0-wk2/svg/custom/marker-orient-auto-expected.png: Added.
* platform/qt-5.0-wk2/svg/custom/marker-orient-auto-expected.txt: Added.
* platform/qt-5.0-wk2/svg/filters/feDropShadow-zero-deviation-expected.png: Added.
* platform/qt-5.0-wk2/svg/filters/feDropShadow-zero-deviation-expected.txt: Added.
* platform/qt-5.0-wk2/svg/filters/feGaussianBlur-zero-deviation-expected.png: Added.
* platform/qt-5.0-wk2/svg/filters/feGaussianBlur-zero-deviation-expected.txt: Added.
* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Compilation problems - hb.h not found
https://bugs.webkit.org/show_bug.cgi?id=117636

Unreviewed GTK+ build fix.

Patch by Andres Gomez <agomez@igalia.com> on 2013-06-14

* GNUmakefile.am: Added freetype cflags for WebKit2 GTK+ Platform
library.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] LayerTiler fails to tile really big layers
https://bugs.webkit.org/show_bug.cgi?id=117211

Reviewed by Carlos Garcia Campos.

PR 273550

Source/WebCore:

The cause for this bug was that LayerTiler computed which tiles are
visible by exhaustively mapping every tile to normalized device
coordinates and checking if it intersected the viewport. If there was a
lot of tiles, it would get stuck in this loop, iterating over all
tiles, for a very long time. Also, the visibility information was
transferred to the WebKit thread using mutexes, which added unnecessary
mutex contention to the mix.

Fixed by doing the reverse calculation, unprojecting the visible part
of the layer to layer coordinate space to find which tiles are visible.
Instead of doing a traditional unprojection of point to line and see
where the line intersects the layer, this patch uses the w-coordinates
of triangle vertices to perform "perspective correct texturing" of the
intersection points in device space, which is equivalent to
unprojection since perspective correct texturing computes a 2D
coordinate in (normalized) layer coordinate space which is easily
scaled up to the layer bounds and get the visible region expressed in
layer coordinate space.

The visible area is approximated by a rectangle, and a set of tiles
needing render are added to the mix, and  we have a swappable data
structure so visbility can be transferred to WebKit thread without
mutexes, but instead using atomic swap.

No new tests, covered by existing tests.

* platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
(CanvasLayerCompositingThreadClient):
(WebCore::CanvasLayerCompositingThreadClient::drawTextures):
* platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
(WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
* platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.h:
(EGLImageLayerCompositingThreadClient):
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::drawTextures):
(WebCore::LayerCompositingThread::drawSurface):
* platform/graphics/blackberry/LayerCompositingThread.h:
(LayerCompositingThread):
* platform/graphics/blackberry/LayerCompositingThreadClient.h:
(WebCore):
(LayerCompositingThreadClient):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::compositeLayersRecursive):
* platform/graphics/blackberry/LayerTile.cpp:
(WebCore::LayerTile::LayerTile):
(WebCore::LayerTile::setContents):
(WebCore::LayerTile::updateContents):
(WebCore::LayerTile::discardContents):
* platform/graphics/blackberry/LayerTile.h:
(LayerTile):
(WebCore::LayerTile::contentsScale):
(WebCore::LayerTile::setContentsDirty):
* platform/graphics/blackberry/LayerTiler.cpp:
(LayerVisibility):
(WebCore::LayerVisibility::LayerVisibility):
(WebCore::LayerVisibility::visibleRect):
(WebCore::LayerVisibility::setVisibleRect):
(WebCore::LayerVisibility::needsRender):
(WebCore::LayerVisibility::tileNeedsRender):
(WebCore::LayerVisibility::willRenderTile):
(WebCore::LayerVisibility::swapTilesNeedingRender):
(WebCore::LayerVisibility::merge):
(WebCore):
(WebCore::LayerTiler::LayerTiler):
(WebCore::LayerTiler::~LayerTiler):
(WebCore::LayerTiler::updateTextureContentsIfNeeded):
(WebCore::LayerTiler::swapFrontVisibility):
(WebCore::LayerTiler::setFrontVisibility):
(WebCore::LayerTiler::layerVisibilityChanged):
(WebCore::LayerTiler::uploadTexturesIfNeeded):
(WebCore::LayerTiler::processTextureJob):
(WebCore::LayerTiler::addTileJob):
(WebCore::LayerTiler::performTileJob):
(WebCore::LayerTiler::drawTile):
(WebCore::inflateViewport):
(WebCore::LayerTiler::drawTextures):
(WebCore::LayerTiler::pruneTextures):
(WebCore::LayerTiler::rectForTile):
* platform/graphics/blackberry/LayerTiler.h:
(WebCore):
(LayerTiler):
(WebCore::LayerTiler::TextureJob::TextureJob):
(WebCore::LayerTiler::takeFrontVisibility):
* platform/graphics/blackberry/LayerUtilities.h:
(WebCore):
(WebCore::det):
(WebCore::dot):
(LayerClipEdge):
(WebCore::LayerClipEdge::LayerClipEdge):
(WebCore::LayerClipEdge::isPointInside):
(WebCore::LayerClipEdge::computeIntersection):
(WebCore::intersectPolygonWithRect):
(WebCore::computeBarycentricCoordinates):
(WebCore::manhattanDistanceToViewport):
(UnprojectionVertex):
(WebCore::compareManhattanDistanceToViewport):
(WebCore::unproject):

Source/WebKit/blackberry:

Adapt to changes in LayerCompositingThreadClient interface.

* Api/WebOverlay.cpp:
(BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::drawTextures):
* Api/WebOverlay_p.h:
(WebOverlayLayerCompositingThreadClient):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151595 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Dropdown button UX updates.
https://bugs.webkit.org/show_bug.cgi?id=117642.

Patch by Tiancheng Jiang <tijiang@rim.com> on 2013-06-14
Reviewed by Rob Buis.

JIRA 388652
Internally Reviewed by Jeff Rogers.

Change arrow assert.

* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintMenuList):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151596 268f45cc-cd09-0410-ab3c-d52691b4dbfc