RESOLVED FIXED 118958
StickyPositionConstraints should not need to change to account for a RenderLayer's scrollOffset
https://bugs.webkit.org/show_bug.cgi?id=118958
Summary StickyPositionConstraints should not need to change to account for a RenderLa...
Beth Dakin
Reported 2013-07-21 16:15:20 PDT
Currently, to get sticky offsets right in overflow areas, the StickyPositionContraints change on every scroll to factor it in. This will be a problem once we can scroll overflow areas on the scrolling thread. The constraints should never have to change to account for the scroll position. <rdar://problem/12469203>
Attachments
Patch (16.63 KB, patch)
2013-07-21 16:26 PDT, Beth Dakin
no flags
New patch (19.29 KB, patch)
2013-07-22 13:16 PDT, Beth Dakin
simon.fraser: review+
Beth Dakin
Comment 1 2013-07-21 16:26:41 PDT
Simon Fraser (smfr)
Comment 2 2013-07-22 12:31:42 PDT
Comment on attachment 207219 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=207219&action=review > Source/WebCore/page/scrolling/ScrollingConstraints.h:154 > + // m_containingBlockRect is in the scrolling ancestor's coordinate space. I think this comment belongs next to m_containingBlockRect. You could also leave a comment here like: // containingBlockRect() is in the scrolling ancestor's coordinate space. > Source/WebCore/rendering/RenderBoxModelObject.cpp:537 > + containerContentRect = containingBlock->layoutOverflowRect(); I don't understand why this is different for oveflow:scroll-sticky? > Source/WebCore/rendering/RenderBoxModelObject.cpp:538 > + LayoutPoint conatinerLocation = containerContentRect.location() + LayoutPoint(containingBlock->borderLeft() + containingBlock->paddingLeft(), containingBlock->borderTop() + containingBlock->paddingTop()); conatinerLocation! > Source/WebCore/rendering/RenderBoxModelObject.cpp:557 > + FloatPoint containerLocationRelativeToScrollingAncestor = containerRectRelativeToScrollingAncestor.location() - FloatSize(enclosingClippingBox->borderLeft() + enclosingClippingBox->paddingLeft(), enclosingClippingBox->borderTop() + enclosingClippingBox->paddingTop()); Would be nice to wrap this line.
Beth Dakin
Comment 3 2013-07-22 13:06:34 PDT
Simon and I discussed this in person, and I will be uploading a new patch shortly.
Beth Dakin
Comment 4 2013-07-22 13:16:42 PDT
Created attachment 207267 [details] New patch
Simon Fraser (smfr)
Comment 5 2013-07-22 14:02:43 PDT
Comment on attachment 207267 [details] New patch r+ but I'd like to see a testcase like the one we made today.
Beth Dakin
Comment 6 2013-07-22 14:31:50 PDT
Committed http://trac.webkit.org/changeset/152998 including a test. Thanks Simon!
Note You need to log in before you can comment on or make changes to this bug.