[EFL][WK2] Refactor favicon database APIs
https://bugs.webkit.org/show_bug.cgi?id=132519

Reviewed by Gyuyoung Kim.

Source/WebKit2:
ewebkit2 has two options to get favicon.

The first option is ewk_view_favicon_get with "favicon,changed" signal.
It's simple to use but it always adds the callback to EwkView although applications does not use favicon.

The other option is ewk_favicon_database_icon_get with ewk_favicon_database_icon_change_callback_add API.
But the callback doesn't have information about Ewk_Favicon_Database to call ewk_favicon_database_icon_get.

This patch removed ewk_view_favicon_get and "favicon,changed" signal.
In addition, improved ewk_favicon_database_icon_change_callback.

* UIProcess/API/efl/EwkView.cpp: Remove ewk_favicon_database related code.
(EwkView::EwkView):
(EwkView::~EwkView):
(EwkView::informURLChange):
(EwkView::handleFaviconChanged):
(EwkView::createFavicon): Deleted.
* UIProcess/API/efl/EwkViewCallbacks.h:
* UIProcess/API/efl/ewk_favicon_database.cpp:
(EwkFaviconDatabase::iconDataReadyForPageURL):
(EwkFaviconDatabase::didChangeIconForPageURL): Deleted. dead code.
* UIProcess/API/efl/ewk_favicon_database.h:
Refactor Ewk_Favicon_Database_Icon_Change_Cb and improve doxygen.
* UIProcess/API/efl/ewk_favicon_database_private.h:
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_favicon_get): Deleted.
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:
(EWK2FaviconDatabaseTest::requestFaviconData):
(TEST_F):

Tools:
* MiniBrowser/efl/main.c: Use ewk_favicon_database_icon_get instead of ewk_view_favicon_get.
(update_view_favicon):
(on_icon_changed_cb):
(window_free):
(on_url_changed):
(window_create):
(on_view_favicon_changed): Deleted.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove two now-incorrect assertions after r168256.

* runtime/JSString.cpp:
(JSC::JSRopeString::resolveRopeSlowCase8):
(JSC::JSRopeString::resolveRopeSlowCase):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. New GTK baseline for media/media-controls-clone.html.

* platform/gtk/TestExpectations: Removed from the expectations.
* platform/gtk/media/media-controls-clone-expected.png:
* platform/gtk/media/media-controls-clone-expected.txt: New
baseline.

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

* UIProcess/API/Cocoa/WKWebView.mm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSSRegions] Slider displayed wrong in regions
https://bugs.webkit.org/show_bug.cgi?id=132243

Reviewed by Mihnea Ovidenie.

Source/WebCore:
In case a box didn't have a range, getRegionRangeForBox was searching for
the top-most unplittable ancestor. This is not correct in every case. It's
possible to have a box with range that has children without ranges (e.g. an
absolutely positioned inline box with shadow descendants).

I've modified getRegionRangeForBox to search for the first ancestor that
has a cached range and use that instead of looking for an unsplittable box.
The range of the box is the region at the top of the box, clamped by the
range of the ancestor. This will be correct all the time once all the layout
systems are region range aware and are able to cache it.

Test: fast/regions/positioned-slider-in-regions.html

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::hasRegionRangeForBox):
(WebCore::RenderFlowThread::getRegionRangeForBox):
* rendering/RenderFlowThread.h:

LayoutTests:
Tests that the thumb of positioned slider inside regions is correctly painted.

* fast/regions/positioned-slider-in-regions-expected.html: Added.
* fast/regions/positioned-slider-in-regions.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Elements with overflow:auto are not painted inside regions when following a float
https://bugs.webkit.org/show_bug.cgi?id=131161

Reviewed by David Hyatt.

Source/WebCore:
When a float-avoiding element (such as overflow:auto) is flowed into a flow thread after a float, its
logical left is not set on its frameRect or its layer's topLeft, but is instead kept in its RenderBoxRegionInfo
structure. In some situation, this causes paint rejection to kick-in because intersecting the layer's rect
(which DOESN'T contain the logical left from the region info object) with the computed background rect
(which contains the logical left from the region info object) results in an empty rect.

Test: fast/regions/overflow-auto-after-float.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):

LayoutTests:
Added test for an overflow:auto element being flowed after a float.

* fast/regions/overflow-auto-after-float-expected.html: Added.
* fast/regions/overflow-auto-after-float.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168288 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Another iOS build fix after r168260.

Removed an unnecessary 'using namespace WebCore'.

* UIProcess/ios/WebMemoryPressureHandlerIOS.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Session-aware plugin autostart data
https://bugs.webkit.org/show_bug.cgi?id=131758
<rdar://problem/15906540>

Reviewed by Alexey Proskuryakov.

Source/WebCore:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
* page/PlugInClient.h:

Source/WebKit2:
* Shared/WebProcessCreationParameters.cpp:
* Shared/WebProcessCreationParameters.h:
* UIProcess/Plugins/PlugInAutoStartProvider.cpp:
(WebKit::PlugInAutoStartProvider::PlugInAutoStartProvider):
(WebKit::PlugInAutoStartProvider::addAutoStartOriginHash):
(WebKit::PlugInAutoStartProvider::autoStartOriginHashesCopy):
(WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
(WebKit::PlugInAutoStartProvider::setAutoStartOriginsTableWithItemsPassingTest):
(WebKit::PlugInAutoStartProvider::setAutoStartOriginsArray):
(WebKit::PlugInAutoStartProvider::didReceiveUserInteraction):
* UIProcess/Plugins/PlugInAutoStartProvider.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::addPlugInAutoStartOriginHash):
(WebKit::WebContext::plugInDidReceiveUserInteraction):
* UIProcess/WebContext.h:
* UIProcess/WebContext.messages.in:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginDidReceiveUserInteraction):
* WebProcess/WebCoreSupport/WebPlugInClient.cpp:
(WebKit::WebPlugInClient::didStartFromOrigin):
* WebProcess/WebCoreSupport/WebPlugInClient.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::isPlugInAutoStartOriginHash):
(WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
(WebKit::WebProcess::plugInDidStartFromOrigin):
(WebKit::WebProcess::didAddPlugInAutoStartOriginHash):
(WebKit::WebProcess::resetPlugInAutoStartOriginDefaultHashes):
(WebKit::WebProcess::resetPlugInAutoStartOriginHashes):
(WebKit::WebProcess::plugInDidReceiveUserInteraction):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update framework locations in package-root
https://bugs.webkit.org/show_bug.cgi?id=132571

Reviewed by Simon Fraser.

* Scripts/package-root:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Optimize PutByVal when subscript is a rope string.
<https://webkit.org/b/132572>

Add a JSString::toIdentifier() that is smarter when the JSString is
really a rope string. Use this in baseline & DFG's PutByVal to avoid
allocating new StringImpls that we immediately deduplicate anyway.

Reviewed by Antti Koivisto.

* dfg/DFGOperations.cpp:
(JSC::DFG::operationPutByValInternal):
* jit/JITOperations.cpp:
* runtime/JSString.h:
(JSC::JSString::toIdentifier):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use a layer delegate instead of web_disableAllActions wherever possible
https://bugs.webkit.org/show_bug.cgi?id=132560
<rdar://problem/16459284>

Reviewed by Simon Fraser.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::commonInit):
If we own the platform layer, set its delegate to the action-disabling WebActionDisablingCALayerDelegate.
If we don't, its actual owner might want to control the delegate, so continue using web_disableAllActions.

* platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h: Added.
* platform/graphics/cocoa/WebActionDisablingCALayerDelegate.mm: Added.
(+[WebActionDisablingCALayerDelegate shared]):
(-[WebActionDisablingCALayerDelegate actionForLayer:forKey:]):
Add a class that can act as the delegate of a CALayer, and disables all actions.

* platform/graphics/cocoa/WebCoreCALayerExtras.h: Renamed from Source/WebCore/platform/graphics/mac/WebCoreCALayerExtras.h.
* platform/graphics/cocoa/WebCoreCALayerExtras.mm: Renamed from Source/WebCore/platform/graphics/mac/WebCoreCALayerExtras.mm.
(-[CALayer web_disableAllActions]):
Move WebCoreCALayerExtras from mac/ to cocoa/.

* UIProcess/API/mac/WKView.mm:
(-[WKView _setAcceleratedCompositingModeRootLayer:]):
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator):
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Make use of WebActionDisablingCALayerDelegate where possible.
Also, UIKit disables actions for us, so don't bother doing anything on iOS.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Enhance IDL compiler so it supports unrestricted float and double
https://bugs.webkit.org/show_bug.cgi?id=132460

Reviewed by Dirk Schulze.

Source/WebCore:
Updated IDL compiler so it supports unrestricted types.
Also updated the IDL files so they use unrestricted float and
double.

Tests:
* canvas/philip/tests/2d.gradient.linear.nonfinite.html:
* canvas/philip/tests/2d.gradient.object.invalidoffset.html:
* canvas/philip/tests/2d.gradient.radial.nonfinite.html:
* canvas/philip/tests/2d.imageData.get.nonfinite.html:
* canvas/philip/tests/2d.imageData.put.nonfinite.html:
* canvas/philip/tests/2d.missingargs.html:
* fast/canvas/canvas-getImageData-invalid-expected.txt:
* fast/canvas/canvas-putImageData-expected.txt:
* fast/canvas/canvas-putImageData.js:

* Modules/battery/BatteryManager.idl:
* Modules/gamepad/Gamepad.idl:
* Modules/geolocation/Coordinates.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/mediasource/VideoPlaybackQuality.idl:
* Modules/mediastream/MediaSourceStates.idl:
* Modules/proximity/DeviceProximityEvent.idl:
* Modules/speech/SpeechGrammar.idl:
* Modules/speech/SpeechGrammarList.idl:
* Modules/speech/SpeechRecognitionAlternative.idl:
* Modules/speech/SpeechSynthesisEvent.idl:
* Modules/speech/SpeechSynthesisUtterance.idl:
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBuffer.idl:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/AudioListener.idl:
* Modules/webaudio/AudioParam.idl:
* Modules/webaudio/AudioProcessingEvent.idl:
* Modules/webaudio/OfflineAudioContext.idl:
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/PannerNode.idl:
* bindings/scripts/CodeGenerator.pm:
* bindings/scripts/CodeGeneratorGObject.pm:
(GetGValueTypeName):
(GetGlibTypeName):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateParametersCheck):
(JSValueToNative):
* bindings/scripts/CodeGeneratorObjC.pm:
(GetObjCType):
(GenerateHeader):
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestTypedefs.idl:
* css/CSSPrimitiveValue.idl:
* css/WebKitCSSMatrix.idl:
* dom/ClientRect.idl:
* dom/DeviceMotionEvent.idl:
* dom/DeviceOrientationEvent.idl:
* dom/Document.idl:
* dom/RequestAnimationFrameCallback.idl:
* dom/Touch.idl:
* dom/TransitionEvent.idl:
* dom/WebKitAnimationEvent.idl:
* dom/WebKitTransitionEvent.idl:
* dom/WheelEvent.idl:
* html/HTMLInputElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLMeterElement.idl:
* html/HTMLProgressElement.idl:
* html/MediaController.idl:
* html/TextMetrics.idl:
* html/TimeRanges.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/WebGLRenderingContext.idl:
* html/track/DataCue.idl:
* html/track/TextTrackCue.idl:
* html/track/VTTCue.idl:
* html/track/VTTRegion.idl:
* inspector/InspectorFrontendHost.idl:
* inspector/ScriptProfile.idl:
* inspector/ScriptProfileNode.idl:
* page/DOMWindow.idl:
* page/Performance.idl:
* page/PerformanceEntry.idl:
* page/PerformanceResourceTiming.idl:
* page/SpeechInputResult.idl:
* page/WebKitPoint.idl:
* svg/SVGAngle.idl:
* svg/SVGAnimatedNumber.idl:
* svg/SVGAnimationElement.idl:
* svg/SVGFEDropShadowElement.idl:
* svg/SVGFEGaussianBlurElement.idl:
* svg/SVGFEMorphologyElement.idl:
* svg/SVGGlyphRefElement.idl:
* svg/SVGLength.idl:
* svg/SVGMatrix.idl:
* svg/SVGNumber.idl:
* svg/SVGPathElement.idl:
* svg/SVGPathSegArcAbs.idl:
* svg/SVGPathSegArcRel.idl:
* svg/SVGPathSegCurvetoCubicAbs.idl:
* svg/SVGPathSegCurvetoCubicRel.idl:
* svg/SVGPathSegCurvetoCubicSmoothAbs.idl:
* svg/SVGPathSegCurvetoCubicSmoothRel.idl:
* svg/SVGPathSegCurvetoQuadraticAbs.idl:
* svg/SVGPathSegCurvetoQuadraticRel.idl:
* svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl:
* svg/SVGPathSegCurvetoQuadraticSmoothRel.idl:
* svg/SVGPathSegLinetoAbs.idl:
* svg/SVGPathSegLinetoHorizontalAbs.idl:
* svg/SVGPathSegLinetoHorizontalRel.idl:
* svg/SVGPathSegLinetoRel.idl:
* svg/SVGPathSegLinetoVerticalAbs.idl:
* svg/SVGPathSegLinetoVerticalRel.idl:
* svg/SVGPathSegMovetoAbs.idl:
* svg/SVGPathSegMovetoRel.idl:
* svg/SVGPoint.idl:
* svg/SVGRect.idl:
* svg/SVGSVGElement.idl:
* svg/SVGTextContentElement.idl:
* svg/SVGTransform.idl:
* svg/SVGZoomEvent.idl:
* testing/InternalSettings.idl:
* testing/Internals.idl:
* xml/XPathResult.idl:

LayoutTests:
* canvas/philip/tests/2d.gradient.linear.nonfinite.html:
* canvas/philip/tests/2d.gradient.object.invalidoffset.html:
* canvas/philip/tests/2d.gradient.radial.nonfinite.html:
* canvas/philip/tests/2d.imageData.get.nonfinite.html:
* canvas/philip/tests/2d.imageData.put.nonfinite.html:
* canvas/philip/tests/2d.missingargs-expected.txt:
* canvas/philip/tests/2d.missingargs.html:
* fast/canvas/canvas-getImageData-invalid-expected.txt:
* fast/canvas/canvas-putImageData-expected.txt:
* fast/canvas/canvas-putImageData.js:
* fast/canvas/linearGradient-infinite-values-expected.txt:
* fast/canvas/radialGradient-infinite-values-expected.txt:
* fast/canvas/script-tests/canvas-getImageData-invalid.js:
* fast/canvas/script-tests/linearGradient-infinite-values.js:
* fast/canvas/script-tests/radialGradient-infinite-values.js:
* platform/mac/canvas/philip/tests/2d.missingargs-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][CMake] Unable to do make install
https://bugs.webkit.org/show_bug.cgi?id=130188

Reviewed by Carlos Garcia Campos.

.:
Only try to install the HTML documentation if the build is configured to generate it via
the new ENABLE_GTKDOC option. We cannot conditionally install something, so this allows us
to keep the HTML documentation directory as an installation source.

* Source/PlatformGTK.cmake: The gtkdoc target now always builds HTML documentation, but
is only added to the default target when ENABLE_GTKDOC is turned on. gtkdoc-no-html is
never added to the default target, but will be triggered by build-webkit, so that
when ENABLE_GTKDOC is off and build-webkit isn't used, documentation isn't built at all.
* Source/cmake/OptionsGTK.cmake: Add an ENABLE_GTKDOC option to the build.

Tools:
* Scripts/webkitdirs.pm:
(buildCMakeGeneratedProject): Always build gtkdoc-no-html for WebKitGTK+. This
will give an early signal that a change has broken the documentation.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Remove regionLayoutUpdate event
https://bugs.webkit.org/show_bug.cgi?id=132564

Reviewed by Simon Fraser.

Source/WebCore:
The regionLayoutUpdate event was removed from the regions spec and was replaced by two other events:
regionOversetChange and regionFragmentChange.

No new tests needed, this patch removes a feature.

* dom/EventNames.h:
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent): Deleted.
* dom/WebKitNamedFlow.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::resetNonPersistentData):
(WebCore::InspectorCSSAgent::willRemoveNamedFlow):
(WebCore::UpdateRegionLayoutTask::UpdateRegionLayoutTask): Deleted.
(WebCore::UpdateRegionLayoutTask::scheduleFor): Deleted.
(WebCore::UpdateRegionLayoutTask::unschedule): Deleted.
(WebCore::UpdateRegionLayoutTask::reset): Deleted.
(WebCore::UpdateRegionLayoutTask::timerFired): Deleted.
(WebCore::InspectorCSSAgent::didUpdateRegionLayout): Deleted.
(WebCore::InspectorCSSAgent::regionLayoutUpdated): Deleted.
* inspector/InspectorCSSAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didUpdateRegionLayoutImpl): Deleted.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didUpdateRegionLayout): Deleted.
* inspector/protocol/CSS.json:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::updateOversetState):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::removeRegionFromThread):
(WebCore::RenderNamedFlowThread::layout):
(WebCore::RenderNamedFlowThread::dispatchRegionLayoutUpdateEventIfNeeded): Deleted.
(WebCore::RenderNamedFlowThread::regionLayoutUpdateEventTimerFired): Deleted.
* rendering/RenderNamedFlowThread.h:

Source/WebInspectorUI:
The regionLayoutUpdate event was removed from the regions spec and was replaced by two other events:
regionOversetChange and regionFragmentChange.

* UserInterface/Controllers/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype.get regionLayoutUpdated): Deleted.
* UserInterface/Models/ScriptTimelineRecord.js:
* UserInterface/Protocol/CSSObserver.js:
(WebInspector.CSSObserver.prototype.regionLayoutUpdated): Deleted.
* UserInterface/Protocol/Legacy/7.0/InspectorWebBackendCommands.js:
* Versions/Inspector-iOS-7.0.json:

LayoutTests:
Removed test for regionLayoutUpdate event.

* fast/regions/auto-size/autoheight-regionlayoutupdate-multipletimes-expected.txt: Removed.
* fast/regions/auto-size/autoheight-regionlayoutupdate-multipletimes.html: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
More long hangs under IOSurfacePool::evict
https://bugs.webkit.org/show_bug.cgi?id=132576
<rdar://problem/16769469>

Reviewed by Simon Fraser.

* platform/graphics/cg/IOSurfacePool.cpp:
(WebCore::IOSurfacePool::evict):
If the pool is too full, we should be evicting in-use surfaces
even if the size of the in-use surfaces has dropped below maximumInUseBytes,
otherwise we can get stuck in an infinite loop with 0 cached surfaces
and 1+ in-use surfaces.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Blending] Move fast/repaint tests to css3/compositing/repaint
https://bugs.webkit.org/show_bug.cgi?id=132567

Patch by Ion Rosca <rosca@adobe.com> on 2014-05-05
Reviewed by Mihnea Ovidenie.

* css3/compositing/repaint/blend-mode-isolate-stacking-context-expected.txt: Renamed from LayoutTests/fast/repaint/blend-mode-isolate-stacking-context-expected.txt.
* css3/compositing/repaint/blend-mode-isolate-stacking-context.html: Renamed from LayoutTests/fast/repaint/blend-mode-isolate-stacking-context.html.
* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r168244): compositing/visibility/visibility-image-layers-dynamic.html 
failing.
https://bugs.webkit.org/show_bug.cgi?id=132551

Reviewed by Tim Horton.

This just needed a re-baseline after all. The bounds have increased in size 
because the size of the layer tree dump effects the bounds! So now that we are 
printing out anchor points, the bound increase by 15 pixels for every new anchor 
point print-out.

Should not longer be marked failing.
* TestExpectations:

Added comment to the test.
* compositing/visibility/visibility-image-layers-dynamic.html:

Re-baseline.
* platform/mac/compositing/visibility/visibility-image-layers-dynamic-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement beginScrubbing and endScrubbing for video fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=132520

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-05-05
Reviewed by Eric Carlson.

Source/WebCore:
Plumb through beginScrubbing and endScrubbing from AVKit down to HTMLMediaElement.
This keeps the playback state consistent while scrubbing and allows playback state
to return to the original state when scrubbing is complete.

* WebCore.exp.in:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerController beginScrubbing:]):
(-[WebAVPlayerController endScrubbing:]):
* platform/ios/WebVideoFullscreenModel.h:
* platform/ios/WebVideoFullscreenModelMediaElement.h:
* platform/ios/WebVideoFullscreenModelMediaElement.mm:
(WebVideoFullscreenModelMediaElement::beginScrubbing):
(WebVideoFullscreenModelMediaElement::endScrubbing):

Source/WebKit2:
Plumb through beginScrubbing and endScrubbing.

* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::beginScrubbing):
(WebKit::WebVideoFullscreenManagerProxy::endScrubbing):
* WebProcess/ios/WebVideoFullscreenManager.messages.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=132522
Clean up ProcessThrottler

Reviewed by Geoffrey Garen.

The initial implementation of ProcessThrottler relied on the reply from the
SetViewState message to ensure the page visibility notifications have a chance
to be delivered. This resulted in:
    - unnecessarily complicated interface to ProcessThrottler (in VisibilityState class)
    - complexity bleeding out into WebPageProxy (handling 'hiding' state).
    - for cases other than view hiding, no suspension notification in the WebContent.

To fix these issues add an explicit handshake from the ProcessThrottler to the WebPage.
This gives us two things:
    - All previously posted messages (e.g. SetViewState) will be processed before suspension.
    - WebContent is always (bar timeout) notified before suspension.

Since this interlock ensures the SetViewState message will be processed, the WKContentView no
longer needs to request a reply from SetViewState, and WebPageProxy can lose all the 'hiding'
state tracking. In turn, we can simplify VisibilityToken to a couple of simpler types, without
the interface to change state - just acquire/release to keep the process runnable or permit
suspension.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
    - VisibilityToken -> BackgroundActivityToken
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
    - m_visibilityToken -> m_activityToken, remove m_pendingViewStateUpdates
      updateVisibilityToken -> updateActivityToken
(WebKit::WebPageProxy::reattachToWebProcess):
    - updateVisibilityToken -> updateActivityToken
(WebKit::WebPageProxy::viewStateDidChange):
    - remove m_pendingViewStateUpdates, updateActivityToken after sending SetViewState
(WebKit::WebPageProxy::updateActivityToken):
    - m_visibilityToken -> m_activityToken, no need to handle 'hiding' state.
(WebKit::WebPageProxy::updateVisibilityToken): Deleted.
    - renamed to updateActivityToken
(WebKit::WebPageProxy::didUpdateViewState): Deleted.
    - implementation moved back into header.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::didUpdateViewState):
    - implementation moved back into header.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
    - ProcessThrottler constructor now passed WebProcessProxy.
* UIProcess/WebProcessProxy.h:
    - added ProcessWillSuspend/ProcessReadyToSuspend
* UIProcess/WebProcessProxy.messages.in:
    - added ProcessWillSuspend/ProcessReadyToSuspend
* UIProcess/ios/ProcessAssertion.h:
(WebKit::ProcessAssertion::state):
    - accessor
* UIProcess/ios/ProcessThrottler.h:
(WebKit::ProcessThrottler::VisibilityToken::visibility): Deleted.
(WebKit::ProcessThrottler::VisibilityToken::setVisibility): Deleted.
    - removed VisibilityToken class, replaced with ForegroundActivityToken/BackgroundActivityToken.
(WebKit::ProcessThrottler::ProcessThrottler): Deleted.
(WebKit::ProcessThrottler::visibilityToken): Deleted.
(WebKit::ProcessThrottler::didConnnectToProcess): Deleted.
(WebKit::ProcessThrottler::assertionState): Deleted.
(WebKit::ProcessThrottler::updateAssertion): Deleted.
    - moved implementations to .mm.
* UIProcess/ios/ProcessThrottler.mm:
(WebKit::ProcessThrottler::ForegroundActivityToken::ForegroundActivityToken):
(WebKit::ProcessThrottler::ForegroundActivityToken::~ForegroundActivityToken):
(WebKit::ProcessThrottler::BackgroundActivityToken::BackgroundActivityToken):
(WebKit::ProcessThrottler::BackgroundActivityToken::~BackgroundActivityToken):
    - new, simpler replacement for VisibilityToken. Instantiate to keep a processes running, release to suspend.
(WebKit::ProcessThrottler::ProcessThrottler):
    - constructor, now initializes WebProcessProxy pointer & timer mechanism
(WebKit::ProcessThrottler::assertionState):
    - select the appropriate AssertionState give current ActivityTokens.
(WebKit::ProcessThrottler::updateAssertionNow):
    - update the current ProcessAssertion.
(WebKit::ProcessThrottler::updateAssertion):
    - update the current ProcessAssertion, delay running->suspended transitions to give the process a chance to clean up.
(WebKit::ProcessThrottler::didConnnectToProcess):
    - moved from header.
(WebKit::ProcessThrottler::suspendTimerFired):
    - timeout to prevent processes from running in the background for too long.
(WebKit::ProcessThrottler::processReadyToSuspend):
    - handshake from the WebContent process to acknowledge it is ready to suspend.
(WebKit::ProcessThrottler::VisibilityToken::VisibilityToken): Deleted.
(WebKit::ProcessThrottler::VisibilityToken::~VisibilityToken): Deleted.
(WebKit::ProcessThrottler::VisibilityToken::hideTimerFired): Deleted.
(WebKit::ProcessThrottler::VisibilityToken::setVisibilityInternal): Deleted.
    - removed VisibilityToken class, replaced with ForegroundActivityToken/BackgroundActivityToken.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didMoveToWindow]):
    - no longer necessary to request a response from SetViewState; this interlock is now managed by the ProcessThrottler.
* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::sendProcessWillSuspend):
(WebKit::WebProcessProxy::processReadyToSuspend):
    - added ProcessWillSuspend/ProcessReadyToSuspend
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::processWillSuspend):
    - notification from the WebContent process that we will be suspended; for now just send back an ack.
* WebProcess/WebProcess.h:
    - added ProcessWillSuspend/ProcessReadyToSuspend
* WebProcess/WebProcess.messages.in:
    - added ProcessWillSuspend/ProcessReadyToSuspend



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: tabindex support in SVG2
https://bugs.webkit.org/show_bug.cgi?id=130212

Reviewed by Chris Fleizach.

Source/WebCore:
The patch is mainly based on a patch for Blink by Erik Dahlström.
https://src.chromium.org/viewvc/blink?revision=172964&view=revision

It adds support for tabindex to SVG by reusing the HTML code.

Spec: https://svgwg.org/svg2-draft/interact.html#sequential-focus-navigation-and-the-tabindex-attribute
IDL attribute: https://svgwg.org/svg2-draft/types.html#__svg__SVGElement__tabIndex

Test: svg/custom/tabindex-order.html

* dom/Element.cpp:
(WebCore::Element::setTabIndex): Moved from HTMLElement and shared with all elements.
* dom/Element.h:
* html/HTMLAnchorElement.cpp: Remove outdated comment.
(WebCore::HTMLAnchorElement::canStartSelection):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setTabIndex): Deleted.
* html/HTMLElement.h:
* svg/SVGAElement.cpp: Uses the same logic as HTMLAnchorElement now.
(WebCore::SVGAElement::tabIndex):
(WebCore::SVGAElement::supportsFocus):
(WebCore::SVGAElement::isMouseFocusable):
(WebCore::SVGAElement::isKeyboardFocusable):
(WebCore::SVGAElement::canStartSelection):
* svg/SVGAElement.h:
* svg/SVGCircleElement.h:
* svg/SVGClipPathElement.h:
* svg/SVGDefsElement.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::tabIndex): Return -1 if element can not be focused.
(WebCore::SVGElement::parseAttribute):
(WebCore::SVGElement::isMouseFocusable):
(WebCore::SVGElement::isKeyboardFocusable): Deleted. Use function on Element.
* svg/SVGElement.h:
* svg/SVGElement.idl:
* svg/SVGEllipseElement.h:
* svg/SVGGElement.h:
* svg/SVGGraphicsElement.h: Remove supportsFocus() from inheriting functions.
    Don't just return true. SVG elements should not be focusable by default.
    Instead check if tabindex was set explicitly.
* svg/SVGImageElement.h:
* svg/SVGLineElement.h:
* svg/SVGPathElement.h:
* svg/SVGPolyElement.h:
* svg/SVGRectElement.h:
* svg/SVGSVGElement.h:
* svg/SVGSwitchElement.h:
* svg/SVGSymbolElement.h:
* svg/SVGTextElement.h:

LayoutTests:
Add test for tabindex on various SVG elements. Negative tests included.

Test is based upon a test from Erik Dahlström. Modified to test all SVGGraphicsElements.

* svg/custom/tabindex-order-expected.txt: Added.
* svg/custom/tabindex-order.html: Added.
* accessibility/svg-group-element-with-title.html: Give group element a role.
* platform/gtk/svg/custom/linking-uri-01-b-expected.txt:
* platform/ios-sim/svg/custom/linking-uri-01-b-expected.txt:
* platform/mac/svg/custom/linking-uri-01-b-expected.txt:


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