https://bugs.webkit.org/show_bug.cgi?id=106946
Sticky-position elements can jump around/hide on rubber-banding

Reviewed by Simon Fraser.

Source/WebCore: 

This patch adds a new function called viewportConstrainedVisibleContentRect() 
since there are a number of places where we need a visibleContectRect() that does 
not allow scroll offsets that indicate the rubber-banding that is happening. And 
this patch fixes the bug for sticky by calling this function in two new places.

* page/FrameView.cpp:
(WebCore::FrameView::viewportConstrainedVisibleContentRect):
(WebCore):
* page/FrameView.h:
(FrameView):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::updateMainFrameScrollPosition):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::stickyPositionOffset):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
(WebCore::RenderLayerCompositor::computeStickyViewportConstraints):

LayoutTests: 

* platform/mac/tiled-drawing/sticky/negative-scroll-offset-expected.txt: Added.
* platform/mac/tiled-drawing/sticky/negative-scroll-offset.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140229 268f45cc-cd09-0410-ab3c-d52691b4dbfc