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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2636253002: Handle nested position:sticky elements (Closed)
Patch Set: Trying to add cc unittest, fails for unknown reason Created 3 years, 10 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/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index d06a1caa1e8eeb00b209db861ca386bb3eadde08..33ba14784cca28fca01a807ede5074541bd9b565 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -2073,6 +2073,14 @@ void LayoutObject::mapLocalToAncestor(const LayoutBoxModelObject* ancestor,
}
LayoutSize containerOffset = offsetFromContainer(container);
+
+ // TODO(smcgruer): Don't include offsetForInFlowPosition in
+ // offsetFromContainer when IgnoreStickyOffset is set.
+ if (isBoxModelObject() && isStickyPositioned() &&
+ (mode & IgnoreStickyOffset)) {
+ containerOffset -= toLayoutBoxModelObject(this)->offsetForInFlowPosition();
+ }
+
if (isLayoutFlowThread()) {
// So far the point has been in flow thread coordinates (i.e. as if
// everything in the fragmentation context lived in one tall single column).

Powered by Google App Engine
This is Rietveld 408576698