diff options
author | Ben Murdoch <benm@google.com> | 2011-05-31 14:52:35 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-06-02 10:37:22 +0100 |
commit | 528d6eb2a23ee3cb19c267dc77ec4bd7647d597a (patch) | |
tree | 1ada8ba30b52dfcf3762c84295d095f7ae76f272 /Source/WebCore | |
parent | 29ff867282a96b4576cf08af3afb776c582c9397 (diff) | |
download | external_webkit-528d6eb2a23ee3cb19c267dc77ec4bd7647d597a.zip external_webkit-528d6eb2a23ee3cb19c267dc77ec4bd7647d597a.tar.gz external_webkit-528d6eb2a23ee3cb19c267dc77ec4bd7647d597a.tar.bz2 |
Merge WebKit at r80534: Fix CSSComputedStyleDeclaration.cpp
Update our uses of CSSPrimitiveValue following
http://trac.webkit.org/changeset/80463
Change-Id: I216382423f496b90af61b044b2a4bda9a6c322de
Diffstat (limited to 'Source/WebCore')
-rw-r--r-- | Source/WebCore/css/CSSComputedStyleDeclaration.cpp | 54 | ||||
-rw-r--r-- | Source/WebCore/css/CSSParser.cpp | 12 |
2 files changed, 18 insertions, 48 deletions
diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp index 8598d3d..a023fbd 100644 --- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp +++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp @@ -1097,15 +1097,11 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper case CSSPropertyEmptyCells: return primitiveValueCache->createValue(style->emptyCells()); case CSSPropertyFloat: -<<<<<<< HEAD #ifdef ANDROID_LAYOUT if (settings && settings->layoutAlgorithm() == Settings::kLayoutSSR) - return CSSPrimitiveValue::createIdentifier(CSSValueNone); + return primitiveValueCache->createIdentifierValue(CSSValueNone); #endif - return CSSPrimitiveValue::create(style->floating()); -======= return primitiveValueCache->createValue(style->floating()); ->>>>>>> WebKit at r80534 case CSSPropertyFontFamily: { const FontFamily& firstFamily = style->fontDescription().family(); if (!firstFamily.next()) @@ -1279,15 +1275,11 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper case CSSPropertyOverflowX: return primitiveValueCache->createValue(style->overflowX()); case CSSPropertyOverflowY: -<<<<<<< HEAD #ifdef ANDROID_LAYOUT if (settings && settings->layoutAlgorithm() == Settings::kLayoutSSR) - return CSSPrimitiveValue::createIdentifier(CSSValueVisible); + return primitiveValueCache->createIdentifierValue(CSSValueVisible); #endif - return CSSPrimitiveValue::create(style->overflowY()); -======= return primitiveValueCache->createValue(style->overflowY()); ->>>>>>> WebKit at r80534 case CSSPropertyPaddingTop: if (renderer && renderer->isBox()) return zoomAdjustedPixelValue(toRenderBox(renderer)->paddingTop(false), style.get(), primitiveValueCache); @@ -1316,15 +1308,11 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper return primitiveValueCache->createValue(style->pageBreakInside()); } case CSSPropertyPosition: -<<<<<<< HEAD #ifdef ANDROID_LAYOUT if (settings && settings->layoutAlgorithm() == Settings::kLayoutSSR) - return CSSPrimitiveValue::createIdentifier(CSSValueStatic); + return primitiveValueCache->createIdentifierValue(CSSValueStatic); #endif - return CSSPrimitiveValue::create(style->position()); -======= return primitiveValueCache->createValue(style->position()); ->>>>>>> WebKit at r80534 case CSSPropertyRight: return getPositionOffsetValue(style.get(), CSSPropertyRight, primitiveValueCache); case CSSPropertyTableLayout: @@ -1413,12 +1401,11 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper ASSERT_NOT_REACHED(); return 0; case CSSPropertyVisibility: -<<<<<<< HEAD #ifdef ANDROID_LAYOUT if (settings && settings->layoutAlgorithm() == Settings::kLayoutSSR) - return CSSPrimitiveValue::createIdentifier(CSSValueVisible); + return primitiveValueCache->createIdentifierValue(CSSValueVisible); #endif - return CSSPrimitiveValue::create(style->visibility()); + return primitiveValueCache->createValue(style->visibility()); case CSSPropertyWhiteSpace: #ifdef ANDROID_LAYOUT if (settings && settings->layoutAlgorithm() == Settings::kLayoutSSR) @@ -1426,21 +1413,16 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper case NORMAL: case NOWRAP: case KHTML_NOWRAP: - return CSSPrimitiveValue::createIdentifier(CSSValueNormal); + return primitiveValueCache->createIdentifierValue(CSSValueNormal); case PRE: case PRE_WRAP: - return CSSPrimitiveValue::createIdentifier(CSSValuePreWrap); + return primitiveValueCache->createIdentifierValue(CSSValuePreWrap); case PRE_LINE: - return CSSPrimitiveValue::createIdentifier(CSSValuePreLine); + return primitiveValueCache->createIdentifierValue(CSSValuePreLine); } else #endif - return CSSPrimitiveValue::create(style->whiteSpace()); -======= - return primitiveValueCache->createValue(style->visibility()); - case CSSPropertyWhiteSpace: return primitiveValueCache->createValue(style->whiteSpace()); ->>>>>>> WebKit at r80534 case CSSPropertyWidows: return primitiveValueCache->createValue(style->widows(), CSSPrimitiveValue::CSS_NUMBER); case CSSPropertyWidth: @@ -1825,27 +1807,27 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper // shorthand property currently not supported see bug 13658 break; case CSSPropertyWebkitRingFillColor: - return CSSPrimitiveValue::createColor(style->ringFillColor().rgb()); + return primitiveValueCache->createColorValue(style->ringFillColor().rgb()); case CSSPropertyWebkitRingInnerWidth: - return CSSPrimitiveValue::create(style->ringInnerWidth()); + return primitiveValueCache->createValue(style->ringInnerWidth()); case CSSPropertyWebkitRingOuterWidth: - return CSSPrimitiveValue::create(style->ringOuterWidth()); + return primitiveValueCache->createValue(style->ringOuterWidth()); case CSSPropertyWebkitRingOutset: - return CSSPrimitiveValue::create(style->ringOutset()); + return primitiveValueCache->createValue(style->ringOutset()); case CSSPropertyWebkitRingPressedInnerColor: - return CSSPrimitiveValue::createColor(style->ringPressedInnerColor().rgb()); + return primitiveValueCache->createColorValue(style->ringPressedInnerColor().rgb()); case CSSPropertyWebkitRingPressedOuterColor: - return CSSPrimitiveValue::createColor(style->ringPressedOuterColor().rgb()); + return primitiveValueCache->createColorValue(style->ringPressedOuterColor().rgb()); case CSSPropertyWebkitRingRadius: - return CSSPrimitiveValue::create(style->ringRadius()); + return primitiveValueCache->createValue(style->ringRadius()); case CSSPropertyWebkitRingSelectedInnerColor: - return CSSPrimitiveValue::createColor(style->ringSelectedInnerColor().rgb()); + return primitiveValueCache->createColorValue(style->ringSelectedInnerColor().rgb()); case CSSPropertyWebkitRingSelectedOuterColor: - return CSSPrimitiveValue::createColor(style->ringSelectedOuterColor().rgb()); + return primitiveValueCache->createColorValue(style->ringSelectedOuterColor().rgb()); #endif #ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR case CSSPropertyWebkitTapHighlightColor: - return CSSPrimitiveValue::createColor(style->tapHighlightColor().rgb()); + return primitiveValueCache->createColorValue(style->tapHighlightColor().rgb()); #endif #if ENABLE(SVG) case CSSPropertyClipPath: diff --git a/Source/WebCore/css/CSSParser.cpp b/Source/WebCore/css/CSSParser.cpp index 06e06e1..df8816c 100644 --- a/Source/WebCore/css/CSSParser.cpp +++ b/Source/WebCore/css/CSSParser.cpp @@ -226,14 +226,10 @@ void CSSParser::setupParser(const char* prefix, const String& string, const char void CSSParser::parseSheet(CSSStyleSheet* sheet, const String& string, int startLineNumber, StyleRuleRangeMap* ruleRangeMap) { -<<<<<<< HEAD #ifdef ANDROID_INSTRUMENT android::TimeCounter::start(android::TimeCounter::CSSParseTimeCounter); #endif - m_styleSheet = sheet; -======= setStyleSheet(sheet); ->>>>>>> WebKit at r80534 m_defaultNamespace = starAtom; // Reset the default namespace. m_ruleRangeMap = ruleRangeMap; if (ruleRangeMap) { @@ -254,14 +250,10 @@ void CSSParser::parseSheet(CSSStyleSheet* sheet, const String& string, int start PassRefPtr<CSSRule> CSSParser::parseRule(CSSStyleSheet* sheet, const String& string) { -<<<<<<< HEAD #ifdef ANDROID_INSTRUMENT android::TimeCounter::start(android::TimeCounter::CSSParseTimeCounter); #endif - m_styleSheet = sheet; -======= setStyleSheet(sheet); ->>>>>>> WebKit at r80534 m_allowNamespaceDeclarations = false; setupParser("@-webkit-rule{", string, "} "); cssyyparse(this); @@ -273,14 +265,10 @@ PassRefPtr<CSSRule> CSSParser::parseRule(CSSStyleSheet* sheet, const String& str PassRefPtr<CSSRule> CSSParser::parseKeyframeRule(CSSStyleSheet *sheet, const String &string) { -<<<<<<< HEAD #ifdef ANDROID_INSTRUMENT android::TimeCounter::start(android::TimeCounter::CSSParseTimeCounter); #endif - m_styleSheet = sheet; -======= setStyleSheet(sheet); ->>>>>>> WebKit at r80534 setupParser("@-webkit-keyframe-rule{ ", string, "} "); cssyyparse(this); #ifdef ANDROID_INSTRUMENT |