diff options
Diffstat (limited to 'Source/WebCore/css/CSSComputedStyleDeclaration.cpp')
-rw-r--r-- | Source/WebCore/css/CSSComputedStyleDeclaration.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp index 3ffb7ff5c..ec20807bf 100644 --- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp +++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp @@ -157,6 +157,7 @@ static const CSSPropertyID computedProperties[] = { CSSPropertyRight, CSSPropertySpeak, CSSPropertyTableLayout, + CSSPropertyTabSize, CSSPropertyTextAlign, CSSPropertyTextDecoration, CSSPropertyTextIndent, @@ -1591,6 +1592,8 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert if (style->hasAutoColumnWidth()) return cssValuePool().createIdentifierValue(CSSValueAuto); return zoomAdjustedPixelValue(style->columnWidth(), style.get()); + case CSSPropertyTabSize: + return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValue::CSS_NUMBER); case CSSPropertyWebkitRegionBreakAfter: return cssValuePool().createValue(style->regionBreakAfter()); case CSSPropertyWebkitRegionBreakBefore: @@ -2343,12 +2346,8 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert case CSSPropertyWebkitFilter: return valueForFilter(style.get()); #endif - case CSSPropertyBackground: { - const CSSPropertyID properties[5] = { CSSPropertyBackgroundColor, CSSPropertyBackgroundImage, - CSSPropertyBackgroundRepeat, CSSPropertyBackgroundAttachment, - CSSPropertyBackgroundPosition }; - return getCSSPropertyValuesForShorthandProperties(StylePropertyShorthand(properties, WTF_ARRAY_LENGTH(properties))); - } + case CSSPropertyBackground: + return getBackgroundShorthandValue(); case CSSPropertyBorder: { RefPtr<CSSValue> value = getPropertyCSSValue(CSSPropertyBorderTop, DoNotUpdateLayout); const CSSPropertyID properties[3] = { CSSPropertyBorderRight, CSSPropertyBorderBottom, @@ -2695,4 +2694,17 @@ void CSSComputedStyleDeclaration::setPropertyInternal(CSSPropertyID, const Strin ec = NO_MODIFICATION_ALLOWED_ERR; } +PassRefPtr<CSSValueList> CSSComputedStyleDeclaration::getBackgroundShorthandValue() const +{ + // CSSPropertyBackgroundPosition should be at the end of the array so that CSSPropertyBackgroundSize can be appended followed by '/'. + static const CSSPropertyID properties[5] = { CSSPropertyBackgroundColor, CSSPropertyBackgroundImage, + CSSPropertyBackgroundRepeat, CSSPropertyBackgroundAttachment, + CSSPropertyBackgroundPosition }; + + RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); + list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShorthand(properties, WTF_ARRAY_LENGTH(properties)))); + list->append(getPropertyCSSValue(CSSPropertyBackgroundSize, DoNotUpdateLayout)); + return list.release(); +} + } // namespace WebCore |