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

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

Issue 2646133002: Add offset contributed to sticky position box rect by location containers (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBoxModelObjectTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 +=
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBoxModelObjectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698