haikuwebkit/LayoutTests/tiled-drawing/background-transparency-tog...

61 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

Fix updating of tiled backing opaquenss when the page background color changes https://bugs.webkit.org/show_bug.cgi?id=144600 rdar://problem/20723035 Reviewed by Tim Horton. Source/WebCore: RenderLayerCompositor makes the page tiles opaque or not based on the result of viewHasTransparentBackground(), which consults the view transparency, and FrameView::documentBackgroundColor(). documentBackgroundColor() in turn is based on the root and/or body background colors. We thus need to re-evaluate whether page tiles are opaque when any of these inputs change, but were failing to do so for the FrameView's baseBackgroundColor, and the page root background color. Fix by having FrameView::setBaseBackgroundColor(), and RenderBox::styleDidChange() (for the root) trigger a compositing update when necessary. Added setViewBaseBackgroundColor() on Internals for testing. Test: platform/mac-wk2/tiled-drawing/background-transparency-toggle.html * page/FrameView.cpp: (WebCore::FrameView::setTransparent): Use the isViewForDocumentInFrame() helper. (WebCore::FrameView::setBaseBackgroundColor): Bail if we're not the view for the frame's document, and trigger a compositing update check if the alpha changed. (WebCore::FrameView::isViewForDocumentInFrame): Helper that checks to see if this FrameView is associated with the Document being displayed in the FrameView's Frame. This returns false when we're setting up a new FrameView (its Frame still points to the old document, so renderView() returns the RenderView for the Frame's existing Document). * page/FrameView.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): Have the compositor check to see if it needs to do an update. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): If the result of documentBackgroundColor() changed in alpha since the last time, trigger a compositing update. * rendering/RenderLayerCompositor.h: * testing/Internals.cpp: (WebCore::Internals::setViewBaseBackgroundColor): * testing/Internals.h: * testing/Internals.idl: LayoutTests: Test that dumps layers with various baseBackgroundColor and body background color combinations. * platform/mac-wk2/tiled-drawing/background-transparency-toggle-expected.txt: Added. * platform/mac-wk2/tiled-drawing/background-transparency-toggle.html: Added. Canonical link: https://commits.webkit.org/162610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-04 22:53:10 +00:00
Page tiles should be transparent if the body's background has alpha.
(GraphicsLayer
(anchor 0.00 0.00)
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
(bounds 785.00 1024.00)
Fix updating of tiled backing opaquenss when the page background color changes https://bugs.webkit.org/show_bug.cgi?id=144600 rdar://problem/20723035 Reviewed by Tim Horton. Source/WebCore: RenderLayerCompositor makes the page tiles opaque or not based on the result of viewHasTransparentBackground(), which consults the view transparency, and FrameView::documentBackgroundColor(). documentBackgroundColor() in turn is based on the root and/or body background colors. We thus need to re-evaluate whether page tiles are opaque when any of these inputs change, but were failing to do so for the FrameView's baseBackgroundColor, and the page root background color. Fix by having FrameView::setBaseBackgroundColor(), and RenderBox::styleDidChange() (for the root) trigger a compositing update when necessary. Added setViewBaseBackgroundColor() on Internals for testing. Test: platform/mac-wk2/tiled-drawing/background-transparency-toggle.html * page/FrameView.cpp: (WebCore::FrameView::setTransparent): Use the isViewForDocumentInFrame() helper. (WebCore::FrameView::setBaseBackgroundColor): Bail if we're not the view for the frame's document, and trigger a compositing update check if the alpha changed. (WebCore::FrameView::isViewForDocumentInFrame): Helper that checks to see if this FrameView is associated with the Document being displayed in the FrameView's Frame. This returns false when we're setting up a new FrameView (its Frame still points to the old document, so renderView() returns the RenderView for the Frame's existing Document). * page/FrameView.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): Have the compositor check to see if it needs to do an update. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): If the result of documentBackgroundColor() changed in alpha since the last time, trigger a compositing update. * rendering/RenderLayerCompositor.h: * testing/Internals.cpp: (WebCore::Internals::setViewBaseBackgroundColor): * testing/Internals.h: * testing/Internals.idl: LayoutTests: Test that dumps layers with various baseBackgroundColor and body background color combinations. * platform/mac-wk2/tiled-drawing/background-transparency-toggle-expected.txt: Added. * platform/mac-wk2/tiled-drawing/background-transparency-toggle.html: Added. Canonical link: https://commits.webkit.org/162610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-04 22:53:10 +00:00
(children 1
(GraphicsLayer
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
(bounds 785.00 1024.00)
Fix updating of tiled backing opaquenss when the page background color changes https://bugs.webkit.org/show_bug.cgi?id=144600 rdar://problem/20723035 Reviewed by Tim Horton. Source/WebCore: RenderLayerCompositor makes the page tiles opaque or not based on the result of viewHasTransparentBackground(), which consults the view transparency, and FrameView::documentBackgroundColor(). documentBackgroundColor() in turn is based on the root and/or body background colors. We thus need to re-evaluate whether page tiles are opaque when any of these inputs change, but were failing to do so for the FrameView's baseBackgroundColor, and the page root background color. Fix by having FrameView::setBaseBackgroundColor(), and RenderBox::styleDidChange() (for the root) trigger a compositing update when necessary. Added setViewBaseBackgroundColor() on Internals for testing. Test: platform/mac-wk2/tiled-drawing/background-transparency-toggle.html * page/FrameView.cpp: (WebCore::FrameView::setTransparent): Use the isViewForDocumentInFrame() helper. (WebCore::FrameView::setBaseBackgroundColor): Bail if we're not the view for the frame's document, and trigger a compositing update check if the alpha changed. (WebCore::FrameView::isViewForDocumentInFrame): Helper that checks to see if this FrameView is associated with the Document being displayed in the FrameView's Frame. This returns false when we're setting up a new FrameView (its Frame still points to the old document, so renderView() returns the RenderView for the Frame's existing Document). * page/FrameView.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): Have the compositor check to see if it needs to do an update. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): If the result of documentBackgroundColor() changed in alpha since the last time, trigger a compositing update. * rendering/RenderLayerCompositor.h: * testing/Internals.cpp: (WebCore::Internals::setViewBaseBackgroundColor): * testing/Internals.h: * testing/Internals.idl: LayoutTests: Test that dumps layers with various baseBackgroundColor and body background color combinations. * platform/mac-wk2/tiled-drawing/background-transparency-toggle-expected.txt: Added. * platform/mac-wk2/tiled-drawing/background-transparency-toggle.html: Added. Canonical link: https://commits.webkit.org/162610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-04 22:53:10 +00:00
(contentsOpaque 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
(tile cache coverage 0, 0 785 x 1024)
(tile size 785 x 512)
(top left tile 0, 0 tiles grid 1 x 2)
(in window 1)
Fix updating of tiled backing opaquenss when the page background color changes https://bugs.webkit.org/show_bug.cgi?id=144600 rdar://problem/20723035 Reviewed by Tim Horton. Source/WebCore: RenderLayerCompositor makes the page tiles opaque or not based on the result of viewHasTransparentBackground(), which consults the view transparency, and FrameView::documentBackgroundColor(). documentBackgroundColor() in turn is based on the root and/or body background colors. We thus need to re-evaluate whether page tiles are opaque when any of these inputs change, but were failing to do so for the FrameView's baseBackgroundColor, and the page root background color. Fix by having FrameView::setBaseBackgroundColor(), and RenderBox::styleDidChange() (for the root) trigger a compositing update when necessary. Added setViewBaseBackgroundColor() on Internals for testing. Test: platform/mac-wk2/tiled-drawing/background-transparency-toggle.html * page/FrameView.cpp: (WebCore::FrameView::setTransparent): Use the isViewForDocumentInFrame() helper. (WebCore::FrameView::setBaseBackgroundColor): Bail if we're not the view for the frame's document, and trigger a compositing update check if the alpha changed. (WebCore::FrameView::isViewForDocumentInFrame): Helper that checks to see if this FrameView is associated with the Document being displayed in the FrameView's Frame. This returns false when we're setting up a new FrameView (its Frame still points to the old document, so renderView() returns the RenderView for the Frame's existing Document). * page/FrameView.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): Have the compositor check to see if it needs to do an update. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): If the result of documentBackgroundColor() changed in alpha since the last time, trigger a compositing update. * rendering/RenderLayerCompositor.h: * testing/Internals.cpp: (WebCore::Internals::setViewBaseBackgroundColor): * testing/Internals.h: * testing/Internals.idl: LayoutTests: Test that dumps layers with various baseBackgroundColor and body background color combinations. * platform/mac-wk2/tiled-drawing/background-transparency-toggle-expected.txt: Added. * platform/mac-wk2/tiled-drawing/background-transparency-toggle.html: Added. Canonical link: https://commits.webkit.org/162610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-04 22:53:10 +00:00
)
)
)
(GraphicsLayer
(anchor 0.00 0.00)
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
(bounds 785.00 1024.00)
Fix updating of tiled backing opaquenss when the page background color changes https://bugs.webkit.org/show_bug.cgi?id=144600 rdar://problem/20723035 Reviewed by Tim Horton. Source/WebCore: RenderLayerCompositor makes the page tiles opaque or not based on the result of viewHasTransparentBackground(), which consults the view transparency, and FrameView::documentBackgroundColor(). documentBackgroundColor() in turn is based on the root and/or body background colors. We thus need to re-evaluate whether page tiles are opaque when any of these inputs change, but were failing to do so for the FrameView's baseBackgroundColor, and the page root background color. Fix by having FrameView::setBaseBackgroundColor(), and RenderBox::styleDidChange() (for the root) trigger a compositing update when necessary. Added setViewBaseBackgroundColor() on Internals for testing. Test: platform/mac-wk2/tiled-drawing/background-transparency-toggle.html * page/FrameView.cpp: (WebCore::FrameView::setTransparent): Use the isViewForDocumentInFrame() helper. (WebCore::FrameView::setBaseBackgroundColor): Bail if we're not the view for the frame's document, and trigger a compositing update check if the alpha changed. (WebCore::FrameView::isViewForDocumentInFrame): Helper that checks to see if this FrameView is associated with the Document being displayed in the FrameView's Frame. This returns false when we're setting up a new FrameView (its Frame still points to the old document, so renderView() returns the RenderView for the Frame's existing Document). * page/FrameView.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): Have the compositor check to see if it needs to do an update. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): If the result of documentBackgroundColor() changed in alpha since the last time, trigger a compositing update. * rendering/RenderLayerCompositor.h: * testing/Internals.cpp: (WebCore::Internals::setViewBaseBackgroundColor): * testing/Internals.h: * testing/Internals.idl: LayoutTests: Test that dumps layers with various baseBackgroundColor and body background color combinations. * platform/mac-wk2/tiled-drawing/background-transparency-toggle-expected.txt: Added. * platform/mac-wk2/tiled-drawing/background-transparency-toggle.html: Added. Canonical link: https://commits.webkit.org/162610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-04 22:53:10 +00:00
(children 1
(GraphicsLayer
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
(bounds 785.00 1024.00)
Fix updating of tiled backing opaquenss when the page background color changes https://bugs.webkit.org/show_bug.cgi?id=144600 rdar://problem/20723035 Reviewed by Tim Horton. Source/WebCore: RenderLayerCompositor makes the page tiles opaque or not based on the result of viewHasTransparentBackground(), which consults the view transparency, and FrameView::documentBackgroundColor(). documentBackgroundColor() in turn is based on the root and/or body background colors. We thus need to re-evaluate whether page tiles are opaque when any of these inputs change, but were failing to do so for the FrameView's baseBackgroundColor, and the page root background color. Fix by having FrameView::setBaseBackgroundColor(), and RenderBox::styleDidChange() (for the root) trigger a compositing update when necessary. Added setViewBaseBackgroundColor() on Internals for testing. Test: platform/mac-wk2/tiled-drawing/background-transparency-toggle.html * page/FrameView.cpp: (WebCore::FrameView::setTransparent): Use the isViewForDocumentInFrame() helper. (WebCore::FrameView::setBaseBackgroundColor): Bail if we're not the view for the frame's document, and trigger a compositing update check if the alpha changed. (WebCore::FrameView::isViewForDocumentInFrame): Helper that checks to see if this FrameView is associated with the Document being displayed in the FrameView's Frame. This returns false when we're setting up a new FrameView (its Frame still points to the old document, so renderView() returns the RenderView for the Frame's existing Document). * page/FrameView.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): Have the compositor check to see if it needs to do an update. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): If the result of documentBackgroundColor() changed in alpha since the last time, trigger a compositing update. * rendering/RenderLayerCompositor.h: * testing/Internals.cpp: (WebCore::Internals::setViewBaseBackgroundColor): * testing/Internals.h: * testing/Internals.idl: LayoutTests: Test that dumps layers with various baseBackgroundColor and body background color combinations. * platform/mac-wk2/tiled-drawing/background-transparency-toggle-expected.txt: Added. * platform/mac-wk2/tiled-drawing/background-transparency-toggle.html: Added. Canonical link: https://commits.webkit.org/162610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-04 22:53:10 +00:00
(backgroundColor #00000033)
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
(tile cache coverage 0, 0 785 x 1024)
(tile size 785 x 512)
(top left tile 0, 0 tiles grid 1 x 2)
(in window 1)
Fix updating of tiled backing opaquenss when the page background color changes https://bugs.webkit.org/show_bug.cgi?id=144600 rdar://problem/20723035 Reviewed by Tim Horton. Source/WebCore: RenderLayerCompositor makes the page tiles opaque or not based on the result of viewHasTransparentBackground(), which consults the view transparency, and FrameView::documentBackgroundColor(). documentBackgroundColor() in turn is based on the root and/or body background colors. We thus need to re-evaluate whether page tiles are opaque when any of these inputs change, but were failing to do so for the FrameView's baseBackgroundColor, and the page root background color. Fix by having FrameView::setBaseBackgroundColor(), and RenderBox::styleDidChange() (for the root) trigger a compositing update when necessary. Added setViewBaseBackgroundColor() on Internals for testing. Test: platform/mac-wk2/tiled-drawing/background-transparency-toggle.html * page/FrameView.cpp: (WebCore::FrameView::setTransparent): Use the isViewForDocumentInFrame() helper. (WebCore::FrameView::setBaseBackgroundColor): Bail if we're not the view for the frame's document, and trigger a compositing update check if the alpha changed. (WebCore::FrameView::isViewForDocumentInFrame): Helper that checks to see if this FrameView is associated with the Document being displayed in the FrameView's Frame. This returns false when we're setting up a new FrameView (its Frame still points to the old document, so renderView() returns the RenderView for the Frame's existing Document). * page/FrameView.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): Have the compositor check to see if it needs to do an update. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): If the result of documentBackgroundColor() changed in alpha since the last time, trigger a compositing update. * rendering/RenderLayerCompositor.h: * testing/Internals.cpp: (WebCore::Internals::setViewBaseBackgroundColor): * testing/Internals.h: * testing/Internals.idl: LayoutTests: Test that dumps layers with various baseBackgroundColor and body background color combinations. * platform/mac-wk2/tiled-drawing/background-transparency-toggle-expected.txt: Added. * platform/mac-wk2/tiled-drawing/background-transparency-toggle.html: Added. Canonical link: https://commits.webkit.org/162610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-04 22:53:10 +00:00
)
)
)
(GraphicsLayer
(anchor 0.00 0.00)
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
(bounds 785.00 1024.00)
Fix updating of tiled backing opaquenss when the page background color changes https://bugs.webkit.org/show_bug.cgi?id=144600 rdar://problem/20723035 Reviewed by Tim Horton. Source/WebCore: RenderLayerCompositor makes the page tiles opaque or not based on the result of viewHasTransparentBackground(), which consults the view transparency, and FrameView::documentBackgroundColor(). documentBackgroundColor() in turn is based on the root and/or body background colors. We thus need to re-evaluate whether page tiles are opaque when any of these inputs change, but were failing to do so for the FrameView's baseBackgroundColor, and the page root background color. Fix by having FrameView::setBaseBackgroundColor(), and RenderBox::styleDidChange() (for the root) trigger a compositing update when necessary. Added setViewBaseBackgroundColor() on Internals for testing. Test: platform/mac-wk2/tiled-drawing/background-transparency-toggle.html * page/FrameView.cpp: (WebCore::FrameView::setTransparent): Use the isViewForDocumentInFrame() helper. (WebCore::FrameView::setBaseBackgroundColor): Bail if we're not the view for the frame's document, and trigger a compositing update check if the alpha changed. (WebCore::FrameView::isViewForDocumentInFrame): Helper that checks to see if this FrameView is associated with the Document being displayed in the FrameView's Frame. This returns false when we're setting up a new FrameView (its Frame still points to the old document, so renderView() returns the RenderView for the Frame's existing Document). * page/FrameView.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): Have the compositor check to see if it needs to do an update. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): If the result of documentBackgroundColor() changed in alpha since the last time, trigger a compositing update. * rendering/RenderLayerCompositor.h: * testing/Internals.cpp: (WebCore::Internals::setViewBaseBackgroundColor): * testing/Internals.h: * testing/Internals.idl: LayoutTests: Test that dumps layers with various baseBackgroundColor and body background color combinations. * platform/mac-wk2/tiled-drawing/background-transparency-toggle-expected.txt: Added. * platform/mac-wk2/tiled-drawing/background-transparency-toggle.html: Added. Canonical link: https://commits.webkit.org/162610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-04 22:53:10 +00:00
(children 1
(GraphicsLayer
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
(bounds 785.00 1024.00)
Fix updating of tiled backing opaquenss when the page background color changes https://bugs.webkit.org/show_bug.cgi?id=144600 rdar://problem/20723035 Reviewed by Tim Horton. Source/WebCore: RenderLayerCompositor makes the page tiles opaque or not based on the result of viewHasTransparentBackground(), which consults the view transparency, and FrameView::documentBackgroundColor(). documentBackgroundColor() in turn is based on the root and/or body background colors. We thus need to re-evaluate whether page tiles are opaque when any of these inputs change, but were failing to do so for the FrameView's baseBackgroundColor, and the page root background color. Fix by having FrameView::setBaseBackgroundColor(), and RenderBox::styleDidChange() (for the root) trigger a compositing update when necessary. Added setViewBaseBackgroundColor() on Internals for testing. Test: platform/mac-wk2/tiled-drawing/background-transparency-toggle.html * page/FrameView.cpp: (WebCore::FrameView::setTransparent): Use the isViewForDocumentInFrame() helper. (WebCore::FrameView::setBaseBackgroundColor): Bail if we're not the view for the frame's document, and trigger a compositing update check if the alpha changed. (WebCore::FrameView::isViewForDocumentInFrame): Helper that checks to see if this FrameView is associated with the Document being displayed in the FrameView's Frame. This returns false when we're setting up a new FrameView (its Frame still points to the old document, so renderView() returns the RenderView for the Frame's existing Document). * page/FrameView.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): Have the compositor check to see if it needs to do an update. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): If the result of documentBackgroundColor() changed in alpha since the last time, trigger a compositing update. * rendering/RenderLayerCompositor.h: * testing/Internals.cpp: (WebCore::Internals::setViewBaseBackgroundColor): * testing/Internals.h: * testing/Internals.idl: LayoutTests: Test that dumps layers with various baseBackgroundColor and body background color combinations. * platform/mac-wk2/tiled-drawing/background-transparency-toggle-expected.txt: Added. * platform/mac-wk2/tiled-drawing/background-transparency-toggle.html: Added. Canonical link: https://commits.webkit.org/162610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-04 22:53:10 +00:00
(contentsOpaque 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
(tile cache coverage 0, 0 785 x 1024)
(tile size 785 x 512)
(top left tile 0, 0 tiles grid 1 x 2)
(in window 1)
Fix updating of tiled backing opaquenss when the page background color changes https://bugs.webkit.org/show_bug.cgi?id=144600 rdar://problem/20723035 Reviewed by Tim Horton. Source/WebCore: RenderLayerCompositor makes the page tiles opaque or not based on the result of viewHasTransparentBackground(), which consults the view transparency, and FrameView::documentBackgroundColor(). documentBackgroundColor() in turn is based on the root and/or body background colors. We thus need to re-evaluate whether page tiles are opaque when any of these inputs change, but were failing to do so for the FrameView's baseBackgroundColor, and the page root background color. Fix by having FrameView::setBaseBackgroundColor(), and RenderBox::styleDidChange() (for the root) trigger a compositing update when necessary. Added setViewBaseBackgroundColor() on Internals for testing. Test: platform/mac-wk2/tiled-drawing/background-transparency-toggle.html * page/FrameView.cpp: (WebCore::FrameView::setTransparent): Use the isViewForDocumentInFrame() helper. (WebCore::FrameView::setBaseBackgroundColor): Bail if we're not the view for the frame's document, and trigger a compositing update check if the alpha changed. (WebCore::FrameView::isViewForDocumentInFrame): Helper that checks to see if this FrameView is associated with the Document being displayed in the FrameView's Frame. This returns false when we're setting up a new FrameView (its Frame still points to the old document, so renderView() returns the RenderView for the Frame's existing Document). * page/FrameView.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): Have the compositor check to see if it needs to do an update. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): If the result of documentBackgroundColor() changed in alpha since the last time, trigger a compositing update. * rendering/RenderLayerCompositor.h: * testing/Internals.cpp: (WebCore::Internals::setViewBaseBackgroundColor): * testing/Internals.h: * testing/Internals.idl: LayoutTests: Test that dumps layers with various baseBackgroundColor and body background color combinations. * platform/mac-wk2/tiled-drawing/background-transparency-toggle-expected.txt: Added. * platform/mac-wk2/tiled-drawing/background-transparency-toggle.html: Added. Canonical link: https://commits.webkit.org/162610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-04 22:53:10 +00:00
)
)
)
(GraphicsLayer
(anchor 0.00 0.00)
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
(bounds 785.00 1024.00)
Fix updating of tiled backing opaquenss when the page background color changes https://bugs.webkit.org/show_bug.cgi?id=144600 rdar://problem/20723035 Reviewed by Tim Horton. Source/WebCore: RenderLayerCompositor makes the page tiles opaque or not based on the result of viewHasTransparentBackground(), which consults the view transparency, and FrameView::documentBackgroundColor(). documentBackgroundColor() in turn is based on the root and/or body background colors. We thus need to re-evaluate whether page tiles are opaque when any of these inputs change, but were failing to do so for the FrameView's baseBackgroundColor, and the page root background color. Fix by having FrameView::setBaseBackgroundColor(), and RenderBox::styleDidChange() (for the root) trigger a compositing update when necessary. Added setViewBaseBackgroundColor() on Internals for testing. Test: platform/mac-wk2/tiled-drawing/background-transparency-toggle.html * page/FrameView.cpp: (WebCore::FrameView::setTransparent): Use the isViewForDocumentInFrame() helper. (WebCore::FrameView::setBaseBackgroundColor): Bail if we're not the view for the frame's document, and trigger a compositing update check if the alpha changed. (WebCore::FrameView::isViewForDocumentInFrame): Helper that checks to see if this FrameView is associated with the Document being displayed in the FrameView's Frame. This returns false when we're setting up a new FrameView (its Frame still points to the old document, so renderView() returns the RenderView for the Frame's existing Document). * page/FrameView.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): Have the compositor check to see if it needs to do an update. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): If the result of documentBackgroundColor() changed in alpha since the last time, trigger a compositing update. * rendering/RenderLayerCompositor.h: * testing/Internals.cpp: (WebCore::Internals::setViewBaseBackgroundColor): * testing/Internals.h: * testing/Internals.idl: LayoutTests: Test that dumps layers with various baseBackgroundColor and body background color combinations. * platform/mac-wk2/tiled-drawing/background-transparency-toggle-expected.txt: Added. * platform/mac-wk2/tiled-drawing/background-transparency-toggle.html: Added. Canonical link: https://commits.webkit.org/162610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-04 22:53:10 +00:00
(children 1
(GraphicsLayer
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
(bounds 785.00 1024.00)
Fix updating of tiled backing opaquenss when the page background color changes https://bugs.webkit.org/show_bug.cgi?id=144600 rdar://problem/20723035 Reviewed by Tim Horton. Source/WebCore: RenderLayerCompositor makes the page tiles opaque or not based on the result of viewHasTransparentBackground(), which consults the view transparency, and FrameView::documentBackgroundColor(). documentBackgroundColor() in turn is based on the root and/or body background colors. We thus need to re-evaluate whether page tiles are opaque when any of these inputs change, but were failing to do so for the FrameView's baseBackgroundColor, and the page root background color. Fix by having FrameView::setBaseBackgroundColor(), and RenderBox::styleDidChange() (for the root) trigger a compositing update when necessary. Added setViewBaseBackgroundColor() on Internals for testing. Test: platform/mac-wk2/tiled-drawing/background-transparency-toggle.html * page/FrameView.cpp: (WebCore::FrameView::setTransparent): Use the isViewForDocumentInFrame() helper. (WebCore::FrameView::setBaseBackgroundColor): Bail if we're not the view for the frame's document, and trigger a compositing update check if the alpha changed. (WebCore::FrameView::isViewForDocumentInFrame): Helper that checks to see if this FrameView is associated with the Document being displayed in the FrameView's Frame. This returns false when we're setting up a new FrameView (its Frame still points to the old document, so renderView() returns the RenderView for the Frame's existing Document). * page/FrameView.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): Have the compositor check to see if it needs to do an update. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): If the result of documentBackgroundColor() changed in alpha since the last time, trigger a compositing update. * rendering/RenderLayerCompositor.h: * testing/Internals.cpp: (WebCore::Internals::setViewBaseBackgroundColor): * testing/Internals.h: * testing/Internals.idl: LayoutTests: Test that dumps layers with various baseBackgroundColor and body background color combinations. * platform/mac-wk2/tiled-drawing/background-transparency-toggle-expected.txt: Added. * platform/mac-wk2/tiled-drawing/background-transparency-toggle.html: Added. Canonical link: https://commits.webkit.org/162610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-04 22:53:10 +00:00
(contentsOpaque 1)
Unpainted area while scrolling in Reader is white https://bugs.webkit.org/show_bug.cgi?id=186541 <rdar://problem/40471363> Reviewed by Timothy Hatcher. Source/WebCore: New test: tiled-drawing/simple-document-with-dynamic-background-color.html For platforms that do not use the overhang layer, we depend on RenderView's background color to fill unpainted space. RenderView's background color is only updated inside updateRootLayerConfiguration, and it is possible with a simple enough page to change the document's background color without running that code. * page/FrameView.cpp: (WebCore::FrameView::setTransparent): (WebCore::FrameView::setBaseBackgroundColor): Make use of the newly added rootBackgroundColorOrTransparencyChanged. (WebCore::FrameView::calculateExtendedBackgroundMode const): Update a comment, since the function it mentioned is no longer. (WebCore::FrameView::updateTilesForExtendedBackgroundMode): Remove this code that clears the root extended background color if using tiles to extend in both directions. Two reasons: 1) it seems harmless to also have a root extended background color 2) this just gets clobbered by the call in RenderView::paintBoxDecorations * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateCompositingLayers): Add a bit that will do a updateConfiguration() on the root layer if no other work needs to be done, so that we can update the root layer's transparency or background color without doing a full layer rebuild. (WebCore::RenderLayerCompositor::rootOrBodyStyleChanged): Make use of the newly added rootBackgroundColorOrTransparencyChanged. (WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged): Change rootBackgroundTransparencyChanged to also cover color changes. Fold setRootExtendedBackgroundColor in here, and make use of setRootLayerConfigurationNeedsUpdate() instead of doing a full rebuild. Previously, we would bail if the transparency state hadn't changed; now, we'll also update the root layer's background color and the exposed-to-WebKit extended background color if they change too. (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): Deleted. (WebCore::RenderLayerCompositor::setRootExtendedBackgroundColor): Deleted. * rendering/RenderLayerCompositor.h: Add setRootLayerConfigurationNeedsUpdate, remove setRootExtendedBackgroundColor, and add both a bit indicating that the root layer configuration needs updating and the cached view background color to make the early return in rootBackgroundColorOrTransparencyChanged possible. * rendering/RenderView.cpp: (WebCore::RenderView::paintBoxDecorations): Make use of the newly added rootBackgroundColorOrTransparencyChanged. LayoutTests: * tiled-drawing/background-transparency-toggle-expected.txt: This is a progression; the extended background color now matches the color of the page at this point (#CCCCCC is the specified body background, black with 0.2 alpha, blended with the root's white background). * tiled-drawing/simple-document-with-dynamic-background-color-expected.txt: Added. * tiled-drawing/simple-document-with-dynamic-background-color.html: Added. Added a test that ensures that dynamically changing the background color actually applies to the RenderView background. Previously, the second layer tree dump would have a black background where it should be red. Canonical link: https://commits.webkit.org/202091@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232991 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-06-19 23:06:09 +00:00
(backgroundColor #CCCCCC)
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
(tile cache coverage 0, 0 785 x 1024)
(tile size 785 x 512)
(top left tile 0, 0 tiles grid 1 x 2)
(in window 1)
Fix updating of tiled backing opaquenss when the page background color changes https://bugs.webkit.org/show_bug.cgi?id=144600 rdar://problem/20723035 Reviewed by Tim Horton. Source/WebCore: RenderLayerCompositor makes the page tiles opaque or not based on the result of viewHasTransparentBackground(), which consults the view transparency, and FrameView::documentBackgroundColor(). documentBackgroundColor() in turn is based on the root and/or body background colors. We thus need to re-evaluate whether page tiles are opaque when any of these inputs change, but were failing to do so for the FrameView's baseBackgroundColor, and the page root background color. Fix by having FrameView::setBaseBackgroundColor(), and RenderBox::styleDidChange() (for the root) trigger a compositing update when necessary. Added setViewBaseBackgroundColor() on Internals for testing. Test: platform/mac-wk2/tiled-drawing/background-transparency-toggle.html * page/FrameView.cpp: (WebCore::FrameView::setTransparent): Use the isViewForDocumentInFrame() helper. (WebCore::FrameView::setBaseBackgroundColor): Bail if we're not the view for the frame's document, and trigger a compositing update check if the alpha changed. (WebCore::FrameView::isViewForDocumentInFrame): Helper that checks to see if this FrameView is associated with the Document being displayed in the FrameView's Frame. This returns false when we're setting up a new FrameView (its Frame still points to the old document, so renderView() returns the RenderView for the Frame's existing Document). * page/FrameView.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): Have the compositor check to see if it needs to do an update. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): If the result of documentBackgroundColor() changed in alpha since the last time, trigger a compositing update. * rendering/RenderLayerCompositor.h: * testing/Internals.cpp: (WebCore::Internals::setViewBaseBackgroundColor): * testing/Internals.h: * testing/Internals.idl: LayoutTests: Test that dumps layers with various baseBackgroundColor and body background color combinations. * platform/mac-wk2/tiled-drawing/background-transparency-toggle-expected.txt: Added. * platform/mac-wk2/tiled-drawing/background-transparency-toggle.html: Added. Canonical link: https://commits.webkit.org/162610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-04 22:53:10 +00:00
)
)
)