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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.h

Issue 1490063002: Implement Paint Containment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unnecessary adjustStyleForContainment declaration Created 5 years 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/PaintLayer.h
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.h b/third_party/WebKit/Source/core/paint/PaintLayer.h
index ccb457742376b6f94f3383fbf753d21ff1483e1b..eda95c5359342ef60c55dd8a563187b4ef3d7c71 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.h
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.h
@@ -266,7 +266,7 @@ public:
// the ancestry chain between this layer and the containing block layer; if not found, it will
// be set to false. Either both |ancestor| and |skippedAncestor| should be nullptr, or none of
// them should.
- PaintLayer* enclosingPositionedAncestor(const PaintLayer* ancestor = nullptr, bool* skippedAncestor = nullptr) const;
+ PaintLayer* enclosingPositionedOrContainedAncestor(const PaintLayer* ancestor = nullptr, bool* skippedAncestor = nullptr) const;
bool isPaintInvalidationContainer() const;
@@ -463,7 +463,7 @@ public:
// LayoutObject::canContainFixedPositionObjects() should probably be used
// instead.
LayoutBoxModelObject* layerlayoutObject = layoutObject();
- return isRootLayer() || layerlayoutObject->isPositioned() || hasTransformRelatedProperty();
+ return isRootLayer() || layerlayoutObject->isPositioned() || hasTransformRelatedProperty() || layerlayoutObject->style()->containsPaint();
chrishtr 2015/12/09 01:41:46 It's not really positioned..
leviw_travelin_and_unemployed 2015/12/09 21:09:24 That's because this method and its one caller, des
}
bool scrollsOverflow() const;

Powered by Google App Engine
This is Rietveld 408576698