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

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

Issue 2650873002: Refactor PaintLayer location and offset calculation especially for floats (Closed)
Patch Set: - Created 3 years, 11 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/PaintLayer.h
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.h b/third_party/WebKit/Source/core/paint/PaintLayer.h
index f57327cb49e3d2069ecee19945971cf364253502..9442fb952afe7347eeea54281b24f2dbe127ac35 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.h
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.h
@@ -337,15 +337,17 @@ class CORE_EXPORT PaintLayer : public DisplayItemClient {
return m_isAllScrollingContentComposited;
}
- // Gets the ancestor layer that serves as the containing block of this layer.
- // This is either another out of flow positioned layer, or one that contains
- // paint. If |ancestor| is specified, |*skippedAncestor| will be set to true
- // if |ancestor| is found in the ancestry chain between this layer and the
+ // Gets the ancestor layer that serves as the containing block (in the sense
+ // of LayoutObject::container() instead of LayoutObject::containingBlock())
+ // of this layer. Normally the parent layer is the containing layer, except
+ // for out of flow positioned, floating and multicol spanner layers whose
+ // parent layer might not be the containing block.
chrishtr 2017/01/25 21:06:40 I think "might not be the containing block" is inc
Xianzhu 2017/01/25 22:14:10 I think it's correct, but may be confusing. Would
chrishtr 2017/01/27 00:36:22 Oh. You're saying parent() != container() in some
+ // If |ancestor| is specified, |*skippedAncestor| will be set to true if
+ // |ancestor| is found in 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* containingLayerForOutOfFlowPositioned(
- const PaintLayer* ancestor = nullptr,
- bool* skippedAncestor = nullptr) const;
+ PaintLayer* containingLayer(const PaintLayer* ancestor = nullptr,
+ bool* skippedAncestor = nullptr) const;
bool isPaintInvalidationContainer() const;
@@ -1207,7 +1209,7 @@ class CORE_EXPORT PaintLayer : public DisplayItemClient {
PaintLayer* m_first;
PaintLayer* m_last;
- // Our (x,y) coordinates are in our parent layer's coordinate space.
+ // Our (x,y) coordinates are in our containing layer's coordinate space.
LayoutPoint m_location;
// The layer's size.

Powered by Google App Engine
This is Rietveld 408576698