diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-22 09:09:45 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-22 09:10:13 +0100 |
commit | 470286ecfe79d59df14944e5b5d34630fc739391 (patch) | |
tree | 43983212872e06cebefd2ae474418fa2908ca54c /Source/WebCore/css/CSSComputedStyleDeclaration.cpp | |
parent | 23037105e948c2065da5a937d3a2396b0ff45c1e (diff) | |
download | qtwebkit-470286ecfe79d59df14944e5b5d34630fc739391.tar.gz |
Imported WebKit commit e89504fa9195b2063b2530961d4b73dd08de3242 (http://svn.webkit.org/repository/webkit/trunk@135485)
Change-Id: I03774e5ac79721c13ffa30d152537a74d0b12e66
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebCore/css/CSSComputedStyleDeclaration.cpp')
-rw-r--r-- | Source/WebCore/css/CSSComputedStyleDeclaration.cpp | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp index 1e6d2079a..b127aa96a 100644 --- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp +++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp @@ -64,6 +64,10 @@ #include "WebKitFontFamilyNames.h" #include <wtf/text/StringBuilder.h> +#if ENABLE(CSS_EXCLUSIONS) +#include "ExclusionShapeValue.h" +#endif + #if ENABLE(CSS_SHADERS) #include "CustomFilterArrayParameter.h" #include "CustomFilterNumberParameter.h" @@ -183,6 +187,7 @@ static const CSSPropertyID computedProperties[] = { #if ENABLE(CSS3_TEXT) CSSPropertyWebkitTextDecorationLine, CSSPropertyWebkitTextDecorationStyle, + CSSPropertyWebkitTextAlignLast, #endif // CSS3_TEXT CSSPropertyTextIndent, CSSPropertyTextRendering, @@ -355,8 +360,8 @@ static const CSSPropertyID computedProperties[] = { #endif #if ENABLE(CSS_EXCLUSIONS) CSSPropertyWebkitWrapFlow, - CSSPropertyWebkitWrapMargin, - CSSPropertyWebkitWrapPadding, + CSSPropertyWebkitShapeMargin, + CSSPropertyWebkitShapePadding, CSSPropertyWebkitWrapThrough, #endif #if ENABLE(SVG) @@ -1003,13 +1008,12 @@ static PassRefPtr<CSSValue> valueForGridTrackList(const Vector<Length>& trackLen return list.release(); } -static PassRefPtr<CSSValue> valueForGridPosition(const Length& position) +static PassRefPtr<CSSValue> valueForGridPosition(const GridPosition& position) { if (position.isAuto()) return cssValuePool().createIdentifierValue(CSSValueAuto); - ASSERT(position.isFixed()); - return cssValuePool().createValue(position.value(), CSSPrimitiveValue::CSS_NUMBER); + return cssValuePool().createValue(position.integerPosition(), CSSPrimitiveValue::CSS_NUMBER); } static PassRefPtr<CSSValue> getDelayValue(const AnimationList* animList) @@ -2036,6 +2040,8 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert return renderTextDecorationFlagsToCSSValue(style->textDecoration()); case CSSPropertyWebkitTextDecorationStyle: return renderTextDecorationStyleFlagsToCSSValue(style->textDecorationStyle()); + case CSSPropertyWebkitTextAlignLast: + return cssValuePool().createValue(style->textAlignLast()); #endif // CSS3_TEXT case CSSPropertyWebkitTextDecorationsInEffect: return renderTextDecorationFlagsToCSSValue(style->textDecorationsInEffect()); @@ -2495,18 +2501,22 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert #if ENABLE(CSS_EXCLUSIONS) case CSSPropertyWebkitWrapFlow: return cssValuePool().createValue(style->wrapFlow()); - case CSSPropertyWebkitWrapMargin: - return cssValuePool().createValue(style->wrapMargin()); - case CSSPropertyWebkitWrapPadding: - return cssValuePool().createValue(style->wrapPadding()); + case CSSPropertyWebkitShapeMargin: + return cssValuePool().createValue(style->shapeMargin()); + case CSSPropertyWebkitShapePadding: + return cssValuePool().createValue(style->shapePadding()); case CSSPropertyWebkitShapeInside: if (!style->shapeInside()) return cssValuePool().createIdentifierValue(CSSValueAuto); - return valueForBasicShape(style->shapeInside()); + else if (style->shapeInside()->type() == ExclusionShapeValue::OUTSIDE) + return cssValuePool().createIdentifierValue(CSSValueOutsideShape); + ASSERT(style->shapeInside()->type() == ExclusionShapeValue::SHAPE); + return valueForBasicShape(style->shapeInside()->shape()); case CSSPropertyWebkitShapeOutside: if (!style->shapeOutside()) return cssValuePool().createIdentifierValue(CSSValueAuto); - return valueForBasicShape(style->shapeOutside()); + ASSERT(style->shapeOutside()->type() == ExclusionShapeValue::SHAPE); + return valueForBasicShape(style->shapeOutside()->shape()); case CSSPropertyWebkitWrapThrough: return cssValuePool().createValue(style->wrapThrough()); #endif |