[GTK] Add CSS Grid Layout as experimental feature
https://bugs.webkit.org/show_bug.cgi?id=127089

Reviewed by Martin Robinson.

Allow CSS Grid Layout to be enabled through the environment variable WEBKITGTK_EXPERIMENTAL_FEATURES.

Example: WEBKITGTK_EXPERIMENTAL_FEATURES="CSS_GRID_LAYOUT=1"

* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsConstructed): Use new experimental feature to enable or disable CSS Grid Layout.
* UIProcess/gtk/ExperimentalFeatures.cpp: Add new experimental feature.
* UIProcess/gtk/ExperimentalFeatures.h: Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Host DoYouEvenBench on webkit.org
https://bugs.webkit.org/show_bug.cgi?id=127185

Reviewed by Benjamin Poulain.

PerformanceTests: 

Compute the resources directory relative to the benchmark-runner's location
so that we can load tests even if the runner HTML was located elsewhere.

* DoYouEvenBench/Full.html:
* DoYouEvenBench/resources/benchmark-runner.js:
(BenchmarkState._containingDirectory):

Websites/webkit.org: 

Added webkit.org/perf/DoYouEvenBench.

* perf/DoYouEvenBench: Added.
* perf/DoYouEvenBench/index.html: Copied from PerformanceTests/DoYouEvenBench/Full.html.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Stacked floats with shape-outside should allow inline content to interact with the non-outermost float
https://bugs.webkit.org/show_bug.cgi?id=122576

Reviewed by David Hyatt.

Source/WebCore:

Make inline content interact with stacked floats with shape-outside
per the spec. This means that content can interact with floats on the
line that are not the outermost float.

This refactors ComputeFloatOffsetAdapter into a superclass and two
subclasses: one adaptor for determining the offset for float layout,
and one for determining the offset for inline layout.

The logic in LineWidth::shrinkAvailableWidthForNewFloatIfNeeded has
been updated to handle stacked floats with shape-outside properly and
has been considerably simplified in the process. It was previously
doing a whole bunch of unnecessary work.

Tests: fast/shapes/shape-outside-floats/shape-outside-floats-stacked-000.html
       fast/shapes/shape-outside-floats/shape-outside-floats-stacked-001.html
       fast/shapes/shape-outside-floats/shape-outside-floats-stacked-002.html

* rendering/FloatingObjects.cpp:
(WebCore::ComputeFloatOffsetAdapter::~ComputeFloatOffsetAdapter):
(WebCore::ComputeFloatOffsetForFloatLayoutAdapter::ComputeFloatOffsetForFloatLayoutAdapter):
(WebCore::ComputeFloatOffsetForFloatLayoutAdapter::~ComputeFloatOffsetForFloatLayoutAdapter):
(WebCore::ComputeFloatOffsetForLineLayoutAdapter::ComputeFloatOffsetForLineLayoutAdapter):
(WebCore::ComputeFloatOffsetForLineLayoutAdapter::~ComputeFloatOffsetForLineLayoutAdapter):
(WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat):
(WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
(WebCore::FloatingObjects::logicalLeftOffset):
(WebCore::FloatingObjects::logicalRightOffset):
(WebCore::ComputeFloatOffsetForFloatLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded):
(WebCore::ComputeFloatOffsetForFloatLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded):
(WebCore::ComputeFloatOffsetForFloatLayoutAdapter<FloatTypeValue>::heightRemaining):
(WebCore::shapeInfoForFloat):
(WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded):
(WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded):
* rendering/line/LineWidth.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
* rendering/shapes/ShapeOutsideInfo.h:

LayoutTests:

Tests for shape-outside on stacked floats and interaction with inline
content.

* fast/shapes/shape-outside-floats/shape-outside-floats-stacked-000-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-stacked-000.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-stacked-001-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-stacked-001.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-stacked-002-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-stacked-002.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the iOS build after <http://trac.webkit.org/changeset/162178>
(https://bugs.webkit.org/show_bug.cgi?id=127147)

Declare WebMediaSessionHelper outside of namespace WebCore to resolve error that
"Objective-C declarations may only appear in global scope".

* platform/audio/ios/MediaSessionManagerIOS.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
More iOS build fix.

* WebView/WebPreferences.mm: (-[WebPreferences _synchronizeWebStoragePolicyWithCookiePolicy]):
NSHTTPCookieAcceptPolicyExclusivelyFromMainDocumentDomain is not part of NSHTTPCookieAcceptPolicy enum.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Host DoYouEvenBench on webkit.org
https://bugs.webkit.org/show_bug.cgi?id=127185

Reviewed by Benjamin Poulain.

The previous patch didn't quite work due to cross-origin restrictions.
Simply add a hyperlink to a trac page.

* perf/DoYouEvenBench/index.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] HTMLMediaSession should set AudioSession category
https://bugs.webkit.org/show_bug.cgi?id=127137

Reviewed by Sam Weinig.

* html/HTMLMediaSession.cpp:
(WebCore::initializeAudioSession): New, set the audio session to "media" on iOS.
(WebCore::HTMLMediaSession::HTMLMediaSession): Call initializeAudioSession.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
platform/mac/accessibility/aria-multiline.html sometimes asserts in AccessibilityController::removeNotificationListener
https://bugs.webkit.org/show_bug.cgi?id=127141

Reviewed by Alexey Proskuryakov.

Make sure to reset the notification handler each time.

* DumpRenderTree/AccessibilityController.cpp:
(AccessibilityController::resetToConsistentState):
* DumpRenderTree/AccessibilityController.h:
* DumpRenderTree/atk/AccessibilityControllerAtk.cpp:
(AccessibilityController::platformResetToConsistentState):
* DumpRenderTree/ios/AccessibilityControllerIOS.mm:
(AccessibilityController::platformResetToConsistentState):
* DumpRenderTree/mac/AccessibilityControllerMac.mm:
(AccessibilityController::~AccessibilityController):
(AccessibilityController::platformResetToConsistentState):
(AccessibilityController::removeNotificationListener):
* DumpRenderTree/win/AccessibilityControllerWin.cpp:
(AccessibilityController::platformResetToConsistentState):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Minor fixes in regions performance tests
https://bugs.webkit.org/show_bug.cgi?id=127041

Reviewed by Ryosuke Niwa.

Fix minor issues in CSS Regions performance tests.

* Layout/RegionsAuto.html: Change type to lower case.
* Layout/RegionsAutoMaxHeight.html: Ditto.
* Layout/RegionsFixed.html: Ditto.
* Layout/RegionsFixedShort.html: Ditto.
* Layout/RegionsSelection.html: Ditto. Move test methods from regions.js.
* Layout/resources/regions.js: Remove moved methods.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move didPerformFirstNavigation() logic to -[WebView _didCommitLoadForFrame:]
https://bugs.webkit.org/show_bug.cgi?id=127189

Reviewed by Dan Bernstein.

Source/WebCore:

* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::didPerformFirstNavigation):
Add an empty implementation of didPerformFirstNavigation() to make it easier to remove it from subclasses.

Source/WebKit/mac:

This is a first step towards completely eliminating the didPerformFirstNavigation() client callback.

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
Remove didPerformFirstNavigation() implementation.

* WebView/WebView.mm:
(-[WebView _checkDidPerformFirstNavigation]):
Check if we have both a current item and a previous item which indicates that we've navigated once.
The old code was called before there was a current item but since this is called from _didCommitLoadForFrame
we have to check that there's a current item as well.

(-[WebView _didCommitLoadForFrame:]):
Call _didCommitLoadForFrame.

* WebView/WebViewData.h:
Add new ivar.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove didPerformFirstNavigation from all FrameLoaderClient subclasses
https://bugs.webkit.org/show_bug.cgi?id=127190

Reviewed by Dan Bernstein.

Source/WebKit/efl:

According to the EFl maintainers, this is not used by any applications so it's safe to remove it.

* WebCoreSupport/FrameLoaderClientEfl.cpp:
* WebCoreSupport/FrameLoaderClientEfl.h:
* ewk/ewk_frame.cpp:
* ewk/ewk_frame_private.h:

Source/WebKit/gtk:

Removing this shouldn't have any bad effects, but if that is the case it's possible to
set the cache model in didCommitLoadForFrame, similar to what is done in r162224.

* WebCoreSupport/FrameLoaderClientGtk.cpp:
* WebCoreSupport/FrameLoaderClientGtk.h:

Source/WebKit/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
* WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKit/wince:

* WebCoreSupport/FrameLoaderClientWinCE.cpp:
* WebCoreSupport/FrameLoaderClientWinCE.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove FrameLoaderClient::didPerformFirstNavigation()
https://bugs.webkit.org/show_bug.cgi?id=127191

Reviewed by Dan Bernstein.

Source/WebCore:

* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::FrameLoader):
* loader/FrameLoader.h:
* loader/FrameLoaderClient.h:
* loader/HistoryController.cpp:
(WebCore::HistoryController::updateBackForwardListClippedAtTarget):

Source/WebKit2:

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

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