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 6f6d9465840e73bf9bd1165904ccfc566da9bce8..56813871afa728e1882bfb1d086ebab88f429e4c 100644 |
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
@@ -247,6 +247,14 @@ static CSSValue* valueForPositionOffset(const ComputedStyle& style, CSSPropertyI |
if (offset.isAuto()) |
return cssValuePool().createIdentifierValue(CSSValueAuto); |
+ if (layoutObject) { |
+ if (!opposite.isAuto() && layoutObject->isInFlowPositioned()) { |
+ LayoutBlock* container = layoutObject->containingBlock(); |
+ bool ltr = container->style()->isLeftToRightDirection(); |
+ if ((propertyID == CSSPropertyLeft && !ltr) || (propertyID == CSSPropertyRight && ltr) || (propertyID == CSSPropertyBottom)) |
+ return zoomAdjustedPixelValue(-opposite.pixels(), style); |
+ } |
+ } |
return zoomAdjustedPixelValueForLength(offset, style); |
} |