-
enrica@apple.com authored
<rdar://problem/7556244> <https://bugs.webkit.org/show_bug.cgi?id=36027> Reviewed by Simon Fraser. WebCore: There were two problems to solve here: - the incorrect anchoring of the rootChildLayer that was causing the composited content to be positioned incorrectly - the failure to paint the non composited content into the backing store when animating composited content. The first problem has been solved by leaving the original anchor point for the rootChildLayer and splitting the tasks of clipping and scrolling using two separate layers. The second problem has been solved leveraging the knowledge that WebView has of the dirty region of the backing store to pass this information to the layer renderer. This allows the renderer to force a paint into the backing store before moving to the compositing. Tests: compositing/geometry/horizontal-scroll-composited.html compositing/geometry/vertical-scroll-composited.html * manual-tests/win/horizontal-scroll-composited.html: Removed. This is now a layout test. * manual-tests/win/milliondollar.html: Added. * platform/graphics/win/WKCACFLayerRenderer.cpp: (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer): Added initialization of dirty flag. (WebCore::WKCACFLayerRenderer::setScrollFrame): (WebCore::WKCACFLayerRenderer::updateScrollFrame): Updated to resize and position the clip and scroll layers. (WebCore::WKCACFLayerRenderer::setRootChildLayer): (WebCore::WKCACFLayerRenderer::createRenderer): Added new layer hierarchy. (WebCore::WKCACFLayerRenderer::destroyRenderer): Remove clip layer on destroy. (WebCore::WKCACFLayerRenderer::resize): (WebCore::WKCACFLayerRenderer::paint): Forcing paint massage to trigger paint into the backing store. * platform/graphics/win/WKCACFLayerRenderer.h: (WebCore::WKCACFLayerRenderer::setBackingStoreDirty): Added. WebKit/win: See detailed comments in WebCore/ChangeLog. * WebView.cpp: (WebView::deleteBackingStore): Reset the dirty flag when deleting the backing store. (WebView::addToDirtyRegion): Set the dirty flag when adding dirty rectangles to the backing store dirty region. (WebView::updateBackingStore): Reset the dirty flag after painting into the backing store. (WebView::setAcceleratedCompositing): Removed unnecessary call to updateRootLayerContents. (WebView::updateRootLayerContents): Changed the way we pass parameters to setScrollFrame. We are passing width and height of the view content together with the offset for the scrolling. It was confusing to pass it all as a rectangle, when it is not a rectangle. LayoutTests: * compositing/geometry/horizontal-scroll-composited.html: Added. * compositing/geometry/vertical-scroll-composited.html: Added. * compositing/resources/apple.jpg: Added. * platform/mac/compositing/geometry/horizontal-scroll-composited-expected.checksum: Added. * platform/mac/compositing/geometry/horizontal-scroll-composited-expected.png: Added. * platform/mac/compositing/geometry/horizontal-scroll-composited-expected.txt: Added. * platform/mac/compositing/geometry/vertical-scroll-composited-expected.checksum: Added. * platform/mac/compositing/geometry/vertical-scroll-composited-expected.png: Added. * platform/mac/compositing/geometry/vertical-scroll-composited-expected.txt: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55941 268f45cc-cd09-0410-ab3c-d52691b4dbfc
401b2ab7