Index: third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp |
diff --git a/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp b/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp |
index 919d296d7aa9812f00f22d05acee38c26ae05c13..a60558c2c6808b0019c43447baf70d929818fc67 100644 |
--- a/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp |
+++ b/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp |
@@ -252,7 +252,7 @@ void BackgroundImageGeometry::useFixedAttachment(const LayoutPoint& attachmentPo |
} |
void BackgroundImageGeometry::calculate(const LayoutBoxModelObject& obj, const LayoutBoxModelObject* paintContainer, |
- const GlobalPaintFlags globalPaintFlags, const FillLayer& fillLayer, const LayoutRect& paintRect) |
+ const GlobalPaintFlags globalPaintFlags, const FillLayer& fillLayer, const LayoutRect& paintRect, const bool layerIncludesBorders) |
{ |
LayoutUnit left; |
LayoutUnit top; |
@@ -289,10 +289,12 @@ void BackgroundImageGeometry::calculate(const LayoutBoxModelObject& obj, const L |
LayoutUnit bottom; |
// Scroll and Local. |
if (fillLayer.origin() != BorderFillBox) { |
- left = LayoutUnit(positioningBox.borderLeft()); |
- right = LayoutUnit(positioningBox.borderRight()); |
- top = LayoutUnit(positioningBox.borderTop()); |
- bottom = LayoutUnit(positioningBox.borderBottom()); |
+ if (layerIncludesBorders) { |
+ left = LayoutUnit(positioningBox.borderLeft()); |
+ right = LayoutUnit(positioningBox.borderRight()); |
+ top = LayoutUnit(positioningBox.borderTop()); |
+ bottom = LayoutUnit(positioningBox.borderBottom()); |
+ } |
if (fillLayer.origin() == ContentFillBox) { |
left += positioningBox.paddingLeft(); |
right += positioningBox.paddingRight(); |