haikuwebkit/LayoutTests/tiled-drawing/tile-size-view-exposed-rect...

16 lines
296 B
Plaintext
Raw Permalink Normal View History

Make it possible to test effect of view exposed rect on tiled backing https://bugs.webkit.org/show_bug.cgi?id=156365 Reviewed by Tim Horton. Source/WebCore: Implement Internals::setViewExposedRect(). When the viewExposedRect is non-null, assume that we're scrollable on both axes to avoid creation of huge tiles in this scenario. We also need to call adjustTiledBackingScrollability() when setViewExposedRect() has been called. Tests: tiled-drawing/tile-coverage-view-exposed-rect.html tiled-drawing/tile-size-view-exposed-rect.html * page/FrameView.cpp: (WebCore::FrameView::adjustTiledBackingScrollability): (WebCore::FrameView::setViewExposedRect): * testing/Internals.cpp: (WebCore::Internals::setViewExposedRect): * testing/Internals.h: * testing/Internals.idl: Tools: Expose testRunner.setViewSize() and internals.setViewExposedRect() to enable testing of tile coverage when setViewExposedRect() is passed a non-null rectangle. testRunner.setViewSize() is used instead of using window.resizeTo(), since we can't easily resize a window to larger than the screen being tested on. * DumpRenderTree/TestRunner.cpp: (setViewSizeCallback): (TestRunner::staticFunctions): * DumpRenderTree/TestRunner.h: * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::setViewSize): * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::postSetViewSize): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setViewSize): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): LayoutTests: Tests for tile size and tile coverage when we have an exposed view rect. * tiled-drawing/tile-coverage-view-exposed-rect-expected.txt: Added. * tiled-drawing/tile-coverage-view-exposed-rect.html: Added. * tiled-drawing/tile-size-view-exposed-rect-expected.txt: Added. * tiled-drawing/tile-size-view-exposed-rect.html: Added. Canonical link: https://commits.webkit.org/174469@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-07 23:14:25 +00:00
(GraphicsLayer
(anchor 0.00 0.00)
(bounds 800.00 600.00)
(children 1
(GraphicsLayer
(bounds 800.00 600.00)
(contentsOpaque 1)
(tile cache coverage 0, 0 800 x 512)
(tile size 512 x 512)
(top left tile 0, 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)
Make it possible to test effect of view exposed rect on tiled backing https://bugs.webkit.org/show_bug.cgi?id=156365 Reviewed by Tim Horton. Source/WebCore: Implement Internals::setViewExposedRect(). When the viewExposedRect is non-null, assume that we're scrollable on both axes to avoid creation of huge tiles in this scenario. We also need to call adjustTiledBackingScrollability() when setViewExposedRect() has been called. Tests: tiled-drawing/tile-coverage-view-exposed-rect.html tiled-drawing/tile-size-view-exposed-rect.html * page/FrameView.cpp: (WebCore::FrameView::adjustTiledBackingScrollability): (WebCore::FrameView::setViewExposedRect): * testing/Internals.cpp: (WebCore::Internals::setViewExposedRect): * testing/Internals.h: * testing/Internals.idl: Tools: Expose testRunner.setViewSize() and internals.setViewExposedRect() to enable testing of tile coverage when setViewExposedRect() is passed a non-null rectangle. testRunner.setViewSize() is used instead of using window.resizeTo(), since we can't easily resize a window to larger than the screen being tested on. * DumpRenderTree/TestRunner.cpp: (setViewSizeCallback): (TestRunner::staticFunctions): * DumpRenderTree/TestRunner.h: * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::setViewSize): * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::postSetViewSize): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setViewSize): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): LayoutTests: Tests for tile size and tile coverage when we have an exposed view rect. * tiled-drawing/tile-coverage-view-exposed-rect-expected.txt: Added. * tiled-drawing/tile-coverage-view-exposed-rect.html: Added. * tiled-drawing/tile-size-view-exposed-rect-expected.txt: Added. * tiled-drawing/tile-size-view-exposed-rect.html: Added. Canonical link: https://commits.webkit.org/174469@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-07 23:14:25 +00:00
)
)
)