When scrolling upwards rapidly on my Facebook news feed, the blue header at the top of the page often detaches from the top of the page after my scrolling reaches the top and rubber-bands back. This regression appeared once we started scrolling pages with fixed positioning on the scrolling thread. <rdar://problem/12651944>
Created attachment 173118 [details] Patch
Comment on attachment 173118 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=173118&action=review > Source/WebCore/page/scrolling/ScrollingCoordinator.cpp:88 > +IntSize scrollOffsetForFixedPosition(const IntRect visibleContentRect, const IntSize contentsSize, const IntPoint scrollPosition, const IntPoint scrollOrigin, float frameScaleFactor, bool fixedElementsLayoutRelativeToFrame) All the const IntFoo should be references. > Source/WebCore/page/scrolling/ScrollingCoordinator.cpp:281 > + LayoutRect viewportRect = IntRect(scrollOffsetForFixed.width(), scrollOffsetForFixed.height(), visibleContentRect.width(), visibleContentRect.height()); I think we have toPoint() and toSize() now. > Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:285 > + IntRect viewportRect = IntRect(scrollOffsetForFixedChildren.width(), scrollOffsetForFixedChildren.height(), viewportSize.width(), viewportSize.height()); Here you can just do viewportRect = this->viewportRect(); viewportRect.setLocation(toInt(scrollOffsetForFixedChildren)).
Thanks, Simon! I made the suggested changes. http://trac.webkit.org/changeset/133974