haikuwebkit/LayoutTests/compositing/tiling/transform-origin-tiled-expe...

64 lines
2.1 KiB
Plaintext
Raw Permalink Normal View History

Expand compositing coverage rect when scrolling and animating https://bugs.webkit.org/show_bug.cgi?id=144214 rdar://problem/20695926 Reviewed by Darin Adler. Source/WebCore: r183300 added a secondary rect that gets mapped through graphics layers during layer flushing, which represents a rect, in layer coordinates, that represents the portion of this layer that's visible in the viewport. This patch extends that rect based on scrolling and animating, with the extended coverage rect being mapped into descendants (where it's used to determine whether they should detach their backing store). This required moving the responsibility for extending the coverage rect from TileController (where it was used to compute tiled extent), to GraphicsLayerCA. Thus, GraphicsLayerCA now owns the concept of coverage rect, and pushes it onto TileControllers. Test: compositing/tiling/transform-origin-tiled.html * platform/graphics/TiledBacking.h: Coverage rect is now pushed onto TiledBacking from outside; new functions reflect that. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): No need to pass old visible rect to commitLayerChangesBeforeSublayers. (WebCore::accumulatesTransform): (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush): Now calls computeVisibleAndCoverageRect(), then adjustCoverageRect() which adjusts for scrolling and animations. (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect): Fetch the coverage rect from the TransformState, but we can only use this if mapping it through various transforms didn't clamp it (which can happen with severe rotations in perspective). (WebCore::GraphicsLayerCA::adjustCoverageRect): If this layer represents the page tiled backing, ask the TileController to do coverage adjustment (code which should move into here eventually). For other tiled layers, do motion-based adjustment. This should really be done for all layers (an animating non-tiled layer may contain a tiled layer). (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): The VisibleRectChanged wasn't needed any more; layers only react to changed in coverage rect now. (WebCore::GraphicsLayerCA::recursiveCommitChanges): If adjustCoverageRect() changed the coverage rect, here we push the new rect back into the TransformState so it will affect descendants. (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): (WebCore::GraphicsLayerCA::updateCoverage): Coverage and backing store attachment go hand-in-hand now. (WebCore::GraphicsLayerCA::changeLayerTypeTo): (WebCore::GraphicsLayerCA::computeVisibleRect): Deleted. (WebCore::GraphicsLayerCA::updateBackingStoreAttachment): Deleted. (WebCore::GraphicsLayerCA::updateVisibleRect): Deleted. * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/ca/TileController.cpp: (WebCore::TileController::setVisibleRect): Visible rect is only used for scroll performance logging now. (WebCore::TileController::setCoverageRect): (WebCore::TileController::tilesWouldChangeForCoverageRect): (WebCore::TileController::revalidateTiles): (WebCore::TileController::boundsForSize): This is required because when computeTileCoverageRect() is called at the top of committing the owning layer, we haven't yet pushed a new size to the underlying platform layer (which TileController::bounds() consults). (WebCore::TileController::bounds): (WebCore::TileController::computeTileCoverageRect): Have to push the new size in, since the underlying layer hasn't been updated yet. (WebCore::TileController::didRevalidateTiles): (WebCore::TileController::tilesWouldChangeForVisibleRect): Deleted. * platform/graphics/ca/TileController.h: * platform/graphics/ca/TileCoverageMap.cpp: (WebCore::TileCoverageMap::TileCoverageMap): Add a layer to the tile map that shows a dark blue outline for the coverage rect. (WebCore::TileCoverageMap::update): Fix some minor issues with map position when top content inset is non-zero. * platform/graphics/ca/TileCoverageMap.h: * platform/graphics/ca/TileGrid.cpp: Everything is in terms of coverage rect now. (WebCore::TileGrid::tilesWouldChangeForCoverageRect): (WebCore::TileGrid::revalidateTiles): (WebCore::TileGrid::tilesWouldChangeForVisibleRect): Deleted. * platform/graphics/ca/TileGrid.h: * platform/graphics/transforms/TransformState.cpp: (WebCore::TransformState::operator=): (WebCore::TransformState::mappedQuad): Pass direction into mapQuad(). (WebCore::TransformState::mappedSecondaryQuad): Ditto. (WebCore::TransformState::setLastPlanarSecondaryQuad): This function allows a caller to pass in a secondary quad, and get it mapped into the coordinate space of the last "flattening" state (since the TransformState may have in-flight XY offset, or transform). This mapping is achieved by re-using mapQuad(), but in the inverse direction. (WebCore::TransformState::mapQuad): Make direction a parameter. (WebCore::TransformState::flattenWithTransform): This code omitted to map the secondary quad. Failure was detected by tests. * platform/graphics/transforms/TransformState.h: (WebCore::TransformState::isMappingSecondaryQuad): (WebCore::TransformState::direction): (WebCore::TransformState::inverseDirection): (WebCore::TransformState::lastPlanarSecondaryQuad): Deleted. LayoutTests: New baselines for tests dumping layer output, with coverage rect being affected by this changeset. One new test for tiling a layer inside overflow:hidden with transform-origin. * compositing/contents-scale/animating-expected.txt: * compositing/contents-scale/rounded-contents-scale-expected.txt: * compositing/contents-scale/scaled-ancestor-expected.txt: * compositing/contents-scale/simple-scale-expected.txt: * compositing/tiling/transform-origin-tiled.html: Added. * platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt: * platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: * platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt: * platform/mac-wk2/compositing/visible-rect/iframe-no-layers-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt: * platform/mac-wk2/tiled-drawing/simple-document-with-margin-tiles-expected.txt: * platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt: * platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration-expected.txt: * platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-expected.txt: * platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt: * platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt: * platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: * platform/mac/compositing/tiling/tile-cache-zoomed-expected.txt: * platform/mac/compositing/visible-rect/2d-transformed-expected.txt: * platform/mac/compositing/visible-rect/3d-transformed-expected.txt: * platform/mac/compositing/visible-rect/clipped-by-viewport-expected.txt: * platform/mac/compositing/visible-rect/clipped-visible-rect-expected.txt: * platform/mac/compositing/visible-rect/iframe-and-layers-expected.txt: * platform/mac/compositing/visible-rect/iframe-no-layers-expected.txt: * platform/mac/compositing/visible-rect/scrolled-expected.txt: Canonical link: https://commits.webkit.org/162220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-04-26 17:24:40 +00:00
(GraphicsLayer
(anchor 0.00 0.00)
(bounds 800.00 600.00)
(visible rect 0.00, 0.00 800.00 x 600.00)
(coverage rect 0.00, 0.00 800.00 x 600.00)
(intersects coverage rect 1)
(contentsScale 1.00)
(children 1
(GraphicsLayer
(bounds 800.00 600.00)
(contentsOpaque 1)
(visible rect 0.00, 0.00 800.00 x 600.00)
(coverage rect 0.00, 0.00 800.00 x 600.00)
(intersects coverage rect 1)
(contentsScale 1.00)
(tile cache coverage 0, 0 800 x 600)
(tile size 512 x 512)
(top left tile 0, 0 tiles grid 2 x 2)
Correctly set the "inWindow" flag for TileControllers that aren't the page tiles, and clarify "usingTiledBacking" logic https://bugs.webkit.org/show_bug.cgi?id=167774 Reviewed by Tim Horton. Source/WebCore: RenderLayerBacking had some very confusing "usingTiledCacheLayer" uses. Its member variable, m_usingTiledCacheLayer, really meant "m_isMainFrameLayerWithTiledBacking" so make it so. It had a usingTiledBacking(), which returned the same thing, which this patch replaces with isMainFrameLayerWithTiledBacking(). The fact that usingTiledBacking() was only true for the page tiled layer tripped up RenderLayerCompositor::setIsInWindowForLayerIncludingDescendants(), which would only ever call setIsInWindow() on the page tiled layer. These changes fix that. Also make a way for tests to unparent the web view via UIScriptController, and dump out the "in window" status of TileBackings when dumping tile caches. Test: tiled-drawing/tiled-backing-in-window.html * platform/graphics/TiledBacking.h: * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::dumpAdditionalProperties): * platform/graphics/ca/TileController.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): (WebCore::computePageTiledBackingCoverage): (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): (WebCore::RenderLayerBacking::setTiledBackingHasMargins): (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): (WebCore::RenderLayerBacking::shouldClipCompositedBounds): (WebCore::RenderLayerBacking::updateDescendantClippingLayer): (WebCore::RenderLayerBacking::updateRootLayerConfiguration): (WebCore::RenderLayerBacking::paintsIntoWindow): (WebCore::computeTileCoverage): Deleted. * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::flushPendingLayerChanges): (WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged): (WebCore::RenderLayerCompositor::setIsInWindowForLayerIncludingDescendants): (WebCore::RenderLayerCompositor::supportsFixedRootBackgroundCompositing): (WebCore::RenderLayerCompositor::documentUsesTiledBacking): Tools: Implement UIScriptController removeViewFromWindow() and addViewToWindow(), and hook up for Mac WK1 and WK2, and iOS WK2. It takes a callback because view state updates to the web process are async, so the callback fires after the web process gets the new state. * DumpRenderTree/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::removeViewFromWindow): (WTR::UIScriptController::addViewToWindow): * DumpRenderTree/mac/DumpRenderTree.mm: (createWebViewAndOffscreenWindow): (resetWebViewToConsistentStateBeforeTesting): * DumpRenderTree/mac/DumpRenderTreeMac.h: * DumpRenderTree/mac/UIScriptControllerMac.mm: (WTR::UIScriptController::removeViewFromWindow): (WTR::UIScriptController::addViewToWindow): * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * TestRunnerShared/UIScriptContext/UIScriptController.cpp: (WTR::UIScriptController::removeViewFromWindow): (WTR::UIScriptController::addViewToWindow): * TestRunnerShared/UIScriptContext/UIScriptController.h: * WebKitTestRunner/PlatformWebView.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/ios/PlatformWebViewIOS.mm: (WTR::PlatformWebView::removeFromWindow): (WTR::PlatformWebView::addToWindow): * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::removeViewFromWindow): (WTR::UIScriptController::addViewToWindow): * WebKitTestRunner/mac/PlatformWebViewMac.mm: (WTR::PlatformWebView::removeFromWindow): (WTR::PlatformWebView::addToWindow): * WebKitTestRunner/mac/UIScriptControllerMac.mm: (WTR::UIScriptController::removeViewFromWindow): (WTR::UIScriptController::addViewToWindow): LayoutTests: Rebase to include the "in window" output. tiled-drawing/background-transparency-toggle.html was sensitive to the length of the output, so give the body a fixed size. * compositing/tiling/offscreen-tiled-layer-expected.txt: * compositing/tiling/transform-origin-tiled-expected.txt: * platform/mac-wk1/compositing/tiling/offscreen-tiled-layer-expected.txt: * platform/mac-wk1/compositing/tiling/transform-origin-tiled-expected.txt: * platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt: * platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: * platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt: * platform/mac-wk2/compositing/tiling/tiled-layer-resize-expected.txt: * platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt: * platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: * platform/mac/compositing/tiling/tiled-layer-resize-expected.txt: * tiled-drawing/background-transparency-toggle-expected.txt: * tiled-drawing/background-transparency-toggle.html: * tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt: * tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt: * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt: * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt: * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt: * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt: * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt: * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt: * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt: * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt: * tiled-drawing/scrolling/fast-scroll-select-latched-select-expected.txt: * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-body-background-body-layer-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-body-background-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-body-background-opacity-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-body-background-positioned-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-body-background-transformed-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-body-background-zoomed-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-html-background-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-non-propagated-body-background-expected.txt: * tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt: * tiled-drawing/simple-document-with-margin-tiles-expected.txt: * tiled-drawing/tile-coverage-after-scroll-expected.txt: * tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt: * tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt: * tiled-drawing/tile-coverage-slow-scrolling-expected.txt: * tiled-drawing/tile-coverage-speculative-expected.txt: * tiled-drawing/tile-coverage-view-exposed-rect-expected.txt: * tiled-drawing/tile-size-both-scrollable-expected.txt: * tiled-drawing/tile-size-horizontally-scrollable-expected.txt: * tiled-drawing/tile-size-slow-zoomed-expected.txt: * tiled-drawing/tile-size-unscrollable-expected.txt: * tiled-drawing/tile-size-vertically-scrollable-expected.txt: * tiled-drawing/tile-size-view-exposed-rect-expected.txt: * tiled-drawing/tiled-backing-in-window-expected.txt: Added. * tiled-drawing/tiled-backing-in-window.html: Added. * tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration-expected.txt: * tiled-drawing/tiled-drawing-zoom-expected.txt: * tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt: * tiled-drawing/use-tiled-drawing-expected.txt: * tiled-drawing/visible-rect-content-inset-expected.txt: Canonical link: https://commits.webkit.org/184865@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-04 01:53:38 +00:00
(in window 1)
Expand compositing coverage rect when scrolling and animating https://bugs.webkit.org/show_bug.cgi?id=144214 rdar://problem/20695926 Reviewed by Darin Adler. Source/WebCore: r183300 added a secondary rect that gets mapped through graphics layers during layer flushing, which represents a rect, in layer coordinates, that represents the portion of this layer that's visible in the viewport. This patch extends that rect based on scrolling and animating, with the extended coverage rect being mapped into descendants (where it's used to determine whether they should detach their backing store). This required moving the responsibility for extending the coverage rect from TileController (where it was used to compute tiled extent), to GraphicsLayerCA. Thus, GraphicsLayerCA now owns the concept of coverage rect, and pushes it onto TileControllers. Test: compositing/tiling/transform-origin-tiled.html * platform/graphics/TiledBacking.h: Coverage rect is now pushed onto TiledBacking from outside; new functions reflect that. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): No need to pass old visible rect to commitLayerChangesBeforeSublayers. (WebCore::accumulatesTransform): (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush): Now calls computeVisibleAndCoverageRect(), then adjustCoverageRect() which adjusts for scrolling and animations. (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect): Fetch the coverage rect from the TransformState, but we can only use this if mapping it through various transforms didn't clamp it (which can happen with severe rotations in perspective). (WebCore::GraphicsLayerCA::adjustCoverageRect): If this layer represents the page tiled backing, ask the TileController to do coverage adjustment (code which should move into here eventually). For other tiled layers, do motion-based adjustment. This should really be done for all layers (an animating non-tiled layer may contain a tiled layer). (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): The VisibleRectChanged wasn't needed any more; layers only react to changed in coverage rect now. (WebCore::GraphicsLayerCA::recursiveCommitChanges): If adjustCoverageRect() changed the coverage rect, here we push the new rect back into the TransformState so it will affect descendants. (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): (WebCore::GraphicsLayerCA::updateCoverage): Coverage and backing store attachment go hand-in-hand now. (WebCore::GraphicsLayerCA::changeLayerTypeTo): (WebCore::GraphicsLayerCA::computeVisibleRect): Deleted. (WebCore::GraphicsLayerCA::updateBackingStoreAttachment): Deleted. (WebCore::GraphicsLayerCA::updateVisibleRect): Deleted. * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/ca/TileController.cpp: (WebCore::TileController::setVisibleRect): Visible rect is only used for scroll performance logging now. (WebCore::TileController::setCoverageRect): (WebCore::TileController::tilesWouldChangeForCoverageRect): (WebCore::TileController::revalidateTiles): (WebCore::TileController::boundsForSize): This is required because when computeTileCoverageRect() is called at the top of committing the owning layer, we haven't yet pushed a new size to the underlying platform layer (which TileController::bounds() consults). (WebCore::TileController::bounds): (WebCore::TileController::computeTileCoverageRect): Have to push the new size in, since the underlying layer hasn't been updated yet. (WebCore::TileController::didRevalidateTiles): (WebCore::TileController::tilesWouldChangeForVisibleRect): Deleted. * platform/graphics/ca/TileController.h: * platform/graphics/ca/TileCoverageMap.cpp: (WebCore::TileCoverageMap::TileCoverageMap): Add a layer to the tile map that shows a dark blue outline for the coverage rect. (WebCore::TileCoverageMap::update): Fix some minor issues with map position when top content inset is non-zero. * platform/graphics/ca/TileCoverageMap.h: * platform/graphics/ca/TileGrid.cpp: Everything is in terms of coverage rect now. (WebCore::TileGrid::tilesWouldChangeForCoverageRect): (WebCore::TileGrid::revalidateTiles): (WebCore::TileGrid::tilesWouldChangeForVisibleRect): Deleted. * platform/graphics/ca/TileGrid.h: * platform/graphics/transforms/TransformState.cpp: (WebCore::TransformState::operator=): (WebCore::TransformState::mappedQuad): Pass direction into mapQuad(). (WebCore::TransformState::mappedSecondaryQuad): Ditto. (WebCore::TransformState::setLastPlanarSecondaryQuad): This function allows a caller to pass in a secondary quad, and get it mapped into the coordinate space of the last "flattening" state (since the TransformState may have in-flight XY offset, or transform). This mapping is achieved by re-using mapQuad(), but in the inverse direction. (WebCore::TransformState::mapQuad): Make direction a parameter. (WebCore::TransformState::flattenWithTransform): This code omitted to map the secondary quad. Failure was detected by tests. * platform/graphics/transforms/TransformState.h: (WebCore::TransformState::isMappingSecondaryQuad): (WebCore::TransformState::direction): (WebCore::TransformState::inverseDirection): (WebCore::TransformState::lastPlanarSecondaryQuad): Deleted. LayoutTests: New baselines for tests dumping layer output, with coverage rect being affected by this changeset. One new test for tiling a layer inside overflow:hidden with transform-origin. * compositing/contents-scale/animating-expected.txt: * compositing/contents-scale/rounded-contents-scale-expected.txt: * compositing/contents-scale/scaled-ancestor-expected.txt: * compositing/contents-scale/simple-scale-expected.txt: * compositing/tiling/transform-origin-tiled.html: Added. * platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt: * platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: * platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt: * platform/mac-wk2/compositing/visible-rect/iframe-no-layers-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt: * platform/mac-wk2/tiled-drawing/simple-document-with-margin-tiles-expected.txt: * platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt: * platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration-expected.txt: * platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-expected.txt: * platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt: * platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt: * platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: * platform/mac/compositing/tiling/tile-cache-zoomed-expected.txt: * platform/mac/compositing/visible-rect/2d-transformed-expected.txt: * platform/mac/compositing/visible-rect/3d-transformed-expected.txt: * platform/mac/compositing/visible-rect/clipped-by-viewport-expected.txt: * platform/mac/compositing/visible-rect/clipped-visible-rect-expected.txt: * platform/mac/compositing/visible-rect/iframe-and-layers-expected.txt: * platform/mac/compositing/visible-rect/iframe-no-layers-expected.txt: * platform/mac/compositing/visible-rect/scrolled-expected.txt: Canonical link: https://commits.webkit.org/162220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-04-26 17:24:40 +00:00
(children 1
(GraphicsLayer
(position 58.00 50.00)
(bounds 502.00 302.00)
(visible rect 0.00, 0.00 502.00 x 302.00)
(coverage rect -58.00, -50.00 800.00 x 600.00)
(intersects coverage rect 1)
(contentsScale 1.00)
(children 1
(GraphicsLayer
Make GraphicsLayer::dumpProperties dump m_offsetFromRenderer https://bugs.webkit.org/show_bug.cgi?id=180473 Source/WebCore: Patch by Frederic Wang <fwang@igalia.com> on 2017-12-14 Reviewed by Antonio Gomes. No new tests, this is just a new debug info. * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::dumpProperties const): Dump the offset from renderer if nonzero. LayoutTests: Update test expectations to include the "offset from renderer" values. Existing tests insert the output of layerTreeAsText into some divs which may cause the corresponding GraphicsLayers to become slightly taller. We thus make the necessary adjustments. Patch by Frederic Wang <fwang@igalia.com> on 2017-12-14 Reviewed by Antonio Gomes. * compositing/backing/no-backing-for-clip-expected.txt: * compositing/backing/no-backing-for-clip-overlap-expected.txt: * compositing/backing/transform-transition-from-outside-view-expected.txt: * compositing/bounds-in-flipped-writing-mode-expected.txt: * compositing/columns/composited-in-paginated-rl-expected.txt: * compositing/columns/composited-lr-paginated-repaint-expected.txt: * compositing/columns/composited-rl-paginated-repaint-expected.txt: * compositing/contents-format/subpixel-antialiased-nested-layer-expected.txt: * compositing/contents-format/subpixel-antialiased-text-configs-antialiasing-style-expected.txt: * compositing/contents-format/subpixel-antialiased-text-configs-expected.txt: * compositing/contents-format/subpixel-antialiased-text-images-expected.txt: * compositing/contents-format/subpixel-antialiased-text-traversal-expected.txt: * compositing/contents-format/subpixel-antialiased-text-visibility-expected.txt: * compositing/contents-opaque/overflow-hidden-child-layers-expected.txt: * compositing/filters/sw-layer-overlaps-hw-shadow-expected.txt: * compositing/filters/sw-nested-shadow-overlaps-hw-nested-shadow-expected.txt: * compositing/filters/sw-shadow-overlaps-hw-shadow-expected.txt: * compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt: * compositing/geometry/bounds-ignores-hidden-dynamic-expected.txt: * compositing/geometry/bounds-ignores-hidden-expected.txt: * compositing/geometry/clip-expected.txt: * compositing/geometry/clip-inside-expected.txt: * compositing/geometry/fixed-position-flipped-writing-mode-expected.txt: * compositing/geometry/flipped-writing-mode-expected.txt: * compositing/geometry/foreground-layer-expected.txt: * compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt: * compositing/geometry/limit-layer-bounds-fixed-expected.txt: * compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt: * compositing/geometry/limit-layer-bounds-opacity-transition-expected.txt: * compositing/geometry/limit-layer-bounds-positioned-expected.txt: * compositing/geometry/limit-layer-bounds-positioned-transition-expected.txt: * compositing/geometry/limit-layer-bounds-transformed-expected.txt: * compositing/iframes/composited-parent-iframe-expected.txt: * compositing/iframes/connect-compositing-iframe-delayed-expected.txt: * compositing/iframes/connect-compositing-iframe-expected.txt: * compositing/iframes/connect-compositing-iframe2-expected.txt: * compositing/iframes/connect-compositing-iframe3-expected.txt: * compositing/iframes/enter-compositing-iframe-expected.txt: * compositing/iframes/iframe-resize-expected.txt: * compositing/iframes/overlapped-iframe-expected.txt: * compositing/iframes/page-cache-layer-tree-expected.txt: * compositing/iframes/scrolling-iframe-expected.txt: * compositing/images/clip-on-directly-composited-image-expected.txt: * compositing/ios/overflow-scroll-touch-tiles-expected.txt: * compositing/layer-creation/fixed-overlap-extent-expected.txt: * compositing/layer-creation/fixed-overlap-extent-rtl-expected.txt: * compositing/layer-creation/fixed-position-under-transform-expected.txt: * compositing/layer-creation/mismatched-rotated-transform-animation-overlap-expected.txt: * compositing/layer-creation/mismatched-rotated-transform-transition-overlap-expected.txt: * compositing/layer-creation/mismatched-transform-transition-overlap-expected.txt: * compositing/layer-creation/multiple-keyframes-animation-overlap-expected.txt: * compositing/layer-creation/overflow-scroll-overlap-expected.txt: * compositing/layer-creation/overlap-animation-clipping-expected.txt: * compositing/layer-creation/overlap-animation-expected.txt: * compositing/layer-creation/overlap-child-layer-expected.txt: * compositing/layer-creation/overlap-transformed-layer-expected.txt: * compositing/layer-creation/overlap-transforms-expected.txt: * compositing/layer-creation/rotate3d-overlap-expected.txt: * compositing/layer-creation/scale-rotation-animation-overlap-expected.txt: * compositing/layer-creation/scale-rotation-transition-overlap-expected.txt: * compositing/layer-creation/stacking-context-overlap-nested-expected.txt: * compositing/layer-creation/translate-animation-overlap-expected.txt: * compositing/layer-creation/translate-scale-animation-overlap-expected.txt: * compositing/layer-creation/translate-scale-transition-overlap-expected.txt: * compositing/layer-creation/translate-transition-overlap-expected.txt: * compositing/layer-creation/will-change-layer-creation-expected.txt: * compositing/overflow/clip-descendents-expected.txt: * compositing/overflow/overflow-scrollbar-layer-positions-expected.txt: * compositing/repaint/fixed-background-scroll-expected.txt: * compositing/repaint/iframes/composited-iframe-with-fixed-background-doc-repaint-expected.txt: * compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt: * compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt: * compositing/repaint/repaint-on-layer-grouping-change-expected.txt: * compositing/rtl/rtl-absolute-overflow-expected.txt: * compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt: * compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt: * compositing/scrolling/touch-scroll-to-clip-expected.txt: * compositing/tiling/tiled-mask-inwindow-expected.txt: * compositing/tiling/tiled-reflection-inwindow-expected.txt: * compositing/tiling/transform-origin-tiled-expected.txt: * compositing/visible-rect/coverage-clipped-expected.txt: * compositing/visible-rect/coverage-scrolling-expected.txt: * fast/scrolling/ios/overflow-scroll-touch-expected.txt: * fast/scrolling/ios/subpixel-overflow-scrolling-with-ancestor-expected.txt: * platform/gtk/compositing/geometry/composited-in-columns-expected.txt: * platform/gtk/compositing/iframes/invisible-nested-iframe-show-expected.txt: * platform/gtk/compositing/layer-creation/overlap-animation-container-expected.txt: * platform/gtk/compositing/layer-creation/overlap-animation-expected.txt: * platform/gtk/compositing/layer-creation/will-change-layer-creation-expected.txt: * platform/gtk/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: * platform/gtk/compositing/overflow/composited-scrolling-paint-phases-expected.txt: * platform/ios-wk2/compositing/backing/no-backing-for-clip-expected.txt: * platform/ios-wk2/compositing/backing/no-backing-for-clip-overlap-expected.txt: * platform/ios-wk2/compositing/columns/composited-in-paginated-rl-expected.txt: * platform/ios-wk2/compositing/columns/composited-lr-paginated-repaint-expected.txt: * platform/ios-wk2/compositing/columns/composited-rl-paginated-repaint-expected.txt: * platform/ios-wk2/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt: * platform/ios-wk2/compositing/geometry/composited-in-columns-expected.txt: * platform/ios-wk2/compositing/geometry/limit-layer-bounds-fixed-expected.txt: * platform/ios-wk2/compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt: * platform/ios-wk2/compositing/iframes/composited-parent-iframe-expected.txt: * platform/ios-wk2/compositing/iframes/connect-compositing-iframe-delayed-expected.txt: * platform/ios-wk2/compositing/iframes/connect-compositing-iframe-expected.txt: * platform/ios-wk2/compositing/iframes/connect-compositing-iframe2-expected.txt: * platform/ios-wk2/compositing/iframes/connect-compositing-iframe3-expected.txt: * platform/ios-wk2/compositing/iframes/enter-compositing-iframe-expected.txt: * platform/ios-wk2/compositing/iframes/iframe-resize-expected.txt: * platform/ios-wk2/compositing/iframes/leave-compositing-iframe-expected.txt: * platform/ios-wk2/compositing/iframes/overlapped-iframe-expected.txt: * platform/ios-wk2/compositing/iframes/page-cache-layer-tree-expected.txt: * platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt: * platform/ios-wk2/compositing/layer-creation/fixed-position-under-transform-expected.txt: * platform/ios-wk2/compositing/repaint/fixed-background-scroll-expected.txt: * platform/ios-wk2/compositing/rtl/rtl-absolute-overflow-expected.txt: * platform/ios-wk2/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt: * platform/ios-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt: * platform/ios-wk2/compositing/rtl/rtl-iframe-absolute-overflow-expected.txt: * platform/ios-wk2/compositing/scrolling/touch-scroll-to-clip-expected.txt: * platform/ios-wk2/compositing/tiling/backface-preserve-3d-tiled-expected.txt: * platform/ios-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt: * platform/ios-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: * platform/ios-wk2/compositing/tiling/tiled-mask-inwindow-expected.txt: * platform/ios-wk2/compositing/tiling/tiled-reflection-inwindow-expected.txt: * platform/ios-wk2/compositing/tiling/transform-origin-tiled-expected.txt: * platform/ios-wk2/compositing/visibility/visibility-image-layers-dynamic-expected.txt: * platform/ios-wk2/compositing/visible-rect/2d-transformed-expected.txt: * platform/ios-wk2/compositing/visible-rect/3d-transformed-expected.txt: * platform/ios-wk2/compositing/visible-rect/clipped-visible-rect-expected.txt: * platform/ios-wk2/compositing/visible-rect/coverage-clipped-expected.txt: * platform/ios-wk2/compositing/visible-rect/coverage-scrolling-expected.txt: * platform/ios-wk2/compositing/visible-rect/flipped-preserve-3d-expected.txt: * platform/ios-wk2/compositing/visible-rect/iframe-and-layers-expected.txt: * platform/ios-wk2/compositing/visible-rect/nested-transform-expected.txt: * platform/ios/compositing/contents-format/subpixel-antialiased-nested-layer-expected.txt: * platform/ios/compositing/contents-format/subpixel-antialiased-text-traversal-expected.txt: * platform/ios/compositing/filters/sw-layer-overlaps-hw-shadow-expected.txt: * platform/ios/compositing/geometry/fixed-position-flipped-writing-mode-expected.txt: * platform/ios/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt: * platform/ios/compositing/iframes/invisible-nested-iframe-show-expected.txt: * platform/ios/compositing/images/clip-on-directly-composited-image-expected.txt: * platform/ios/compositing/layer-creation/overlap-animation-clipping-expected.txt: * platform/ios/compositing/layer-creation/overlap-animation-container-expected.txt: * platform/ios/compositing/layer-creation/scale-rotation-animation-overlap-expected.txt: * platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt: * platform/ios/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: * platform/ios/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt: * platform/ios/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt: * platform/ios/compositing/visible-rect/3d-transform-style-expected.txt: * platform/ios/compositing/visible-rect/animated-expected.txt: * platform/ios/compositing/visible-rect/animated-from-none-expected.txt: * platform/ios/fast/scrolling/ios/overflow-scrolling-ancestor-clip-expected.txt: * platform/ios/fast/scrolling/ios/overflow-scrolling-ancestor-clip-size-expected.txt: * platform/ios/fast/scrolling/ios/textarea-scroll-touch-expected.txt: * platform/ios/media/video-play-glyph-composited-outside-overflow-scrolling-touch-container-expected.txt: * platform/mac-elcapitan/compositing/contents-opaque/control-layer-expected.txt: * platform/mac-elcapitan/compositing/repaint/iframes/composited-iframe-with-fixed-background-doc-repaint-expected.txt: * platform/mac-sierra-wk1/compositing/repaint/iframes/composited-iframe-with-fixed-background-doc-repaint-expected.txt: * platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt: * platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt: * platform/mac-wk1/compositing/tiling/tiled-mask-inwindow-expected.txt: * platform/mac-wk1/compositing/tiling/tiled-reflection-inwindow-expected.txt: * platform/mac-wk1/compositing/tiling/transform-origin-tiled-expected.txt: * platform/mac-wk2/compositing/rtl/rtl-absolute-overflow-expected.txt: * platform/mac-wk2/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt: * platform/mac-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt: * platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt: * platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: * platform/mac/compositing/contents-format/subpixel-antialiased-text-configs-antialiasing-style-expected.txt: * platform/mac/compositing/contents-format/subpixel-antialiased-text-configs-expected.txt: * platform/mac/compositing/contents-format/subpixel-antialiased-text-images-expected.txt: * platform/mac/compositing/contents-format/subpixel-antialiased-text-traversal-expected.txt: * platform/mac/compositing/contents-format/subpixel-antialiased-text-visibility-expected.txt: * platform/mac/compositing/contents-opaque/control-layer-expected.txt: * platform/mac/compositing/geometry/composited-in-columns-expected.txt: * platform/mac/compositing/iframes/invisible-nested-iframe-show-expected.txt: * platform/mac/compositing/layer-creation/overlap-animation-container-expected.txt: * platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt: * platform/mac/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: * platform/mac/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt: * platform/mac/compositing/tiling/backface-preserve-3d-tiled-expected.txt: * platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt: * platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: * platform/mac/compositing/visibility/visibility-image-layers-dynamic-expected.txt: * platform/mac/compositing/visible-rect/2d-transformed-expected.txt: * platform/mac/compositing/visible-rect/3d-transform-style-expected.txt: * platform/mac/compositing/visible-rect/3d-transformed-expected.txt: * platform/mac/compositing/visible-rect/animated-expected.txt: * platform/mac/compositing/visible-rect/animated-from-none-expected.txt: * platform/mac/compositing/visible-rect/clipped-visible-rect-expected.txt: * platform/mac/compositing/visible-rect/flipped-preserve-3d-expected.txt: * platform/mac/compositing/visible-rect/iframe-and-layers-expected.txt: * platform/mac/compositing/visible-rect/nested-transform-expected.txt: * tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt: * tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt: * tiled-drawing/tile-coverage-iframe-to-zero-coverage-expected.txt: Canonical link: https://commits.webkit.org/196699@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-14 09:39:59 +00:00
(offsetFromRenderer width=1 height=1)
Expand compositing coverage rect when scrolling and animating https://bugs.webkit.org/show_bug.cgi?id=144214 rdar://problem/20695926 Reviewed by Darin Adler. Source/WebCore: r183300 added a secondary rect that gets mapped through graphics layers during layer flushing, which represents a rect, in layer coordinates, that represents the portion of this layer that's visible in the viewport. This patch extends that rect based on scrolling and animating, with the extended coverage rect being mapped into descendants (where it's used to determine whether they should detach their backing store). This required moving the responsibility for extending the coverage rect from TileController (where it was used to compute tiled extent), to GraphicsLayerCA. Thus, GraphicsLayerCA now owns the concept of coverage rect, and pushes it onto TileControllers. Test: compositing/tiling/transform-origin-tiled.html * platform/graphics/TiledBacking.h: Coverage rect is now pushed onto TiledBacking from outside; new functions reflect that. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): No need to pass old visible rect to commitLayerChangesBeforeSublayers. (WebCore::accumulatesTransform): (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush): Now calls computeVisibleAndCoverageRect(), then adjustCoverageRect() which adjusts for scrolling and animations. (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect): Fetch the coverage rect from the TransformState, but we can only use this if mapping it through various transforms didn't clamp it (which can happen with severe rotations in perspective). (WebCore::GraphicsLayerCA::adjustCoverageRect): If this layer represents the page tiled backing, ask the TileController to do coverage adjustment (code which should move into here eventually). For other tiled layers, do motion-based adjustment. This should really be done for all layers (an animating non-tiled layer may contain a tiled layer). (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): The VisibleRectChanged wasn't needed any more; layers only react to changed in coverage rect now. (WebCore::GraphicsLayerCA::recursiveCommitChanges): If adjustCoverageRect() changed the coverage rect, here we push the new rect back into the TransformState so it will affect descendants. (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): (WebCore::GraphicsLayerCA::updateCoverage): Coverage and backing store attachment go hand-in-hand now. (WebCore::GraphicsLayerCA::changeLayerTypeTo): (WebCore::GraphicsLayerCA::computeVisibleRect): Deleted. (WebCore::GraphicsLayerCA::updateBackingStoreAttachment): Deleted. (WebCore::GraphicsLayerCA::updateVisibleRect): Deleted. * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/ca/TileController.cpp: (WebCore::TileController::setVisibleRect): Visible rect is only used for scroll performance logging now. (WebCore::TileController::setCoverageRect): (WebCore::TileController::tilesWouldChangeForCoverageRect): (WebCore::TileController::revalidateTiles): (WebCore::TileController::boundsForSize): This is required because when computeTileCoverageRect() is called at the top of committing the owning layer, we haven't yet pushed a new size to the underlying platform layer (which TileController::bounds() consults). (WebCore::TileController::bounds): (WebCore::TileController::computeTileCoverageRect): Have to push the new size in, since the underlying layer hasn't been updated yet. (WebCore::TileController::didRevalidateTiles): (WebCore::TileController::tilesWouldChangeForVisibleRect): Deleted. * platform/graphics/ca/TileController.h: * platform/graphics/ca/TileCoverageMap.cpp: (WebCore::TileCoverageMap::TileCoverageMap): Add a layer to the tile map that shows a dark blue outline for the coverage rect. (WebCore::TileCoverageMap::update): Fix some minor issues with map position when top content inset is non-zero. * platform/graphics/ca/TileCoverageMap.h: * platform/graphics/ca/TileGrid.cpp: Everything is in terms of coverage rect now. (WebCore::TileGrid::tilesWouldChangeForCoverageRect): (WebCore::TileGrid::revalidateTiles): (WebCore::TileGrid::tilesWouldChangeForVisibleRect): Deleted. * platform/graphics/ca/TileGrid.h: * platform/graphics/transforms/TransformState.cpp: (WebCore::TransformState::operator=): (WebCore::TransformState::mappedQuad): Pass direction into mapQuad(). (WebCore::TransformState::mappedSecondaryQuad): Ditto. (WebCore::TransformState::setLastPlanarSecondaryQuad): This function allows a caller to pass in a secondary quad, and get it mapped into the coordinate space of the last "flattening" state (since the TransformState may have in-flight XY offset, or transform). This mapping is achieved by re-using mapQuad(), but in the inverse direction. (WebCore::TransformState::mapQuad): Make direction a parameter. (WebCore::TransformState::flattenWithTransform): This code omitted to map the secondary quad. Failure was detected by tests. * platform/graphics/transforms/TransformState.h: (WebCore::TransformState::isMappingSecondaryQuad): (WebCore::TransformState::direction): (WebCore::TransformState::inverseDirection): (WebCore::TransformState::lastPlanarSecondaryQuad): Deleted. LayoutTests: New baselines for tests dumping layer output, with coverage rect being affected by this changeset. One new test for tiling a layer inside overflow:hidden with transform-origin. * compositing/contents-scale/animating-expected.txt: * compositing/contents-scale/rounded-contents-scale-expected.txt: * compositing/contents-scale/scaled-ancestor-expected.txt: * compositing/contents-scale/simple-scale-expected.txt: * compositing/tiling/transform-origin-tiled.html: Added. * platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt: * platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: * platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt: * platform/mac-wk2/compositing/visible-rect/iframe-no-layers-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt: * platform/mac-wk2/tiled-drawing/simple-document-with-margin-tiles-expected.txt: * platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt: * platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration-expected.txt: * platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-expected.txt: * platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt: * platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt: * platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: * platform/mac/compositing/tiling/tile-cache-zoomed-expected.txt: * platform/mac/compositing/visible-rect/2d-transformed-expected.txt: * platform/mac/compositing/visible-rect/3d-transformed-expected.txt: * platform/mac/compositing/visible-rect/clipped-by-viewport-expected.txt: * platform/mac/compositing/visible-rect/clipped-visible-rect-expected.txt: * platform/mac/compositing/visible-rect/iframe-and-layers-expected.txt: * platform/mac/compositing/visible-rect/iframe-no-layers-expected.txt: * platform/mac/compositing/visible-rect/scrolled-expected.txt: Canonical link: https://commits.webkit.org/162220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-04-26 17:24:40 +00:00
(position 1.00 1.00)
(bounds 500.00 300.00)
(childrenTransform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 -0.00] [0.00 0.00 0.00 1.00])
(visible rect 0.00, 0.00 500.00 x 300.00)
(coverage rect 0.00, 0.00 500.00 x 300.00)
(intersects coverage rect 1)
(contentsScale 1.00)
(children 1
(GraphicsLayer
(position -1250.00 0.00)
(anchor 0.54 0.50)
(bounds 2800.00 300.00)
(usingTiledLayer 1)
(contentsOpaque 1)
(drawsContent 1)
(visible rect 1250.00, 0.00 500.00 x 300.00)
(coverage rect 1250.00, 0.00 500.00 x 300.00)
(intersects coverage rect 1)
(contentsScale 1.00)
(tile cache coverage 1024, 0 1024 x 300)
(tile size 512 x 512)
(top left tile 2, 0 tiles grid 2 x 1)
Correctly set the "inWindow" flag for TileControllers that aren't the page tiles, and clarify "usingTiledBacking" logic https://bugs.webkit.org/show_bug.cgi?id=167774 Reviewed by Tim Horton. Source/WebCore: RenderLayerBacking had some very confusing "usingTiledCacheLayer" uses. Its member variable, m_usingTiledCacheLayer, really meant "m_isMainFrameLayerWithTiledBacking" so make it so. It had a usingTiledBacking(), which returned the same thing, which this patch replaces with isMainFrameLayerWithTiledBacking(). The fact that usingTiledBacking() was only true for the page tiled layer tripped up RenderLayerCompositor::setIsInWindowForLayerIncludingDescendants(), which would only ever call setIsInWindow() on the page tiled layer. These changes fix that. Also make a way for tests to unparent the web view via UIScriptController, and dump out the "in window" status of TileBackings when dumping tile caches. Test: tiled-drawing/tiled-backing-in-window.html * platform/graphics/TiledBacking.h: * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::dumpAdditionalProperties): * platform/graphics/ca/TileController.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): (WebCore::computePageTiledBackingCoverage): (WebCore::RenderLayerBacking::adjustTiledBackingCoverage): (WebCore::RenderLayerBacking::setTiledBackingHasMargins): (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): (WebCore::RenderLayerBacking::shouldClipCompositedBounds): (WebCore::RenderLayerBacking::updateDescendantClippingLayer): (WebCore::RenderLayerBacking::updateRootLayerConfiguration): (WebCore::RenderLayerBacking::paintsIntoWindow): (WebCore::computeTileCoverage): Deleted. * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::flushPendingLayerChanges): (WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged): (WebCore::RenderLayerCompositor::setIsInWindowForLayerIncludingDescendants): (WebCore::RenderLayerCompositor::supportsFixedRootBackgroundCompositing): (WebCore::RenderLayerCompositor::documentUsesTiledBacking): Tools: Implement UIScriptController removeViewFromWindow() and addViewToWindow(), and hook up for Mac WK1 and WK2, and iOS WK2. It takes a callback because view state updates to the web process are async, so the callback fires after the web process gets the new state. * DumpRenderTree/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::removeViewFromWindow): (WTR::UIScriptController::addViewToWindow): * DumpRenderTree/mac/DumpRenderTree.mm: (createWebViewAndOffscreenWindow): (resetWebViewToConsistentStateBeforeTesting): * DumpRenderTree/mac/DumpRenderTreeMac.h: * DumpRenderTree/mac/UIScriptControllerMac.mm: (WTR::UIScriptController::removeViewFromWindow): (WTR::UIScriptController::addViewToWindow): * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * TestRunnerShared/UIScriptContext/UIScriptController.cpp: (WTR::UIScriptController::removeViewFromWindow): (WTR::UIScriptController::addViewToWindow): * TestRunnerShared/UIScriptContext/UIScriptController.h: * WebKitTestRunner/PlatformWebView.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/ios/PlatformWebViewIOS.mm: (WTR::PlatformWebView::removeFromWindow): (WTR::PlatformWebView::addToWindow): * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::removeViewFromWindow): (WTR::UIScriptController::addViewToWindow): * WebKitTestRunner/mac/PlatformWebViewMac.mm: (WTR::PlatformWebView::removeFromWindow): (WTR::PlatformWebView::addToWindow): * WebKitTestRunner/mac/UIScriptControllerMac.mm: (WTR::UIScriptController::removeViewFromWindow): (WTR::UIScriptController::addViewToWindow): LayoutTests: Rebase to include the "in window" output. tiled-drawing/background-transparency-toggle.html was sensitive to the length of the output, so give the body a fixed size. * compositing/tiling/offscreen-tiled-layer-expected.txt: * compositing/tiling/transform-origin-tiled-expected.txt: * platform/mac-wk1/compositing/tiling/offscreen-tiled-layer-expected.txt: * platform/mac-wk1/compositing/tiling/transform-origin-tiled-expected.txt: * platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt: * platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: * platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt: * platform/mac-wk2/compositing/tiling/tiled-layer-resize-expected.txt: * platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt: * platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: * platform/mac/compositing/tiling/tiled-layer-resize-expected.txt: * tiled-drawing/background-transparency-toggle-expected.txt: * tiled-drawing/background-transparency-toggle.html: * tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt: * tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt: * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt: * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt: * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt: * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt: * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt: * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt: * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt: * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt: * tiled-drawing/scrolling/fast-scroll-select-latched-select-expected.txt: * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-body-background-body-layer-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-body-background-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-body-background-opacity-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-body-background-positioned-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-body-background-transformed-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-body-background-zoomed-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-html-background-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-non-propagated-body-background-expected.txt: * tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt: * tiled-drawing/simple-document-with-margin-tiles-expected.txt: * tiled-drawing/tile-coverage-after-scroll-expected.txt: * tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt: * tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt: * tiled-drawing/tile-coverage-slow-scrolling-expected.txt: * tiled-drawing/tile-coverage-speculative-expected.txt: * tiled-drawing/tile-coverage-view-exposed-rect-expected.txt: * tiled-drawing/tile-size-both-scrollable-expected.txt: * tiled-drawing/tile-size-horizontally-scrollable-expected.txt: * tiled-drawing/tile-size-slow-zoomed-expected.txt: * tiled-drawing/tile-size-unscrollable-expected.txt: * tiled-drawing/tile-size-vertically-scrollable-expected.txt: * tiled-drawing/tile-size-view-exposed-rect-expected.txt: * tiled-drawing/tiled-backing-in-window-expected.txt: Added. * tiled-drawing/tiled-backing-in-window.html: Added. * tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration-expected.txt: * tiled-drawing/tiled-drawing-zoom-expected.txt: * tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt: * tiled-drawing/use-tiled-drawing-expected.txt: * tiled-drawing/visible-rect-content-inset-expected.txt: Canonical link: https://commits.webkit.org/184865@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-04 01:53:38 +00:00
(in window 1)
Expand compositing coverage rect when scrolling and animating https://bugs.webkit.org/show_bug.cgi?id=144214 rdar://problem/20695926 Reviewed by Darin Adler. Source/WebCore: r183300 added a secondary rect that gets mapped through graphics layers during layer flushing, which represents a rect, in layer coordinates, that represents the portion of this layer that's visible in the viewport. This patch extends that rect based on scrolling and animating, with the extended coverage rect being mapped into descendants (where it's used to determine whether they should detach their backing store). This required moving the responsibility for extending the coverage rect from TileController (where it was used to compute tiled extent), to GraphicsLayerCA. Thus, GraphicsLayerCA now owns the concept of coverage rect, and pushes it onto TileControllers. Test: compositing/tiling/transform-origin-tiled.html * platform/graphics/TiledBacking.h: Coverage rect is now pushed onto TiledBacking from outside; new functions reflect that. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): No need to pass old visible rect to commitLayerChangesBeforeSublayers. (WebCore::accumulatesTransform): (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush): Now calls computeVisibleAndCoverageRect(), then adjustCoverageRect() which adjusts for scrolling and animations. (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect): Fetch the coverage rect from the TransformState, but we can only use this if mapping it through various transforms didn't clamp it (which can happen with severe rotations in perspective). (WebCore::GraphicsLayerCA::adjustCoverageRect): If this layer represents the page tiled backing, ask the TileController to do coverage adjustment (code which should move into here eventually). For other tiled layers, do motion-based adjustment. This should really be done for all layers (an animating non-tiled layer may contain a tiled layer). (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): The VisibleRectChanged wasn't needed any more; layers only react to changed in coverage rect now. (WebCore::GraphicsLayerCA::recursiveCommitChanges): If adjustCoverageRect() changed the coverage rect, here we push the new rect back into the TransformState so it will affect descendants. (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): (WebCore::GraphicsLayerCA::updateCoverage): Coverage and backing store attachment go hand-in-hand now. (WebCore::GraphicsLayerCA::changeLayerTypeTo): (WebCore::GraphicsLayerCA::computeVisibleRect): Deleted. (WebCore::GraphicsLayerCA::updateBackingStoreAttachment): Deleted. (WebCore::GraphicsLayerCA::updateVisibleRect): Deleted. * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/ca/TileController.cpp: (WebCore::TileController::setVisibleRect): Visible rect is only used for scroll performance logging now. (WebCore::TileController::setCoverageRect): (WebCore::TileController::tilesWouldChangeForCoverageRect): (WebCore::TileController::revalidateTiles): (WebCore::TileController::boundsForSize): This is required because when computeTileCoverageRect() is called at the top of committing the owning layer, we haven't yet pushed a new size to the underlying platform layer (which TileController::bounds() consults). (WebCore::TileController::bounds): (WebCore::TileController::computeTileCoverageRect): Have to push the new size in, since the underlying layer hasn't been updated yet. (WebCore::TileController::didRevalidateTiles): (WebCore::TileController::tilesWouldChangeForVisibleRect): Deleted. * platform/graphics/ca/TileController.h: * platform/graphics/ca/TileCoverageMap.cpp: (WebCore::TileCoverageMap::TileCoverageMap): Add a layer to the tile map that shows a dark blue outline for the coverage rect. (WebCore::TileCoverageMap::update): Fix some minor issues with map position when top content inset is non-zero. * platform/graphics/ca/TileCoverageMap.h: * platform/graphics/ca/TileGrid.cpp: Everything is in terms of coverage rect now. (WebCore::TileGrid::tilesWouldChangeForCoverageRect): (WebCore::TileGrid::revalidateTiles): (WebCore::TileGrid::tilesWouldChangeForVisibleRect): Deleted. * platform/graphics/ca/TileGrid.h: * platform/graphics/transforms/TransformState.cpp: (WebCore::TransformState::operator=): (WebCore::TransformState::mappedQuad): Pass direction into mapQuad(). (WebCore::TransformState::mappedSecondaryQuad): Ditto. (WebCore::TransformState::setLastPlanarSecondaryQuad): This function allows a caller to pass in a secondary quad, and get it mapped into the coordinate space of the last "flattening" state (since the TransformState may have in-flight XY offset, or transform). This mapping is achieved by re-using mapQuad(), but in the inverse direction. (WebCore::TransformState::mapQuad): Make direction a parameter. (WebCore::TransformState::flattenWithTransform): This code omitted to map the secondary quad. Failure was detected by tests. * platform/graphics/transforms/TransformState.h: (WebCore::TransformState::isMappingSecondaryQuad): (WebCore::TransformState::direction): (WebCore::TransformState::inverseDirection): (WebCore::TransformState::lastPlanarSecondaryQuad): Deleted. LayoutTests: New baselines for tests dumping layer output, with coverage rect being affected by this changeset. One new test for tiling a layer inside overflow:hidden with transform-origin. * compositing/contents-scale/animating-expected.txt: * compositing/contents-scale/rounded-contents-scale-expected.txt: * compositing/contents-scale/scaled-ancestor-expected.txt: * compositing/contents-scale/simple-scale-expected.txt: * compositing/tiling/transform-origin-tiled.html: Added. * platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt: * platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: * platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt: * platform/mac-wk2/compositing/visible-rect/iframe-no-layers-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt: * platform/mac-wk2/tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt: * platform/mac-wk2/tiled-drawing/simple-document-with-margin-tiles-expected.txt: * platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt: * platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration-expected.txt: * platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-expected.txt: * platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt: * platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt: * platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: * platform/mac/compositing/tiling/tile-cache-zoomed-expected.txt: * platform/mac/compositing/visible-rect/2d-transformed-expected.txt: * platform/mac/compositing/visible-rect/3d-transformed-expected.txt: * platform/mac/compositing/visible-rect/clipped-by-viewport-expected.txt: * platform/mac/compositing/visible-rect/clipped-visible-rect-expected.txt: * platform/mac/compositing/visible-rect/iframe-and-layers-expected.txt: * platform/mac/compositing/visible-rect/iframe-no-layers-expected.txt: * platform/mac/compositing/visible-rect/scrolled-expected.txt: Canonical link: https://commits.webkit.org/162220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-04-26 17:24:40 +00:00
)
)
)
)
)
)
)
)
)