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

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

Issue 2890583002: Fix incorrect use of coords conversion for sticky elements (Closed)
Patch Set: Created 3 years, 7 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.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index d32a33b2099e1afdf3d1bd22c7f86039d7e7428b..6970d489fcac0acbc4cd83166bf325261c1113cb 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -1488,7 +1488,8 @@ static inline const PaintLayer* AccumulateOffsetTowardsAncestor(
}
void PaintLayer::ConvertToLayerCoords(const PaintLayer* ancestor_layer,
- LayoutPoint& location) const {
+ LayoutPoint& location,
+ bool* is_descendant) const {
if (ancestor_layer == this)
return;
@@ -1496,6 +1497,9 @@ void PaintLayer::ConvertToLayerCoords(const PaintLayer* ancestor_layer,
while (curr_layer && curr_layer != ancestor_layer)
curr_layer =
AccumulateOffsetTowardsAncestor(curr_layer, ancestor_layer, location);
+
+ if (is_descendant)
+ *is_descendant = curr_layer == ancestor_layer;
}
void PaintLayer::ConvertToLayerCoords(const PaintLayer* ancestor_layer,

Powered by Google App Engine
This is Rietveld 408576698