| Index: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| index ef1ab3cf7ccbbe200a8d81e6721fd1ec322a133f..bed53b629764315c2da3d21a21fd90488b8b60c9 100644
|
| --- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| @@ -579,6 +579,18 @@ static CSSPrimitiveValue* valueForLineHeight(const ComputedStyle& style)
|
| return zoomAdjustedPixelValue(floatValueForLength(length, style.getFontDescription().computedSize()), style);
|
| }
|
|
|
| +static CSSValue* valueForOffsetPosition(const LengthPoint& position, const ComputedStyle& style)
|
| +{
|
| + DCHECK((position.x() == Auto) == (position.y() == Auto));
|
| + if (position.x() == Auto) {
|
| + return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
|
| + }
|
| + CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| + list->append(*zoomAdjustedPixelValueForLength(position.x(), style));
|
| + list->append(*zoomAdjustedPixelValueForLength(position.y(), style));
|
| + return list;
|
| +}
|
| +
|
| static CSSValueID identifierForFamily(const AtomicString& family)
|
| {
|
| if (family == FontFamilyNames::webkit_cursive)
|
| @@ -2522,6 +2534,10 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| }
|
| return list;
|
| }
|
| + case CSSPropertyOffsetAnchor:
|
| + return valueForOffsetPosition(style.offsetAnchor(), style);
|
| + case CSSPropertyOffsetPosition:
|
| + return valueForOffsetPosition(style.offsetPosition(), style);
|
| case CSSPropertyWebkitRtlOrdering:
|
| return CSSPrimitiveValue::createIdentifier(style.rtlOrdering() ? CSSValueVisual : CSSValueLogical);
|
| case CSSPropertyWebkitTapHighlightColor:
|
| @@ -2712,19 +2728,22 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case CSSPropertyMotion:
|
| return valuesForShorthandProperty(motionShorthand(), style, layoutObject, styledNode, allowVisitedStyle);
|
|
|
| - case CSSPropertyMotionPath:
|
| - if (const StylePath* styleMotionPath = style.motionPath())
|
| + case CSSPropertyOffset:
|
| + return valuesForShorthandProperty(offsetShorthand(), style, layoutObject, styledNode, allowVisitedStyle);
|
| +
|
| + case CSSPropertyOffsetPath:
|
| + if (const StylePath* styleMotionPath = style.offsetPath())
|
| return styleMotionPath->computedCSSValue();
|
| return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
|
|
| - case CSSPropertyMotionOffset:
|
| - return zoomAdjustedPixelValueForLength(style.motionOffset(), style);
|
| + case CSSPropertyOffsetDistance:
|
| + return zoomAdjustedPixelValueForLength(style.offsetDistance(), style);
|
|
|
| - case CSSPropertyMotionRotation: {
|
| + case CSSPropertyOffsetRotation: {
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| - if (style.motionRotation().type == MotionRotationAuto)
|
| + if (style.offsetRotation().type == OffsetRotationAuto)
|
| list->append(*CSSPrimitiveValue::createIdentifier(CSSValueAuto));
|
| - list->append(*CSSPrimitiveValue::create(style.motionRotation().angle, CSSPrimitiveValue::UnitType::Degrees));
|
| + list->append(*CSSPrimitiveValue::create(style.offsetRotation().angle, CSSPrimitiveValue::UnitType::Degrees));
|
| return list;
|
| }
|
|
|
| @@ -3009,3 +3028,4 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| }
|
|
|
| } // namespace blink
|
| +
|
|
|