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):
(WebCore):
(Document):
(WebCore):
(ChromeClient):
(WebCore::FrameView::layout):
(WebCore):
(WebCore::FrameView::paintContents):
(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.