Cue display events may not be registered during page load.
https://bugs.webkit.org/show_bug.cgi?id=132696
<rdar://problem/16652874>

Reviewed by Eric Carlson.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handleTextTrackAdd): Don't register
for 'cuechange' events anymore.
(Controller.prototype.handleTextTrackRemove): Ditto.
(Controller.prototype.updateCaptionContainer): Reduce CSS
churn by not adding/removing 'Hidden' class every time a
new cue is processed. Only do this when transitioning
track display state.
(Controller.prototype.handleTextTrackCueChange): Deleted.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateTextTrackDisplay): Call
'updateTextTrackContainer' directory when processing cues,
rather than trampolining through the JS layer.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
SSA conversion should delete PhantomLocals for captured variables
https://bugs.webkit.org/show_bug.cgi?id=132693

Reviewed by Mark Hahnenberg.

* dfg/DFGCommon.cpp:
(JSC::DFG::startCrashing): Parallel JIT and a JIT bug means that we man dump IR in parallel. This is the workaround. This patch uses it in all of the places where we dump IR and crash.
* dfg/DFGCommon.h:
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::injectTypeConversionsForEdge): Use the workaround.
* dfg/DFGLivenessAnalysisPhase.cpp:
(JSC::DFG::LivenessAnalysisPhase::run): Use the workaround.
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run): Fix the bug - it's true that PhantomLocal for captured variables doesn't need anything done to it, but it's wrong that we didn't delete it outright.
* dfg/DFGValidate.cpp: Use the workaround.
* tests/stress/phantom-local-captured-but-not-flushed-to-ssa.js: Added.
(foo):
(bar):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Shapes do not resolve dimensions specified in viewport units
https://bugs.webkit.org/show_bug.cgi?id=124052

Reviewed by Dirk Schulze.

Source/WebCore:
Viewport unit resolution doesn't work unless the RenderView is passed
down into the floatValueForLength methods. All this does is plumb down
a RenderView in all of these cases.

Tests: css3/masking/clip-path-polygon-viewport-units.html
       fast/shapes/shape-outside-floats/shape-outside-floats-viewport-units.html

* css/BasicShapeFunctions.cpp:
(WebCore::floatValueForCenterCoordinate):
* css/BasicShapeFunctions.h:
* css/LengthFunctions.cpp:
(WebCore::floatSizeForLengthSize):
* css/LengthFunctions.h:
* rendering/ClipPathOperation.h:
(WebCore::ShapeClipPathOperation::pathForReferenceRect):
(WebCore::BoxClipPathOperation::pathForReferenceRect):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupClipPath):
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape):
* rendering/shapes/Shape.h:
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computedShape):
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeCircle::floatValueForRadiusInBox):
(WebCore::BasicShapeCircle::path):
(WebCore::BasicShapeEllipse::floatValueForRadiusInBox):
(WebCore::BasicShapeEllipse::path):
(WebCore::BasicShapePolygon::path):
(WebCore::floatSizeForLengthSize):
(WebCore::BasicShapeInset::path):
* rendering/style/BasicShapes.h:
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):

LayoutTests:
* css3/masking/clip-path-polygon-viewport-units-expected.html: Added.
* css3/masking/clip-path-polygon-viewport-units.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-viewport-units-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-viewport-units.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Wrap a new class definition with __has_include()
<rdar://problem/16852395> and https://bugs.webkit.org/show_bug.cgi?id=132694

Reviewed by Tim Horton.

* Misc/WebSharingServicePickerController.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the iOS build after r168476.

* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::GraphicsContext::drawFocusRing):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Selecting frame in debugger sidebar doesn't reveal code
https://bugs.webkit.org/show_bug.cgi?id=132112

Patch by Jono Wells <jonowells@apple.com> on 2014-05-08
Reviewed by Joseph Pecoraro.

WebInspector._revealAndSelectRepresentedObjectInNavigationSidebar was checking
only one of the two content trees in the DebuggerSidebarPanel instance. Added
base getter elementIsSelected to NavigationSidebarPanel and extended it in
DebuggerSidebarPanel.

* UserInterface/Base/Main.js:
(WebInspector._revealAndSelectRepresentedObjectInNavigationSidebar): modified logic to check `selectedSidebarPanel.elementIsSelected`.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype.get elementIsSelected): Checks breakpoint and call stack trees.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.get elementIsSelected): Base implementation.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS][WK2] Remove an incorrect assertion on asynchronous touch dispatch
https://bugs.webkit.org/show_bug.cgi?id=132660

Reviewed by Enrica Casucci.

This assertion no longer make sense after r168393. Now the asynchronous behavior is maintained
until the last finger leaves the screen.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleTouchEventAsynchronously):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r168471): Update the builder names on the scheduler list.
https://bugs.webkit.org/show_bug.cgi?id=132699

Patch by Carlos Alberto Lopez Perez <clopez@igalia.com> on 2014-05-08
Reviewed by Martin Robinson.

On r168471 I missed to update the builder names for the GTK build
bots on the AnyBranchScheduler type scheduler list of bots.

* BuildSlaveSupport/build.webkit.org-config/config.json:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[wk2] Don't use the XPC-based plugin process for Adobe Reader
https://bugs.webkit.org/show_bug.cgi?id=132701
<rdar://problem/16792692>

Reviewed by Anders Carlsson.

* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::shouldUseXPC):
Rename the debugging default to a more modern and accurate name.
Don't use XPC for Adobe Reader.

(WebKit::PluginProcessProxy::platformGetLaunchOptions):
Move the check for plugins that need an executable heap into shouldUseXPC.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS WebKit2] Flush RemoteLayerBackingStore contexts on a secondary queue
https://bugs.webkit.org/show_bug.cgi?id=132667
<rdar://problem/15349483>

Reviewed by Darin Adler.

* Shared/mac/RemoteLayerBackingStore.h:
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::takeFrontContextPendingFlush):
(WebKit::RemoteLayerBackingStore::flush): Deleted.
Add takeFrontContextPendingFlush, which returns the painted-but-not-yet-flushed front context,
and drops our reference to it. This needs to be called on all backing store between paints.

* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::hasFlushed):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::~RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::BackingStoreFlusher):
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
(WebKit::flushBackingStoreChangesInTransaction): Deleted.
Flush backing store and send the layer tree commit to the UI process from a dispatch queue.
We will only ever have a single commit in flight at a time, and there's a new
RELEASE_ASSERT to ensure that is the case.
We package up the commit on the main thread; the queue calls CGContextFlush
on all of the newly painted contexts and then tosses the commit over to the UI process.
This is a win in many cases because the Web process main thread can go ahead
and do other non-painting tasks while the queue is blocked on painting.


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