Ignore:
Timestamp:
Aug 1, 2012, 5:14:28 PM (13 years ago)
Author:
[email protected]
Message:

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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSPrimitiveValue.cpp

    r122694 r124389  
    4444#include <wtf/text/StringBuilder.h>
    4545
    46 #if ENABLE(DASHBOARD_SUPPORT)
     46#if ENABLE(DASHBOARD_SUPPORT) || ENABLE(WIDGET_REGION)
    4747#include "DashboardRegion.h"
    4848#endif
     
    331331}
    332332
    333 #if ENABLE(DASHBOARD_SUPPORT)
     333#if ENABLE(DASHBOARD_SUPPORT) || ENABLE(WIDGET_REGION)
    334334void CSSPrimitiveValue::init(PassRefPtr<DashboardRegion> r)
    335335{
     
    10611061            }
    10621062            break;
    1063 #if ENABLE(DASHBOARD_SUPPORT)
     1063#if ENABLE(DASHBOARD_SUPPORT) || ENABLE(WIDGET_REGION)
    10641064        case CSS_DASHBOARD_REGION:
    10651065            for (DashboardRegion* region = getDashboardRegionValue(); region; region = region->m_next.get()) {
    10661066                if (!text.isEmpty())
    10671067                    text.append(' ');
     1068#if ENABLE(DASHBOARD_SUPPORT) && ENABLE(WIDGET_REGION)
     1069                text += region->m_cssFunctionName;
     1070#elif ENABLE(DASHBOARD_SUPPORT)
    10681071                text += "dashboard-region(";
     1072#else
     1073                text += "region(";
     1074#endif
    10691075                text += region->m_label;
    10701076                if (region->m_isCircle)
     
    11891195        result = CSSPrimitiveValue::create(m_value.pair);
    11901196        break;
    1191 #if ENABLE(DASHBOARD_SUPPORT)
     1197#if ENABLE(DASHBOARD_SUPPORT) || ENABLE(WIDGET_REGION)
    11921198    case CSS_DASHBOARD_REGION:
    11931199        // DashboardRegion is not exposed to the CSSOM, no need for a deep clone.
Note: See TracChangeset for help on using the changeset viewer.