| 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 d362ad3ed16f1828ee47cc99cdce66ee2ddaf6cc..4b1fd59c0f80c3db69a40beb0bdc2e5986400742 100644
|
| --- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| @@ -448,6 +448,22 @@ static CSSValueList* valueForItemPositionWithOverflowAlignment(const StyleSelfAl
|
| return result;
|
| }
|
|
|
| +static CSSValue* valueForOffsetPath(const StylePath* styleMotionPath)
|
| +{
|
| + if (styleMotionPath)
|
| + return styleMotionPath->computedCSSValue();
|
| + return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| +}
|
| +
|
| +static CSSValue* valueForOffsetRotation(const StyleOffsetRotation& offsetRotation)
|
| +{
|
| + CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| + if (offsetRotation.type == OffsetRotationAuto)
|
| + list->append(*CSSPrimitiveValue::createIdentifier(CSSValueAuto));
|
| + list->append(*CSSPrimitiveValue::create(offsetRotation.angle, CSSPrimitiveValue::UnitType::Degrees));
|
| + return list;
|
| +}
|
| +
|
| static CSSValueList* valuesForGridShorthand(const StylePropertyShorthand& shorthand, const ComputedStyle& style, const LayoutObject* layoutObject, Node* styledNode, bool allowVisitedStyle)
|
| {
|
| CSSValueList* list = CSSValueList::createSlashSeparated();
|
| @@ -1571,6 +1587,25 @@ CSSValue* ComputedStyleCSSValueMapping::valueForFont(const ComputedStyle& style)
|
| return list;
|
| }
|
|
|
| +CSSValue* ComputedStyleCSSValueMapping::valueForOffset(const ComputedStyle& style)
|
| +{
|
| + CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| + if (style.offsetPosition() != ComputedStyle::initialOffsetPosition())
|
| + list->append(*valueForPosition(style.offsetPosition(), style));
|
| +
|
| + list->append(*valueForOffsetPath(style.offsetPath()));
|
| + list->append(*zoomAdjustedPixelValueForLength(style.offsetDistance(), style));
|
| + list->append(*valueForOffsetRotation(style.offsetRotation()));
|
| +
|
| + if (style.offsetAnchor() == ComputedStyle::initialOffsetAnchor())
|
| + return list;
|
| +
|
| + CSSValueList* outerList = CSSValueList::createSlashSeparated();
|
| + outerList->append(*list);
|
| + outerList->append(*valueForPosition(style.offsetAnchor(), style));
|
| + return outerList;
|
| +}
|
| +
|
| static CSSValue* valueForScrollSnapDestination(const LengthPoint& destination, const ComputedStyle& style)
|
| {
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| @@ -2740,7 +2775,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| return valuesForShorthandProperty(motionShorthand(), style, layoutObject, styledNode, allowVisitedStyle);
|
|
|
| case CSSPropertyOffset:
|
| - return valuesForShorthandProperty(offsetShorthand(), style, layoutObject, styledNode, allowVisitedStyle);
|
| + return valueForOffset(style);
|
|
|
| case CSSPropertyOffsetAnchor:
|
| return valueForPosition(style.offsetAnchor(), style);
|
| @@ -2749,20 +2784,13 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| return valueForPosition(style.offsetPosition(), style);
|
|
|
| case CSSPropertyOffsetPath:
|
| - if (const StylePath* styleMotionPath = style.offsetPath())
|
| - return styleMotionPath->computedCSSValue();
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return valueForOffsetPath(style.offsetPath());
|
|
|
| case CSSPropertyOffsetDistance:
|
| return zoomAdjustedPixelValueForLength(style.offsetDistance(), style);
|
|
|
| - case CSSPropertyOffsetRotation: {
|
| - CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| - if (style.offsetRotation().type == OffsetRotationAuto)
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueAuto));
|
| - list->append(*CSSPrimitiveValue::create(style.offsetRotation().angle, CSSPrimitiveValue::UnitType::Degrees));
|
| - return list;
|
| - }
|
| + case CSSPropertyOffsetRotation:
|
| + return valueForOffsetRotation(style.offsetRotation());
|
|
|
| // Unimplemented CSS 3 properties (including CSS3 shorthand properties).
|
| case CSSPropertyWebkitTextEmphasis:
|
|
|