Make the IFRAME_SEAMLESS flag runtime-enabled.
authormkwst@chromium.org <mkwst@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Jan 2013 21:45:42 +0000 (21:45 +0000)
committermkwst@chromium.org <mkwst@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Jan 2013 21:45:42 +0000 (21:45 +0000)
commit2308531d0b5566656378ee176c0ac39a201442df
tree18d2d3a3e57d9ab2cd05fa8ecd10fae7e91da371
parent78ff1e0d360466fc01ba36880c269e100e796f91
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: https://svn.webkit.org/repository/webkit/trunk@138983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
35 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
Source/WebCore/dom/Document.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebRuntimeFeatures.h
Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h
Source/WebKit/efl/ewk/ewk_view.cpp
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebPreferencesPrivate.h
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
Tools/ChangeLog
Tools/DumpRenderTree/chromium/TestShell.cpp
Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp
Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp