| Index: Source/core/css/CSSBasicShapes.cpp
|
| diff --git a/Source/core/css/CSSBasicShapes.cpp b/Source/core/css/CSSBasicShapes.cpp
|
| index 8af835b6039e250a0593a722076f1d80a18c641a..562234c97b2d9c6c1fb7cacf26df72f3d7262617 100644
|
| --- a/Source/core/css/CSSBasicShapes.cpp
|
| +++ b/Source/core/css/CSSBasicShapes.cpp
|
| @@ -69,13 +69,13 @@ static String buildCircleString(const String& radius, const String& centerX, con
|
|
|
| static String serializePositionOffset(const Pair& offset, const Pair& other)
|
| {
|
| - if ((toCSSPrimitiveValue(*offset.first()).getValueID() == CSSValueLeft && toCSSPrimitiveValue(*other.first()).getValueID() == CSSValueTop)
|
| - || (toCSSPrimitiveValue(*offset.first()).getValueID() == CSSValueTop && toCSSPrimitiveValue(*other.first()).getValueID() == CSSValueLeft))
|
| - return offset.second()->cssText();
|
| + if ((offset.first().getValueID() == CSSValueLeft && other.first().getValueID() == CSSValueTop)
|
| + || (offset.first().getValueID() == CSSValueTop && other.first().getValueID() == CSSValueLeft))
|
| + return offset.second().cssText();
|
| return offset.cssText();
|
| }
|
|
|
| -static CSSPrimitiveValue buildSerializablePositionOffset(NullableCSSValue offset, CSSValueID defaultSide)
|
| +static CSSPrimitiveValue buildSerializablePositionOffset(const NullableCSSValue& offset, CSSValueID defaultSide)
|
| {
|
| CSSValueID side = defaultSide;
|
| NullableCSSValue amount;
|
| @@ -85,7 +85,7 @@ static CSSPrimitiveValue buildSerializablePositionOffset(NullableCSSValue offset
|
| } else if (toCSSPrimitiveValue(*offset).isValueID()) {
|
| side = toCSSPrimitiveValue(*offset).getValueID();
|
| } else if (Pair* pair = toCSSPrimitiveValue(*offset).getPairValue()) {
|
| - side = toCSSPrimitiveValue(*pair->first()).getValueID();
|
| + side = pair->first().getValueID();
|
| amount = pair->second();
|
| } else {
|
| amount = offset;
|
| @@ -378,15 +378,14 @@ static String buildInsetString(const String& top, const String& right, const Str
|
| return result.toString();
|
| }
|
|
|
| -static inline void updateCornerRadiusWidthAndHeight(NullableCSSValue corner, String& width, String& height)
|
| +static inline void updateCornerRadiusWidthAndHeight(const NullableCSSValue& corner, String& width, String& height)
|
| {
|
| if (!corner)
|
| return;
|
|
|
| Pair* radius = toCSSPrimitiveValue(*corner).getPairValue();
|
| - width = radius->first() ? radius->first()->cssText() : String("0");
|
| - if (radius->second())
|
| - height = radius->second()->cssText();
|
| + width = radius->first().cssText();
|
| + height = radius->second().cssText();
|
| }
|
|
|
| String CSSBasicShapeInset::cssText() const
|
|
|