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

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

Issue 2636253002: Handle nested position:sticky elements (Closed)
Patch Set: Remove accidental leftover whitespace 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/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 1bb5c34bf25a12f7bdcc9c3425b855fe1d446c5f..fb476e7358e30c478bc54e6f65bfb426dd2e9115 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -2073,6 +2073,10 @@ void LayoutObject::mapLocalToAncestor(const LayoutBoxModelObject* ancestor,
}
LayoutSize containerOffset = offsetFromContainer(container);
+ if (isBoxModelObject() && isStickyPositioned() && (mode & IgnoreSticky)) {
+ containerOffset -= toLayoutBoxModelObject(this)->offsetForInFlowPosition();
flackr 2017/01/31 18:33:00 It is a little unfortunate to calculate this offse
smcgruer 2017/01/31 20:42:16 Done.
+ }
+
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