| Index: third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.cpp b/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.cpp
|
| index ba7c6294bfe13c653b5eb1082cb3b0c88aa74297..6f65bbf4d6ce4070f5724dd33c4de558128707b2 100644
|
| --- a/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.cpp
|
| @@ -41,15 +41,12 @@ FillLayer* accessFillLayer(CSSPropertyID property, ComputedStyle& style) {
|
|
|
| struct FillLayerMethods {
|
| FillLayerMethods(CSSPropertyID property) {
|
| - isSet = nullptr;
|
| - getLength = nullptr;
|
| - setLength = nullptr;
|
| - clear = nullptr;
|
| switch (property) {
|
| case CSSPropertyBackgroundPositionX:
|
| case CSSPropertyWebkitMaskPositionX:
|
| isSet = &FillLayer::isXPositionSet;
|
| getLength = &FillLayer::xPosition;
|
| + getEdge = &FillLayer::backgroundXOrigin;
|
| setLength = &FillLayer::setXPosition;
|
| clear = &FillLayer::clearXPosition;
|
| break;
|
| @@ -57,6 +54,7 @@ struct FillLayerMethods {
|
| case CSSPropertyWebkitMaskPositionY:
|
| isSet = &FillLayer::isYPositionSet;
|
| getLength = &FillLayer::yPosition;
|
| + getEdge = &FillLayer::backgroundYOrigin;
|
| setLength = &FillLayer::setYPosition;
|
| clear = &FillLayer::clearYPosition;
|
| break;
|
| @@ -66,10 +64,11 @@ struct FillLayerMethods {
|
| }
|
| }
|
|
|
| - bool (FillLayer::*isSet)() const;
|
| - const Length& (FillLayer::*getLength)() const;
|
| - void (FillLayer::*setLength)(const Length&);
|
| - void (FillLayer::*clear)();
|
| + bool (FillLayer::*isSet)() const = nullptr;
|
| + const Length& (FillLayer::*getLength)() const = nullptr;
|
| + BackgroundEdgeOrigin (FillLayer::*getEdge)() const = nullptr;
|
| + void (FillLayer::*setLength)(const Length&) = nullptr;
|
| + void (FillLayer::*clear)() = nullptr;
|
| };
|
|
|
| } // namespace
|
| @@ -164,6 +163,14 @@ bool LengthListPropertyFunctions::getLengthList(CSSPropertyID property,
|
| FillLayerMethods fillLayerMethods(property);
|
| while (fillLayer && (fillLayer->*fillLayerMethods.isSet)()) {
|
| result.push_back((fillLayer->*fillLayerMethods.getLength)());
|
| + switch ((fillLayer->*fillLayerMethods.getEdge)()) {
|
| + case RightEdge:
|
| + case BottomEdge:
|
| + result.back() = result.back().subtractFromOneHundredPercent();
|
| + break;
|
| + default:
|
| + break;
|
| + }
|
| fillLayer = fillLayer->next();
|
| }
|
| return true;
|
|
|