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

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

Issue 2636253002: Handle nested position:sticky elements (Closed)
Patch Set: Ignore position:sticky offsets when computing localToAncestorQuad offsets 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..ce671c30483a43332c6d8515cf72df8b4f501927 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -2072,7 +2072,8 @@ void LayoutObject::mapLocalToAncestor(const LayoutBoxModelObject* ancestor,
}
}
- LayoutSize containerOffset = offsetFromContainer(container);
+ LayoutSize containerOffset =
+ offsetFromContainer(container, mode & IgnoreSticky);
flackr 2017/01/31 00:20:33 I think this might be cleaner if we add staticOffs
smcgruer 2017/01/31 16:07:06 I've gone for the direct removal for now. It's not
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).
@@ -2306,7 +2307,8 @@ TransformationMatrix LayoutObject::localToAncestorTransform(
return transformState.accumulatedTransform();
}
-LayoutSize LayoutObject::offsetFromContainer(const LayoutObject* o) const {
+LayoutSize LayoutObject::offsetFromContainer(const LayoutObject* o,
+ bool ignoreSticky) const {
ASSERT(o == container());
return o->hasOverflowClip()
? LayoutSize(-toLayoutBox(o)->scrolledContentOffset())
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/layout/LayoutTableCell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698