Make the IFRAME_SEAMLESS flag runtime-enabled.
https://bugs.webkit.org/show_bug.cgi?id=106213

Reviewed by Ojan Vafai.

Source/WebCore:

Seamless IFrames live behind the IFRAME_SEAMLESS compile-time flag, this
patch adds another layer to that in order to enable runtime decisions
about when it should be active. This will allow ports (Chromium, for
instance) to toggle the feature on/off for particular builds without
recompiling from scratch.

* WebCore.exp.in:
* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore):
* bindings/generic/RuntimeEnabledFeatures.h:
(RuntimeEnabledFeatures):
(WebCore::RuntimeEnabledFeatures::seamlessIFramesEnabled):
(WebCore::RuntimeEnabledFeatures::setSeamlessIFramesEnabled):
    Add seamless IFrames to the set of runtime controlled features.
* dom/Document.cpp:
(WebCore::Document::shouldDisplaySeamlesslyWithParent):
    If seamless IFrames aren't runtime enabled, always return false from
    Document::shouldDisplaySeamlesslyWithParent. As this method already
    acts as the single gate that controls the rest of the system, it's
    the only place we need to make the runtime check.

Source/WebKit/chromium:

* public/WebRuntimeFeatures.h:
(WebRuntimeFeatures):
* src/WebRuntimeFeatures.cpp:
(WebKit::WebRuntimeFeatures::enableSeamlessIFrames):
(WebKit):
(WebKit::WebRuntimeFeatures::areSeamlessIFramesEnabled):
    Expose the new runtime feature to the Chromium port.

Source/WebKit/efl:

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::setSeamlessIFramesEnabled):
* WebCoreSupport/DumpRenderTreeSupportEfl.h:
* ewk/ewk_view.cpp:
(_ewk_view_priv_new):
    Add a toggle for seamless IFrames to EFL's DRTSuport.

Source/WebKit/gtk:

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
* WebCoreSupport/DumpRenderTreeSupportGtk.h:
(DumpRenderTreeSupportGtk):
    Add a toggle for seamless IFrames to GTK's DRTSuport.

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences seamlessIFramesEnabled]):
(-[WebPreferences setSeamlessIFramesEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
    Add a seamless IFrame preference to WebPreferences, and use it to
    toggle the runtime state of the feature as appropriate.

Source/WebKit/qt:

* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::setSeamlessIFramesEnabled):
* WebCoreSupport/DumpRenderTreeSupportQt.h:
    Add a toggle for seamless IFrames to QT's DRTSuport.

Source/WebKit2:

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetSeamlessIFramesEnabled):
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setSeamlessIFramesEnabled):
(WebKit):
* WebProcess/InjectedBundle/InjectedBundle.h:
(InjectedBundle):
    Add a toggle for seamless IFrames to InjectedBundle, and set it to
    true when beginning testing.

Tools:

* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::TestShell):
* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::resetDefaultsToConsistentValues):
* DumpRenderTree/gtk/DumpRenderTree.cpp:
(resetDefaultsToConsistentValues):
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetDefaultsToConsistentValues):
* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebCore::WebPage::resetSettings):
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
    Ensure that seamless IFrames are enabled for layout tests in each of
    the ports that support seamless IFrames.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] fast/speech/scripted/navigate-away.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=106249

* platform/chromium/TestExpectations: Marked as flaky.

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