Index: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp |
index 486a11a43eb50a95648e8c40706d57d7d6d7f796..e36f404c456f2cbab52e4a9af977c6604214ec14 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp |
@@ -774,6 +774,15 @@ void LayoutBoxModelObject::updateStickyPositionConstraints() const { |
StickyPositionScrollingConstraints constraints; |
FloatSize skippedContainersOffset; |
LayoutBlock* containingBlock = this->containingBlock(); |
chrishtr
2017/01/20 19:20:57
Sort of unrelated to your CL:
LayoutObject::conta
flackr
2017/01/23 23:33:43
Hmm, this was definitely necessary at the time (an
|
+ // Add offset from containing block contributed by location containers. |
+ if (!isLayoutInline()) { |
+ LayoutBox* locationContainer = toLayoutBox(this)->locationContainer(); |
+ while (locationContainer && locationContainer != containingBlock) { |
chrishtr
2017/01/20 19:20:57
I think this and other code in this method may be
Xianzhu
2017/01/20 23:04:01
I think localToAncestorPoint should work.
flackr
2017/01/23 23:33:43
Sure, although I need a version that excludes tran
Xianzhu
2017/01/24 00:00:39
I'm not familiar with the code here. Can you expla
flackr
2017/01/24 22:37:11
Sticky position offsets are computed in terms of l
|
+ skippedContainersOffset += |
+ toFloatSize(FloatPoint(locationContainer->frameRect().location())); |
+ locationContainer = locationContainer->locationContainer(); |
+ } |
+ } |
// Skip anonymous containing blocks. |
while (containingBlock->isAnonymous()) { |
skippedContainersOffset += |