Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(691)

Unified Diff: third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp

Issue 2068723002: Paint local attachment backgrounds into composited scrolling contents layer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve opaque layer detection and fix non-composited border painting bug in layout tests. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698