Changeset 195445 in webkit
- Timestamp:
- Jan 21, 2016, 10:45:05 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/scrolling/programmatic-horizontal-bt-document-scroll-expected.html (added)
-
LayoutTests/fast/scrolling/programmatic-horizontal-bt-document-scroll.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/FrameView.cpp (modified) (2 diffs)
-
Source/WebCore/page/FrameView.h (modified) (1 diff)
-
Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (modified) (1 diff)
-
Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm (modified) (1 diff)
-
Source/WebCore/rendering/RenderLayerCompositor.cpp (modified) (1 diff)
-
Source/WebKit2/ChangeLog (modified) (1 diff)
-
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r195443 r195445 1 2016-01-21 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (r168244): Content in horizontal-bt page is offset such that only the end is viewable and there is a white gap at the top 4 https://bugs.webkit.org/show_bug.cgi?id=136019 5 6 Reviewed by Dan Bernstein. 7 8 Test that scrolls a horizontal-bt document. 9 10 * fast/scrolling/programmatic-horizontal-bt-document-scroll-expected.html: Added. 11 * fast/scrolling/programmatic-horizontal-bt-document-scroll.html: Added. 12 1 13 2016-01-21 Brady Eidson <beidson@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r195443 r195445 1 2016-01-21 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (r168244): Content in horizontal-bt page is offset such that only the end is viewable and there is a white gap at the top 4 https://bugs.webkit.org/show_bug.cgi?id=136019 5 6 Reviewed by Dan Bernstein. 7 8 In horizontal-bt documents (where the page starts scrolled to the bottom, and scrolling up goes into negative scroll positions), 9 the position of the root content layer would be set incorrectly by the scrolling thread, resulting in misplaced 10 content. 11 12 Fix by having the renamed "yPositionForRootContentLayer" take scroll origin into 13 account, and being more consistent about using scrollOrigin to position this layer. 14 15 Test: fast/scrolling/programmatic-horizontal-bt-document-scroll.html 16 17 * page/FrameView.cpp: 18 (WebCore::FrameView::yPositionForFooterLayer): Moved 19 (WebCore::FrameView::positionForRootContentLayer): Take scrollOrigin, and subtract it from the computed value. 20 (WebCore::FrameView::yPositionForRootContentLayer): Renamed. 21 * page/FrameView.h: 22 * page/scrolling/AsyncScrollingCoordinator.cpp: 23 (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): We've already pushed the new scrollPosition onto the FrameView, 24 so we can just use the member function to compute the positionForContentsLayer. 25 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: 26 (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition): This is the bug fix; FrameView::positionForRootContentLayer() 27 now takes scrollOrigin into account. 28 * rendering/RenderLayerCompositor.cpp: 29 (WebCore::RenderLayerCompositor::updateRootLayerPosition): Rather than using the documentRect, position the root content layer 30 in terms of the scroll origin (which is -documentRect.location()). 31 1 32 2016-01-21 Brady Eidson <beidson@apple.com> 2 33 -
trunk/Source/WebCore/page/FrameView.cpp
r195142 r195445 1767 1767 } 1768 1768 1769 float FrameView::yPositionForRootContentLayer(const FloatPoint& scrollPosition, float topContentInset, float headerHeight)1770 {1771 return yPositionForHeaderLayer(scrollPosition, topContentInset) + headerHeight;1772 }1773 1774 1769 float FrameView::yPositionForFooterLayer(const FloatPoint& scrollPosition, float topContentInset, float totalContentsHeight, float footerHeight) 1775 1770 { … … 1777 1772 } 1778 1773 1779 float FrameView::yPositionForRootContentLayer() const 1780 { 1781 return yPositionForRootContentLayer(scrollPosition(), topContentInset(), headerHeight()); 1774 FloatPoint FrameView::positionForRootContentLayer(const FloatPoint& scrollPosition, const FloatPoint& scrollOrigin, float topContentInset, float headerHeight) 1775 { 1776 return FloatPoint(0, yPositionForHeaderLayer(scrollPosition, topContentInset) + headerHeight) - toFloatSize(scrollOrigin); 1777 } 1778 1779 FloatPoint FrameView::positionForRootContentLayer() const 1780 { 1781 return positionForRootContentLayer(scrollPosition(), scrollOrigin(), topContentInset(), headerHeight()); 1782 1782 } 1783 1783 -
trunk/Source/WebCore/page/FrameView.h
r194667 r195445 288 288 // on both the main thread and the scrolling thread. 289 289 static float yPositionForInsetClipLayer(const FloatPoint& scrollPosition, float topContentInset); 290 WEBCORE_EXPORT static float yPositionForRootContentLayer(const FloatPoint& scrollPosition, float topContentInset, float headerHeight);291 WEBCORE_EXPORT float yPositionForRootContentLayer() const;290 WEBCORE_EXPORT static FloatPoint positionForRootContentLayer(const FloatPoint& scrollPosition, const FloatPoint& scrollOrigin, float topContentInset, float headerHeight); 291 WEBCORE_EXPORT FloatPoint positionForRootContentLayer() const; 292 292 293 293 static float yPositionForHeaderLayer(const FloatPoint& scrollPosition, float topContentInset); -
trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
r194442 r195445 324 324 float topContentInset = frameView.topContentInset(); 325 325 FloatPoint positionForInsetClipLayer = FloatPoint(0, FrameView::yPositionForInsetClipLayer(scrollPosition, topContentInset)); 326 FloatPoint positionForContentsLayer = FloatPoint(scrolledContentsLayer->position().x(), 327 FrameView::yPositionForRootContentLayer(scrollPosition, topContentInset, frameView.headerHeight())); 326 FloatPoint positionForContentsLayer = frameView.positionForRootContentLayer(); 328 327 FloatPoint positionForHeaderLayer = FloatPoint(scrollPositionForFixed.x(), FrameView::yPositionForHeaderLayer(scrollPosition, topContentInset)); 329 328 FloatPoint positionForFooterLayer = FloatPoint(scrollPositionForFixed.x(), -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm
r194502 r195445 405 405 if (m_insetClipLayer && m_scrolledContentsLayer && topContentInset) { 406 406 m_insetClipLayer.get().position = FloatPoint(0, FrameView::yPositionForInsetClipLayer(position, topContentInset)); 407 m_scrolledContentsLayer.get().position = FloatPoint(m_scrolledContentsLayer.get().position.x, 408 FrameView::yPositionForRootContentLayer(position, topContentInset, headerHeight())); 407 m_scrolledContentsLayer.get().position = FrameView::positionForRootContentLayer(position, scrollOrigin(), topContentInset, headerHeight()); 409 408 if (m_contentShadowLayer) 410 409 m_contentShadowLayer.get().position = m_scrolledContentsLayer.get().position; -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r194825 r195445 2122 2122 { 2123 2123 if (m_rootContentLayer) { 2124 const IntRect& documentRect = m_renderView.documentRect(); 2125 m_rootContentLayer->setSize(documentRect.size()); 2126 m_rootContentLayer->setPosition(FloatPoint(documentRect.x(), documentRect.y() + m_renderView.frameView().yPositionForRootContentLayer())); 2124 m_rootContentLayer->setSize(m_renderView.frameView().contentsSize()); 2125 m_rootContentLayer->setPosition(m_renderView.frameView().positionForRootContentLayer()); 2127 2126 m_rootContentLayer->setAnchorPoint(FloatPoint3D()); 2128 2127 } -
trunk/Source/WebKit2/ChangeLog
r195429 r195445 1 2016-01-21 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (r168244): Content in horizontal-bt page is offset such that only the end is viewable and there is a white gap at the top 4 https://bugs.webkit.org/show_bug.cgi?id=136019 5 6 Reviewed by Dan Bernstein. 7 8 Now call frameView.positionForRootContentLayer(), and add a FIXME questioning the 9 behavior in horizontal b-t documents. However, this code isn't hit now that we always 10 do extended backgrounds, so never have shadow layers. 11 12 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 13 (WebKit::shadowLayerPositionForFrame): 14 1 15 2016-01-21 Dean Jackson <dino@apple.com> 2 16 -
trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
r194448 r195445 694 694 static FloatPoint shadowLayerPositionForFrame(FrameView& frameView, FloatPoint origin) 695 695 { 696 FloatPoint position = frameView.renderView()->documentRect().location() + FloatPoint(0, frameView.yPositionForRootContentLayer()); 696 // FIXME: correct for b-t documents? 697 FloatPoint position = frameView.positionForRootContentLayer(); 697 698 return position + origin.expandedTo(FloatPoint()); 698 699 }
Note:
See TracChangeset
for help on using the changeset viewer.