Update the CSS property used to support draggable regions.
authorjianli@chromium.org <jianli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Oct 2012 00:06:59 +0000 (00:06 +0000)
committerjianli@chromium.org <jianli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Oct 2012 00:06:59 +0000 (00:06 +0000)
commitac799a36f58adbaf5f3bbee07ef6a88838d0d9b1
tree3fa79b078b3dc9459dae71e777e13259b5e3f8da
parentcfda68d18c255397f765070c55a7fde2e1eede38
Update the CSS property used to support draggable regions.
https://bugs.webkit.org/show_bug.cgi?id=97156

Reviewed by Adam Barth.

Source/JavaScriptCore:

The CSS property to support draggable regions, guarded under
WIDGET_REGION is now disabled from Mac WebKit, in order not to cause
confusion with DASHBOARD_SUPPORT feature.

* Configurations/FeatureDefines.xcconfig: Disable WIDGET_REGION feature.

Source/WebCore:

The CSS property to support draggable regions has been changed from
"-webkit-widget-region" to "-webkit-app-region" in the following syntax:
   -webkit-app-region: drag|no-drag

The CSS parsing code for draggable regions is now different from the CSS
parsing code for dashboard regions since we have quite different syntax.

We still try to share as much rendering update code as possible for
these two features. To make the shared code easier to understand for
both features, the name "DashboardRegions" in the shared code is changed
to "AnnotatedRegions" to work for both dashboard regions and draggable
regions.

Note that we still using WIDGET_REGION as feature name in order not to
add more changes to this patch. It will be renamed to a more appropriate
name in next patch. WIDGET_REGION is now only turned on for the chromium
port.

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

* Configurations/FeatureDefines.xcconfig: Disable WIDGET_REGION feature.
* WebCore.exp.in: Update the exported symbol due to renaming.
* css/CSSComputedStyleDeclaration.cpp: Update the CSS parsing.
(WebCore):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp: Update the CSS parsing.
(WebCore::CSSParser::parseValue):
(WebCore):
(WebCore::CSSParser::parseDashboardRegions):
* css/CSSParserValues.cpp: Update the CSS parsing.
(WebCore::CSSParserValue::createCSSValue):
* css/CSSPrimitiveValue.cpp: Update the CSS parsing.
(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::customCssText):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
(WebCore::CSSPrimitiveValue::reportDescendantMemoryUsage):
* css/CSSPrimitiveValue.h: Update the CSS parsing.
(CSSPrimitiveValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in: Rename the CSS property for draggable region.
* css/CSSValueKeywords.in: Add the keywords supported for the draggable region.
* css/DashboardRegion.h: Remove WIDGET_REGION guard.
(DashboardRegion):
* css/StyleResolver.cpp: Update the CSS parsing.
(WebCore::StyleResolver::collectMatchingRulesForList):
* dom/Document.cpp: Rename dashboardRegions to annotatedRegions.
(WebCore::Document::Document):
(WebCore::Document::annotatedRegions):
(WebCore::Document::setAnnotatedRegions):
(WebCore::Document::reportMemoryUsage):
* dom/Document.h: Rename dashboardRegions to annotatedRegions.
(WebCore):
(WebCore::Document::setAnnotatedRegionsDirty):
(WebCore::Document::annotatedRegionsDirty):
(WebCore::Document::hasAnnotatedRegions):
(WebCore::Document::setHasAnnotatedRegions):
(Document):
* page/Chrome.cpp: Rename dashboardRegions to annotatedRegions.
(WebCore::ChromeClient::annotatedRegionsChanged):
* page/ChromeClient.h: Rename dashboardRegions to annotatedRegions.
(ChromeClient):
* page/FrameView.cpp: Rename dashboardRegions to annotatedRegions.
(WebCore::FrameView::layout):
(WebCore::FrameView::updateAnnotatedRegions):
(WebCore::FrameView::paintContents):
* page/FrameView.h: Rename dashboardRegions to annotatedRegions.
(FrameView):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::addAnnotatedRegions):
* rendering/RenderInline.h: Rename dashboardRegions to annotatedRegions.
(RenderInline):
* rendering/RenderLayer.cpp: Rename dashboardRegions to annotatedRegions.
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::setHasHorizontalScrollbar):
(WebCore::RenderLayer::setHasVerticalScrollbar):
(WebCore::RenderLayer::updateScrollbarsAfterLayout):
* rendering/RenderListBox.cpp: Rename dashboardRegions to annotatedRegions.
(WebCore::RenderListBox::setHasVerticalScrollbar):
* rendering/RenderObject.cpp: Rename dashboardRegions to annotatedRegions.
(WebCore::RenderObject::styleWillChange):
(WebCore::RenderObject::addAnnotatedRegions):
(WebCore::RenderObject::collectAnnotatedRegions):
* rendering/RenderObject.h: Rename dashboardRegions to annotatedRegions.
(WebCore::AnnotatedRegionValue::operator==):
(WebCore::AnnotatedRegionValue::operator!=):
(AnnotatedRegionValue):
(RenderObject):
* rendering/style/RenderStyle.cpp: Update the CSS parsing.
(WebCore::RenderStyle::diff):
(WebCore):
* rendering/style/RenderStyle.h: Update the CSS parsing.
* rendering/style/RenderStyleConstants.h: Update the CSS parsing.
* rendering/style/StyleDashboardRegion.h: Update the CSS parsing.
* rendering/style/StyleRareNonInheritedData.cpp: Update the CSS parsing.
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h: Update the CSS parsing.
(WebCore):
(StyleRareNonInheritedData):

Source/WebKit/chromium:

Update the code to use the new name annotatedRegions to work for
both features.

* public/WebDraggableRegion.h: Rename dashboardRegions to annotatedRegions.
(WebDraggableRegion):
* src/ChromeClientImpl.cpp: Rename dashboardRegions to annotatedRegions.
(WebKit::ChromeClientImpl::annotatedRegionsChanged):
* src/ChromeClientImpl.h: Rename dashboardRegions to annotatedRegions.
(ChromeClientImpl):
* src/WebDocument.cpp: Rename dashboardRegions to annotatedRegions.
(WebKit::WebDocument::draggableRegions):

Source/WebKit/mac:

The CSS property to support draggable regions, guarded under
WIDGET_REGION is now disabled from Mac WebKit, in order not to cause
confusion with DASHBOARD_SUPPORT feature.

Also update the code to use the new name annotatedRegions to work for
both features.

* Configurations/FeatureDefines.xcconfig: Disable WIDGET_REGION feature.
* WebCoreSupport/WebChromeClient.h: Rename dashboardRegions to annotatedRegions.
* WebCoreSupport/WebChromeClient.mm: Rename dashboardRegions to annotatedRegions.
(WebChromeClient::annotatedRegionsChanged):
* WebView/WebView.mm: Rename dashboardRegions to annotatedRegions.
(-[WebView _dashboardRegions]):

Source/WebKit2:

The CSS property to support draggable regions, guarded under
WIDGET_REGION is now disabled from Mac WebKit, in order not to cause
confusion with DASHBOARD_SUPPORT feature.

Also update the code to use the new name annotatedRegions to work for
both features.

* Configurations/FeatureDefines.xcconfig: Disable WIDGET_REGION feature.
* WebProcess/WebCoreSupport/WebChromeClient.cpp: Rename dashboardRegions to annotatedRegions.
(WebKit::WebChromeClient::annotatedRegionsChanged):
* WebProcess/WebCoreSupport/WebChromeClient.h: Rename dashboardRegions to annotatedRegions.
(WebChromeClient):

LayoutTests:

Update the test and rename the files due to CSS property name and
syntax changes.

* fast/css/draggable-region-parser-expected.txt: Added.
* fast/css/draggable-region-parser.html: Added.
* fast/css/widget-region-parser-expected.txt: Removed.
* fast/css/widget-region-parser.html: Removed.
* platform/efl/TestExpectations: Rename the skipped test.
* platform/gtk/TestExpectations: Rename the skipped test.
* platform/mac/TestExpectations: Skip the renamed test since WIDGET_REGION is off.
* platform/qt/TestExpectations: Rename the skipped test.
* platform/win/TestExpectations: Rename the skipped test.
* platform/wincairo/TestExpectations: Rename the skipped test.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@130829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
58 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/draggable-region-parser-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/draggable-region-parser.html [new file with mode: 0644]
LayoutTests/fast/css/widget-region-parser-expected.txt [deleted file]
LayoutTests/fast/css/widget-region-parser.html [deleted file]
LayoutTests/platform/efl/TestExpectations
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/qt/TestExpectations
LayoutTests/platform/win/TestExpectations
LayoutTests/platform/wincairo/TestExpectations
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/WebCore.exp.in
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParserValues.cpp
Source/WebCore/css/CSSPrimitiveValue.cpp
Source/WebCore/css/CSSPrimitiveValue.h
Source/WebCore/css/CSSProperty.cpp
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/CSSValueKeywords.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/RenderStyleConstants.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/public/WebDraggableRegion.h
Source/WebKit/chromium/src/ChromeClientImpl.cpp
Source/WebKit/chromium/src/ChromeClientImpl.h
Source/WebKit/chromium/src/WebDocument.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/FeatureDefines.xcconfig
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h