CSS regions enabled by default
authormihnea@adobe.com <mihnea@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2012 20:44:00 +0000 (20:44 +0000)
committermihnea@adobe.com <mihnea@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2012 20:44:00 +0000 (20:44 +0000)
commitc74d0deed91343dc6042c714a9fa4721b66fadea
treee5afbe5531e0691002c1c67999483e7915305985
parentfd5c15a001467254488b59b88a45436f373fdeba
CSS regions enabled by default
https://bugs.webkit.org/show_bug.cgi?id=78525

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/regions/css-regions-disabled.html

Add a runtime preference to enable/disable regions functionality at runtime(WebKitCSSRegionsEnabled).
CSSRegions are still enabled by default.
In DRT, use layoutTestController.overridePreference("WebKitCSSRegionsEnabled", "0") to disable the css regions functionality.

* WebCore.xcodeproj/project.pbxproj:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::cssRegionsEnabled):
(WebCore):
(WebCore::CSSParser::parseFlowThread):
(WebCore::CSSParser::parseRegionThread):
(WebCore::CSSParser::createRegionRule):
* css/CSSParser.h:
* dom/Document.cpp:
(WebCore::Document::cssRegionsEnabled):
(WebCore):
(WebCore::Document::webkitGetFlowByName):
* dom/Document.h:
(Document):
* dom/Element.cpp:
(WebCore::Element::webkitRegionOverflow):
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setCSSRegionsEnabled):
(WebCore::Settings::cssRegionsEnabled):
(Settings):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):

Source/WebKit/chromium:

Add a runtime preference to enable/disable regions functionality at runtime(WebKitCSSRegionsEnabled).
CSSRegions are still enabled by default.
In DRT, use layoutTestController.overridePreference("WebKitCSSRegionsEnabled", "0") to disable the css regions functionality.

* public/WebSettings.h:
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setExperimentalCSSRegionsEnabled):
(WebKit):
* src/WebSettingsImpl.h:
(WebSettingsImpl):

Source/WebKit/mac:

Add a runtime preference to enable/disable regions functionality at runtime(WebKitCSSRegionsEnabled).
CSSRegions are still enabled by default.
In DRT, use layoutTestController.overridePreference("WebKitCSSRegionsEnabled", "0") to disable the css regions functionality.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences cssRegionsEnabled]):
(-[WebPreferences setCSSRegionsEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

Add a runtime preference to enable/disable regions functionality at runtime(WebKitCSSRegionsEnabled).
CSSRegions are still enabled by default.
In DRT, use layoutTestController.overridePreference("WebKitCSSRegionsEnabled", "0") to disable the css regions functionality.

* Shared/WebPreferencesStore.h:
(WebKit):
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetCSSRegionsEnabled):
(WKPreferencesGetCSSRegionsEnabled):
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

Add a runtime preference to enable/disable regions functionality at runtime(WebKitCSSRegionsEnabled).
CSSRegions are still enabled by default.
In DRT, use layoutTestController.overridePreference("WebKitCSSRegionsEnabled", "0") to disable the css regions functionality.

* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::overridePreference):
* DumpRenderTree/chromium/WebPreferences.cpp:
(WebPreferences::reset):
(WebPreferences::applyTo):
* DumpRenderTree/chromium/WebPreferences.h:
(WebPreferences):
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetDefaultsToConsistentValues):

LayoutTests:

Add a runtime preference to enable/disable regions functionality at runtime(WebKitCSSRegionsEnabled).
CSSRegions are still enabled by default.
In DRT, use layoutTestController.overridePreference("WebKitCSSRegionsEnabled", "0") to disable the css regions functionality.

* fast/regions/css-regions-disabled-expected.txt: Added.
* fast/regions/css-regions-disabled.html: Added.
* fast/regions/script-tests/css-regions-disabled.js: Added.
(testWebKitFlowInto):
(testWebKitFlowFrom):
(testWebKitRegionOverflow):
(testComputedStyleWebKitFlowInto):
(testComputedStyleWebKitFlowFrom):
(testComputedStyleWebKitRegionOverflow):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@108108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
37 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/regions/css-regions-disabled-expected.txt [new file with mode: 0644]
LayoutTests/fast/regions/css-regions-disabled.html [new file with mode: 0644]
LayoutTests/fast/regions/script-tests/css-regions-disabled.js [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/NodeRenderingContext.cpp
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebCore/rendering/RenderFlowThread.cpp
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderRegion.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebSettings.h
Source/WebKit/chromium/src/WebSettingsImpl.cpp
Source/WebKit/chromium/src/WebSettingsImpl.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/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPreferencesStore.h
Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Tools/ChangeLog
Tools/DumpRenderTree/chromium/LayoutTestController.cpp
Tools/DumpRenderTree/chromium/WebPreferences.cpp
Tools/DumpRenderTree/chromium/WebPreferences.h
Tools/DumpRenderTree/mac/DumpRenderTree.mm