Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(516)

Unified Diff: Source/core/css/LayoutStyleCSSValueMapping.cpp

Issue 1007253006: Remove CSSValueList::equals(const CSSValue&) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/CSSValueList.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/LayoutStyleCSSValueMapping.cpp
diff --git a/Source/core/css/LayoutStyleCSSValueMapping.cpp b/Source/core/css/LayoutStyleCSSValueMapping.cpp
index a9df62ebd833142dbd5951407bfd2c6901d78d5f..4c8dbb4a7f6c217611e9f6c83b2b803f3fb056d7 100644
--- a/Source/core/css/LayoutStyleCSSValueMapping.cpp
+++ b/Source/core/css/LayoutStyleCSSValueMapping.cpp
@@ -1549,14 +1549,8 @@ PassRefPtrWillBeRawPtr<CSSValue> LayoutStyleCSSValueMapping::get(CSSPropertyID p
computedFont->family = valueForFontFamily(style);
return computedFont.release();
}
- case CSSPropertyFontFamily: {
- RefPtrWillBeRawPtr<CSSValueList> fontFamilyList = valueForFontFamily(style);
- // If there's only a single family, return that as a CSSPrimitiveValue.
- // NOTE: Gecko always returns this as a comma-separated CSSPrimitiveValue string.
- if (fontFamilyList->length() == 1)
- return fontFamilyList->item(0);
- return fontFamilyList.release();
- }
+ case CSSPropertyFontFamily:
+ return valueForFontFamily(style);
case CSSPropertyFontSize:
return valueForFontSize(style);
case CSSPropertyFontSizeAdjust:
@@ -1883,21 +1877,15 @@ PassRefPtrWillBeRawPtr<CSSValue> LayoutStyleCSSValueMapping::get(CSSPropertyID p
}
}
case CSSPropertyTextIndent: {
- // If RuntimeEnabledFeatures::css3TextEnabled() returns false or text-indent has only one value(<length> | <percentage>),
- // getPropertyCSSValue() returns CSSValue.
- // If RuntimeEnabledFeatures::css3TextEnabled() returns true and text-indent has each-line or hanging,
- // getPropertyCSSValue() returns CSSValueList.
- RefPtrWillBeRawPtr<CSSValue> textIndent = zoomAdjustedPixelValueForLength(style.textIndent(), style);
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ list->append(zoomAdjustedPixelValueForLength(style.textIndent(), style));
if (RuntimeEnabledFeatures::css3TextEnabled() && (style.textIndentLine() == TextIndentEachLine || style.textIndentType() == TextIndentHanging)) {
- RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
- list->append(textIndent.release());
if (style.textIndentLine() == TextIndentEachLine)
list->append(cssValuePool().createIdentifierValue(CSSValueEachLine));
if (style.textIndentType() == TextIndentHanging)
list->append(cssValuePool().createIdentifierValue(CSSValueHanging));
- return list.release();
}
- return textIndent.release();
+ return list.release();
}
case CSSPropertyTextShadow:
return valueForShadowList(style.textShadow(), style, false);
« no previous file with comments | « Source/core/css/CSSValueList.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698