[Qt] Unreviewed gardening. Some more rebaselining after r151205 and r150798.

* platform/qt-5.0-wk2/css2.1/20110323/absolute-replaced-height-004-expected.png: Added.
* platform/qt-5.0-wk2/css2.1/20110323/absolute-replaced-height-022-expected.png: Added.
* platform/qt-5.0-wk2/css2.1/t0805-c5518-brdr-t-01-e-expected.png: Added.
* platform/qt-5.0-wk2/css2.1/t170602-bdr-conflct-w-09-d-expected.png: Added.
* platform/qt-5.0-wk2/css3/selectors3/html/css3-modsel-70-expected.png: Added.
* platform/qt-5.0-wk2/css3/selectors3/xhtml/css3-modsel-131b-expected.png: Added.
* platform/qt-5.0-wk2/css3/unicode-bidi-isolate-basic-expected.png:
* platform/qt-5.0-wk2/editing/deleting/delete-image-002-expected.png:
* platform/qt-5.0-wk2/editing/deleting/smart-delete-004-expected.png:
* platform/qt-5.0-wk2/editing/selection/caret-rtl-2-expected.png:
* platform/qt-5.0-wk2/editing/selection/caret-rtl-2-left-expected.png:
* platform/qt-5.0-wk2/editing/selection/caret-rtl-expected.png:
* platform/qt-5.0-wk2/editing/selection/caret-rtl-right-expected.png: Added.
* platform/qt-5.0-wk2/editing/selection/extend-selection-bidi-expected.png:
* platform/qt-5.0-wk2/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.png:
* platform/qt-5.0-wk2/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.png:
* platform/qt-5.0-wk2/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.png:
* platform/qt-5.0-wk2/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.png:
* platform/qt-5.0-wk2/fast/block/positioning/auto/vertical-rl/001-expected.png: Added.
* platform/qt-5.0-wk2/fast/borders/rtl-border-05-expected.png:
* platform/qt-5.0-wk2/fast/box-shadow/box-shadow-transformed-expected.png:
* platform/qt-5.0-wk2/fast/css/error-in-last-decl-expected.png: Added.
* platform/qt-5.0-wk2/fast/css/font-size-negative-expected.png: Added.
* platform/qt-5.0-wk2/fast/css/namespaces/004-expected.png: Added.
* platform/qt-5.0-wk2/fast/css/table-text-align-strict-expected.png: Added.
* platform/qt-5.0-wk2/fast/dom/34176-expected.png:
* platform/qt-5.0-wk2/fast/dom/inner-text-expected.png: Added.
* platform/qt-5.0-wk2/fast/forms/HTMLOptionElement_label06-expected.png:
* platform/qt-5.0-wk2/fast/forms/HTMLOptionElement_label07-expected.png:
* platform/qt-5.0-wk2/fast/forms/button-cannot-be-nested-expected.png: Added.
* platform/qt-5.0-wk2/fast/forms/form-element-geometry-expected.png:
* platform/qt-5.0-wk2/fast/forms/input-appearance-default-bkcolor-expected.png: Added.
* platform/qt-5.0-wk2/fast/forms/listbox-bidi-align-expected.png:
* platform/qt-5.0-wk2/fast/forms/search-rtl-expected.png:
* platform/qt-5.0-wk2/fast/forms/select-baseline-expected.png:
* platform/qt-5.0-wk2/fast/inline/inline-box-background-expected.png:
* platform/qt-5.0-wk2/fast/inline/inline-box-background-long-image-expected.png:
* platform/qt-5.0-wk2/fast/inline/inline-box-background-repeat-x-expected.png:
* platform/qt-5.0-wk2/fast/inline/inline-box-background-repeat-y-expected.png:
* platform/qt-5.0-wk2/fast/invalid/014-expected.png: Added.
* platform/qt-5.0-wk2/fast/overflow/childFocusRingClip-expected.png: Added.
* platform/qt-5.0-wk2/fast/overflow/hit-test-overflow-controls-expected.png: Added.
* platform/qt-5.0-wk2/fast/repaint/float-in-new-block-with-layout-delta-expected.png: Added.
* platform/qt-5.0-wk2/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.png: Added.
* platform/qt-5.0-wk2/fast/runin/generated-expected.png: Added.
* platform/qt-5.0-wk2/fast/table/multiple-captions-display-expected.png: Added.
* platform/qt-5.0-wk2/fast/table/remove-td-display-none-expected.png: Added.
* platform/qt-5.0-wk2/fast/text/international/bidi-ignored-for-first-child-inline-expected.png:
* platform/qt-5.0-wk2/fast/text/international/unicode-bidi-plaintext-in-textarea-expected.png:
* platform/qt-5.0-wk2/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-017-expected.png: Added.
* platform/qt-5.0-wk2/svg/W3C-SVG-1.1/animate-elem-16-t-expected.png: Added.
* platform/qt-5.0-wk2/svg/W3C-SVG-1.1/animate-elem-23-t-expected.png: Added.
* platform/qt-5.0-wk2/svg/W3C-SVG-1.1/animate-elem-31-t-expected.png: Added.
* platform/qt-5.0-wk2/svg/W3C-SVG-1.1/animate-elem-85-t-expected.png: Added.
* platform/qt-5.0-wk2/svg/W3C-SVG-1.1/coords-trans-04-t-expected.png: Added.
* platform/qt-5.0-wk2/svg/W3C-SVG-1.1/coords-units-02-b-expected.png: Added.
* platform/qt-5.0-wk2/svg/W3C-SVG-1.1/fonts-glyph-04-t-expected.png: Added.
* platform/qt-5.0-wk2/svg/W3C-SVG-1.1/painting-marker-01-f-expected.png: Added.
* platform/qt-5.0-wk2/svg/W3C-SVG-1.1/paths-data-01-t-expected.png: Added.
* platform/qt-5.0-wk2/svg/W3C-SVG-1.1/pservers-grad-10-b-expected.png: Added.
* platform/qt-5.0-wk2/svg/W3C-SVG-1.1/pservers-grad-16-b-expected.png: Added.
* platform/qt-5.0-wk2/svg/W3C-SVG-1.1/script-handle-01-b-expected.png: Added.
* platform/qt-5.0-wk2/svg/W3C-SVG-1.1/shapes-rect-01-t-expected.png: Added.
* platform/qt-5.0-wk2/svg/W3C-SVG-1.1/struct-cond-03-t-expected.png: Added.
* platform/qt-5.0-wk2/svg/W3C-SVG-1.1/struct-defs-01-t-expected.png: Added.
* platform/qt-5.0-wk2/svg/W3C-SVG-1.1/text-align-02-b-expected.png: Added.
* platform/qt-5.0-wk2/svg/W3C-SVG-1.1/text-align-08-b-expected.png: Added.
* platform/qt-5.0-wk2/svg/W3C-SVG-1.1/text-text-03-b-expected.png: Added.
* platform/qt-5.0-wk2/svg/custom/text-ctm-expected.png: Added.
* platform/qt-5.0-wk2/svg/custom/use-instanceRoot-event-listeners-expected.png:
* platform/qt-5.0-wk2/tables/mozilla/bugs/bug81934-expected.png: Added.
* platform/qt-5.0-wk2/tables/mozilla/marvin/tables_bgcolor_red-expected.png: Added.
* platform/qt-5.0-wk2/tables/mozilla/marvin/tfoot_align_left-expected.png: Added.
* platform/qt-5.0-wk2/tables/mozilla/marvin/x_td_align_right-expected.png: Added.
* platform/qt-5.0-wk2/tables/mozilla/marvin/x_th_class-expected.png: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151590 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Accelerated compositing layers that intersect the image plane are incorrectly transformed
https://bugs.webkit.org/show_bug.cgi?id=117067

Reviewed by Carlos Garcia Campos.

PR 273550

The BlackBerry port used to mathematically project each corner of each
layer bounds rectangle, which gives the wrong results when the layer
intersects the image plane.

For display lists, we still got the correct appearance of the layer
contents, since the display list results in geometry that's transformed
in the vertex shader, on the GPU.

However, the transformed bounds are used for drawing the debug border,
performing visibility calculations on the CPU and drawing of WebGL,
masks/reflections and filters. Using the mathematical projection of
points that lie behind the image plane gives the wrong results.

The most important consequence of this bug was that the wrong area of
the layer would be considered visible, so a tiled layer would not
populate the right tiles (or any tiles at all).

Fixed by implementing something along the lines of the recipe in
section 6.2 of http://www.w3.org/TR/css3-transforms.

No new tests, manually testable by enabling debug border on
https://developer.mozilla.org/en-US/demos/detail/the-box/launch.

* platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
(WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::LayerCompositingThread):
(WebCore::LayerCompositingThread::setDrawTransform):
(WebCore):
(WebCore::LayerCompositingThread::textureCoordinates):
(WebCore::LayerCompositingThread::drawTextures):
* platform/graphics/blackberry/LayerCompositingThread.h:
(LayerCompositingThread):
(WebCore::LayerCompositingThread::transformedBounds):
(WebCore::LayerCompositingThread::ws):
(WebCore::LayerCompositingThread::centerW):
* platform/graphics/blackberry/LayerFilterRenderer.cpp:
(WebCore::LayerFilterRenderer::applyActions):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::compareLayerW):
(WebCore::LayerRenderer::compositeLayers):
(WebCore::LayerRenderer::drawDebugBorder):
(WebCore):
(WebCore::LayerRenderer::updateLayersRecursive):
(WebCore::LayerRenderer::compositeLayersRecursive):
* platform/graphics/blackberry/LayerRenderer.h:
(WebCore):
(LayerRenderer):
* platform/graphics/blackberry/LayerRendererSurface.cpp:
(WebCore::LayerRendererSurface::boundingBox):
(WebCore::LayerRendererSurface::transformedBounds):
* platform/graphics/blackberry/LayerRendererSurface.h:
(WebCore::LayerRendererSurface::setDrawTransform):
(WebCore::LayerRendererSurface::setReplicaDrawTransform):
(LayerRendererSurface):
* platform/graphics/blackberry/LayerUtilities.h: Added.
(WebCore):
(LayerClipPlane):
(WebCore::LayerClipPlane::LayerClipPlane):
(WebCore::LayerClipPlane::isPointInside):
(WebCore::LayerClipPlane::computeIntersection):
(WebCore::intersect):
(WebCore::boundingBox):
(WebCore::multVecMatrix):
(WebCore::toVector):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[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
CSSParser::parseImageSet() doesn't need a parameter.
https://bugs.webkit.org/show_bug.cgi?id=117617

Patch by Jaehun Lim <ljaehun.lim@samsung.com> on 2013-06-14
Reviewed by Darin Adler.

parseImageSet() can get m_valueList directly.
And minor fixes.

No new tests, no behavior change.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseContent):
(WebCore::CSSParser::parseFillImage):
(WebCore::CSSParser::parseBorderImage):
(WebCore::CSSParser::parseImageSet):
* css/CSSParser.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove front-end from the WebCore Xcode project.
https://bugs.webkit.org/show_bug.cgi?id=117640

Reviewed by Darin Adler.

* WebCore.xcodeproj/project.pbxproj:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clicking on snapshotting plug-ins does not restart them
https://bugs.webkit.org/show_bug.cgi?id=117620
<rdar://problem/13821729>

Follow-up review comments from Darin Adler, with some
discussion on IRC.

Sprinkle OVERRIDE on virtual functions where needed. Also
make sure that the Event is a MouseEvent before casting to it.

* html/HTMLPlugInElement.h: Move defaultEventHandler back to protected and add OVERRIDE.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::defaultEventHandler): Check for MouseEvent and
use toMouseEvent().
* html/HTMLPlugInImageElement.h: Sprinkle some OVERRIDEs, and move defaultEventHandler
to private.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Potential use-after-free with an event fired at a HTMLMediaElement which is currently being deleted
https://bugs.webkit.org/show_bug.cgi?id=117466

Reviewed by Oliver Hunt.
        
Merge https://chromium.googlesource.com/chromium/blink/+/f4200a0093b3d9376f703961615359ec7fb712b4
        
If an event is created using as target an HTMLMediaElement which is
currently being deleted it becomes a heap-use-after free situation.

The GenericEventQueue instance is already owned by the HTMLMediaElement,
and there already is an underlying mechanism to set the target of the
event to NULL, if their target is owner of the queue.

In order to avoid creating this reference in the first place, we enqueue
the event with a NULL target to defer the refcount increment until the
timer for dispatching the event happens (which won't happen at all if
garbage collection is already destroying the objects).

Source/WebCore: 

Test: media/track/media-element-enqueue-event-crash.html

* dom/GenericEventQueue.cpp:
(WebCore::GenericEventQueue::enqueueEvent): Don't ASSERT if the event has no target.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement): Close the event queue so it won't try to
    dispatch any pending events.
(WebCore::HTMLMediaElement::scheduleEvent): Don't set the event target, it will happen just
    prior to event dispatch.
(WebCore::HTMLMediaElement::stop): Close the event queue.

LayoutTests: 

* media/track/media-element-enqueue-event-crash-expected.txt: Added.
* media/track/media-element-enqueue-event-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151600 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Provide simple <meter> drawing logic for testing.
https://bugs.webkit.org/show_bug.cgi?id=117645.

Reviewed by Anders Carlsson.

accessbility/meter-element.html

* rendering/RenderThemeSafari.cpp: Simple test implementation
(WebCore::RenderThemeSafari::adjustMeterStyle): Added.
(WebCore::RenderThemeSafari::supportsMeter): Added.
(WebCore::RenderThemeSafari::meterSizeForBounds): Added.
(WebCore::RenderThemeSafari::paintMeter): Added.
* rendering/RenderThemeSafari.h:
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::progressBarTheme): Added.
(WebCore::RenderThemeWin::getClassicThemeData): Support meters.
(WebCore::RenderThemeWin::getThemeData): Support meter theme.
(WebCore::RenderThemeWin::adjustMeterStyle): Added.
(WebCore::RenderThemeWin::supportsMeter): Added.
(WebCore::RenderThemeWin::meterSizeForBounds): Added.
(WebCore::RenderThemeWin::paintMeter): Added.
* rendering/RenderThemeWin.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151601 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Shrink larger images to fit the width of the blog.

* blog-files/new-inspector/hero-labeled.png:
* blog-files/new-inspector/hero.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Remove implementation of ContextMenu classes
https://bugs.webkit.org/show_bug.cgi?id=114860

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-06-14
Reviewed by Rob Buis.

This code is not being used so we can safely remove it.

Source/WebCore:

* PlatformBlackBerry.cmake:
* platform/blackberry/ContextMenuBlackBerry.cpp: Removed.
* platform/blackberry/ContextMenuItemBlackBerry.cpp: Removed.
* platform/blackberry/LocalizedStringsBlackBerry.cpp:

Source/WebKit:

* PlatformBlackBerry.cmake:

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::init):
* WebCoreSupport/ContextMenuClientBlackBerry.cpp: Removed.
* WebCoreSupport/ContextMenuClientBlackBerry.h: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151603 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Editing: wrong text position when you click enter on the text behind the image
https://bugs.webkit.org/show_bug.cgi?id=115023

Reviewed by Ryosuke Niwa.

Source/WebCore:

When trying to break a line after an image followed by some text, contrary
to the expected behavior the text doesn't move to a new line, instead, the
caret position just shifts to the end of line.

As per the existing implementation for inserting a paragraph separator,
the insertion position obtained corresponds to the point after the image
element.
Since the insertion position doesn't resolve to being offset in the
following text node (0 offset), no splitting of text occurs and the block
to be inserted is placed after the containing (start) block (thereby
causing the caret position to shift).

If the computed insertionPosition points to an element that shall be
ignored for editing purposes (i.e. cannot have a VisiblePosition inside
it), and the position lies either at the start or at the end of such
an element, we should move our Position either upstream or
downstream (respectively) so as to obtain a valid position which can
be used further for splitting of the text.

Test: editing/inserting/insert-paragraph-after-non-editable-node-before-text.html

* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply):
Moving the insertionPosition either upstream or downstream, if the point
lies either at the start or at the end of the anchor node.
The ensuing position, if a text node, can then be used for splitting of
the text correctly.

LayoutTests:

* editing/inserting/insert-paragraph-after-non-editable-node-before-text-expected.txt: Added.
* editing/inserting/insert-paragraph-after-non-ediatble-node-before-text.html: Added.
Layout test added for verifying the insert paragraph behavior between an inline node
which is ignored for editing purposes and some text.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Function names on Object.prototype should be common identifiers
https://bugs.webkit.org/show_bug.cgi?id=117614

Reviewed by Darin Adler.

Source/JavaScriptCore: 

Patch written by Sam Weinig. Make Object's prototype function names common identififers since they're used frequently.

* runtime/CommonIdentifiers.h:
* runtime/FunctionConstructor.cpp:
(JSC::constructFunction):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
* runtime/JSObject.h:
* runtime/ObjectPrototype.cpp:
(JSC::ObjectPrototype::finishCreation):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):

Source/WebCore: 

Use the added common identifiers.

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::finishCreation):
(WebCore::JSDOMWindowBase::updateDocument):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r150651): Web Audio doesn't work at all (silence or squawks) on Mountain Lion
https://bugs.webkit.org/show_bug.cgi?id=117652

Reviewed by Eric Carlson.

r150651 disabled setting the buffer size to a large value, but in so doing, also
disabled setting the buffer size to a small value for Web Audio. Narrow the Mountain
Lion protection to just the <video> element case.

* platform/audio/mac/AudioSessionManagerMac.cpp:
(AudioSessionManager::updateSessionState):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WKPageFindStringMatches ignores the kWKFindOptionsBackwards option.
https://bugs.webkit.org/show_bug.cgi?id=117647
<rdar://problem/13881024>

Source/WebCore: 

Reviewed by Darin Adler.
        
The API returns the matched ranges in the DOM order regardless of the
find direction, but the index of the first match after the user selection
should take the find direction into account.

Extended existing test in TestWebKitAPI.

* page/Page.cpp:
(WebCore::Page::findStringMatchingRanges): Added handling of the Backwards case.
* page/Page.h: Fixed incorrect name of the enum.

Source/WebKit2: 

Reviewed by Darin Adler.
        
The API returns the matched ranges in the DOM order regardless of the
find direction, but the index of the first match after the user selection
should take the find direction into account.

Extended existing test in TestWebKitAPI.

* Shared/API/c/WKFindOptions.h: Added enum for the case where there are
no matches after the user selection in the direction of the find.

Tools: 

Reviewed by Darin Adler.
        
The test now uses content with a selection and tests both
forwards and backward find as well as the case of a find
that has no matches after the user selection.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/FindMatches.mm:
(TestWebKitAPI::didFindStringMatches):
* TestWebKitAPI/Tests/WebKit2/findRanges.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for AVFoundation-backed HTMLMediaElements in the WebVideoFullScreenController.
https://bugs.webkit.org/show_bug.cgi?id=117597

Reviewed by Eric Carlson.

Source/WebCore:

Check for media elements with AVFoundation media types and create a AVPlayerLayer
rather than a QTMovieLayer.

* platform/mac/WebVideoFullscreenController.h:
* platform/mac/WebVideoFullscreenController.mm:
(-[WebVideoFullscreenController setupVideoOverlay:]): Take a CALayer rather than a
    QTMovieLayer. Move the code which connects the layer with it's media source into
    setMediaElement.
(-[WebVideoFullscreenController windowDidLoad]): Give the window's contentView a generic
    CALayer instaead of a QTMovieLayer.
(-[WebVideoFullscreenController setMediaElement:]): Test whether the incoming media
    element is backed by a QTMovie or an AVPlayer, and create the appropriate layer.
(-[WebVideoFullscreenController windowDidExitFullscreen]): Remove the observer of
    AVPlayer's rate property.
(-[WebVideoFullscreenController observeValueForKeyPath:ofObject:change:context:]):
    If the keyPath is "rate", call rateChanged.

Source/WebKit/mac:

Allow AVFoundation to be enabled even when the FullScreen API is disabled.

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

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