Add new CSS property "-webkit-widget-region" to expose dashboard region support for...
authorjianli@chromium.org <jianli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Aug 2012 00:14:28 +0000 (00:14 +0000)
committerjianli@chromium.org <jianli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Aug 2012 00:14:28 +0000 (00:14 +0000)
commita2493e11e85525979789fc97a664e55331e4d216
tree57ab806dbcc6234b763b0103f720a33ca953f599
parenteb3c819e0516d140399d370e28b9922bc40f9197
Add new CSS property "-webkit-widget-region" to expose dashboard region support for other port
https://bugs.webkit.org/show_bug.cgi?id=90298

Reviewed by Adam Barth.

.:

* configure.ac: Add ENABLE_WIDGET_REGION define.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig: Add ENABLE_WIDGET_REGION define.

Source/WebCore:

The css property "-webkit-widget-region" is essentially a synonym of
"-webkit-dashboard-region" that allows us to expose dashboard region
support for other port. This patch also adds a new feature define
ENABLE(WIDGET_REGION) such that "-webkit-dashboard-region" is only
provided under ENABLE(DASHBOARD_SUPPORT) as it is now and
"-webkit-widget-region" is only exposed under ENABLE(WIDGET_REGION).

Change almost all the code pieces guarded by ENABLE(DASHBOARD_SUPPORT)
to make them also guarded by ENABLE(WIDGET_REGION), except those
that are specific to Apple/WebKit.

Currently ENABLE(WIDGET_REGION) has been turned on by default for
Mac/WebKit and chromium ports.

Test: fast/css/widget-region-parser.html

* Configurations/FeatureDefines.xcconfig: Add ENABLE_WIDGET_REGION define.
* DerivedSources.make:
* GNUmakefile.am: Add ENABLE_WIDGET_REGION define.
* WebCore.exp.in:
* css/CSSComputedStyleDeclaration.cpp: Handle CSSPropertyWebkitWidgetRegion.
(WebCore):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp: Parse "-webkit-widget-region".
(WebCore::CSSParser::parseValue):
(WebCore):
(WebCore::CSSParser::parseDashboardRegions):
* css/CSSProperty.cpp: Handle CSSPropertyWebkitWidgetRegion.
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPrimitiveValue.cpp:
(WebCore):
(WebCore::CSSPrimitiveValue::customCssText):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
* css/CSSPropertyNames.in: Add "-webkit-widget-region" property.
* css/DashboardRegion.h:
(DashboardRegion):
* css/StyleResolver.cpp: Handle CSSPropertyWebkitWidgetRegion.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore):
* dom/Document.h:
(WebCore):
(Document):
* page/Chrome.cpp:
(WebCore):
* page/ChromeClient.h:
(ChromeClient):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore):
(WebCore::FrameView::paintContents):
* page/FrameView.h:
(FrameView):
* rendering/RenderInline.cpp:
(WebCore):
* rendering/RenderInline.h:
(RenderInline):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::setHasHorizontalScrollbar):
(WebCore::RenderLayer::setHasVerticalScrollbar):
(WebCore::RenderLayer::updateScrollbarsAfterLayout):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::setHasVerticalScrollbar):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::styleWillChange):
(WebCore):
* rendering/RenderObject.h:
(RenderObject):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
(WebCore):
* rendering/style/RenderStyle.h:
* rendering/style/StyleDashboardRegion.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
(WebCore):
(StyleRareNonInheritedData):

Source/WebKit/chromium:

* features.gypi: Add ENABLE_WIDGET_REGION define.

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig: Add ENABLE_WIDGET_REGION define.

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig: Add ENABLE_WIDGET_REGION define.

LayoutTests:

Added a new test to test the new CSS property.

* fast/css/widget-region-parser-expected.txt: Added.
* fast/css/widget-region-parser.html: Added.
* platform/efl/Skipped: Skip the new test.
* platform/gtk/TestExpectations: Skip the new test.
* platform/qt/Skipped: Skip the new test.
* platform/win/Skipped: Skip the new test.
* platform/wincario/Skipped: Skip the new test.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@124389 268f45cc-cd09-0410-ab3c-d52691b4dbfc
47 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/fast/css/widget-region-parser-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/widget-region-parser.html [new file with mode: 0644]
LayoutTests/platform/efl/Skipped
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/qt/Skipped
LayoutTests/platform/win/Skipped
LayoutTests/platform/wincairo/Skipped
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/DerivedSources.make
Source/WebCore/GNUmakefile.am
Source/WebCore/WebCore.exp.in
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSPrimitiveValue.cpp
Source/WebCore/css/CSSProperty.cpp
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/DashboardRegion.h
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/page/Chrome.cpp
Source/WebCore/page/ChromeClient.h
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderInline.h
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderListBox.cpp
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/StyleDashboardRegion.h
Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
Source/WebCore/rendering/style/StyleRareNonInheritedData.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/features.gypi
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/FeatureDefines.xcconfig
configure.ac