haikuwebkit/LayoutTests/pageoverlay/overlay-large-document-expe...

31 lines
769 B
Plaintext
Raw Permalink Normal View History

REGRESSION (r191849): There's no yellow bouncy highlight when using Find on Page on iOS https://bugs.webkit.org/show_bug.cgi?id=152241 <rdar://problem/23642574> Reviewed by Simon Fraser. Tests: pageoverlay/overlay-small-frame-mouse-events.html pageoverlay/overlay-small-frame-paints.html * page/PageOverlay.cpp: (WebCore::PageOverlay::bounds): Revert r191849's change that made bounds() actually return the frame() if we frame is manually overriden. (WebCore::PageOverlay::mouseEvent): Convert the mouse event the rest of the way into overlay coordinates (by applying the overlay's frame origin) before deciding whether to handle the event. * page/PageOverlay.h: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * testing/Internals.cpp: (WebCore::Internals::installMockPageOverlay): * testing/Internals.h: * testing/Internals.idl: * testing/MockPageOverlay.cpp: Added. (WebCore::MockPageOverlay::create): (WebCore::MockPageOverlay::MockPageOverlay): (WebCore::MockPageOverlay::setFrame): * testing/MockPageOverlay.h: Added. (WebCore::MockPageOverlay::overlay): * testing/MockPageOverlay.idl: Added. * testing/MockPageOverlayClient.cpp: (WebCore::MockPageOverlayClient::installOverlay): (WebCore::MockPageOverlayClient::uninstallAllOverlays): (WebCore::MockPageOverlayClient::pageOverlayDestroyed): (WebCore::MockPageOverlayClient::drawRect): (WebCore::MockPageOverlayClient::mouseEvent): * testing/MockPageOverlayClient.h: Make internals.installMockPageOverlay return a MockPageOverlay object so tests can manipulate their overlay. For now, expose setFrame. Also, log when MockPageOverlayClient gets asked to paint or receives a mouse event, which will show up in test output. Slightly unconventional, but very convenient. * pageoverlay/overlay-small-frame-mouse-events-expected.txt: Added. * pageoverlay/overlay-small-frame-mouse-events.html: Added. Add a test ensuring that small-frame overlays get mouse events. * pageoverlay/overlay-small-frame-paints-expected.txt: Added. * pageoverlay/overlay-small-frame-paints.html: Added. Add a test ensuring that small-frame overlays get paint callbacks. Canonical link: https://commits.webkit.org/170422@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-12-15 22:46:02 +00:00
CONSOLE MESSAGE: MockPageOverlayClient::drawRect dirtyRect (0, 0, 785, 585)
CONSOLE MESSAGE: MockPageOverlayClient::drawRect dirtyRect (512, 512, 512, 512)
CONSOLE MESSAGE: MockPageOverlayClient::drawRect dirtyRect (0, 512, 512, 512)
CONSOLE MESSAGE: MockPageOverlayClient::drawRect dirtyRect (512, 0, 512, 512)
CONSOLE MESSAGE: MockPageOverlayClient::drawRect dirtyRect (0, 0, 512, 512)
Make it possible to test page overlays https://bugs.webkit.org/show_bug.cgi?id=137339 Reviewed by Dan Bernstein. Tests: pageoverlay/overlay-installation.html pageoverlay/overlay-large-document-scrolled.html pageoverlay/overlay-large-document.html Do some initial work to make page overlays testable. There are many more tests to be written, but this lays the groundwork. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * WebCore.vcxproj/WebCoreTestSupport.vcxproj: * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: * CMakeLists.txt: Add MockPageOverlayClient. * platform/graphics/GraphicsLayer.h: * page/PageOverlayController.h: * page/PageOverlayController.cpp: (WebCore::PageOverlayController::shouldSkipLayerInDump): Don't skip PageOverlayController-owned layers in the layer tree dump if the layerTreeAsText behavior says that we should include them. * platform/graphics/GraphicsLayer.cpp: (WebCore::dumpChildren): * platform/graphics/GraphicsLayerClient.h: (WebCore::GraphicsLayerClient::shouldSkipLayerInDump): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::shouldSkipLayerInDump): * rendering/RenderLayerBacking.h: Pass the LayerTreeAsTextBehavior through shouldSkipLayerInDump. * testing/Internals.cpp: (WebCore::Internals::resetToConsistentState): Uninstall all page overlays when resetting to a consistent state. (WebCore::Internals::installMockPageOverlay): (WebCore::Internals::pageOverlayLayerTreeAsText): Expose two new internals functions. installMockPageOverlay takes "view" or "document", allowing script to choose the appropriate overlay type. pageOverlayLayerTreeAsText dumps both view and document-relative overlays, from each overlay container layer. * testing/Internals.h: * testing/Internals.idl: Fix some typos. * testing/MockPageOverlayClient.cpp: Added. (WebCore::MockPageOverlayClient::shared): (WebCore::MockPageOverlayClient::MockPageOverlayClient): (WebCore::MockPageOverlayClient::installOverlay): (WebCore::MockPageOverlayClient::uninstallAllOverlays): (WebCore::MockPageOverlayClient::layerTreeAsText): (WebCore::MockPageOverlayClient::pageOverlayDestroyed): (WebCore::MockPageOverlayClient::willMoveToPage): (WebCore::MockPageOverlayClient::didMoveToPage): When the overlay is parented, mark it as needing repaint. Future tests might want to test overlays without content, but for now this is a reasonable default behavior. (WebCore::MockPageOverlayClient::drawRect): Paint the overlay rects as described in the LayoutTests ChangeLog. (WebCore::MockPageOverlayClient::mouseEvent): (WebCore::MockPageOverlayClient::didScrollFrame): (WebCore::MockPageOverlayClient::copyAccessibilityAttributeStringValueForPoint): (WebCore::MockPageOverlayClient::copyAccessibilityAttributeBoolValueForPoint): (WebCore::MockPageOverlayClient::copyAccessibilityAttributeNames): * testing/MockPageOverlayClient.h: Added. * pageoverlay/overlay-installation.html: Added. Add a test which just installs one view-relative and one document-relative overlay, and dumps the layer tree and pixel results. The mock overlay strokes a blue rectangle (inset a little from the overlay bounds) for view-relative overlays, and a green rectangle (inset a bit more) for document-relative overlays. * pageoverlay/overlay-large-document.html: Added. * pageoverlay/overlay-large-document-scrolled.html: Added. Tests that do the same as the -installation test, but with a larger document; the view-relative overlay should be the same size (or slightly smaller, because we have scrollbars now), but the document-relative overlay should be the size of the document. The second test scrolls to maxX, maxY, and the document-relative overlay should scroll along with it, while the view-relative overlay should remain fixed. * pageoverlay/overlay-installation-expected.txt: Added. * pageoverlay/overlay-large-document-expected.txt: Added. * pageoverlay/overlay-large-document-scrolled-expected.txt: Added. "Normal" layer tree expectations. * platform/mac-wk1/pageoverlay/overlay-installation-expected.png: Added. * platform/mac-wk1/pageoverlay/overlay-installation-expected.txt: Added. * platform/mac-wk1/pageoverlay/overlay-large-document-expected.png: Added. * platform/mac-wk1/pageoverlay/overlay-large-document-expected.txt: Added. * platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.png: Added. * platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.txt: Added. Expected results for WebKit1 differ for view-relative overlays, because we don't currently hook up view-relative overlays for WebKit1. * platform/mac/pageoverlay/overlay-installation-expected.png: Added. * platform/mac/pageoverlay/overlay-large-document-expected.png: Added. * platform/mac/pageoverlay/overlay-large-document-scrolled-expected.png: Added. "Normal" pixel dump expectations. Canonical link: https://commits.webkit.org/155229@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-10-04 08:47:04 +00:00
View-relative:
(GraphicsLayer
(children 1
(GraphicsLayer
(anchor 0.00 0.00)
Clean up how GraphicsLayer's "inWindow" state is set, and fix some issues with Page Overlays https://bugs.webkit.org/show_bug.cgi?id=167850 Reviewed by Tim Horton. Source/WebCore: RenderLayerCompositor::setIsInWindowForLayerIncludingDescendants() walked the RenderLayer tree to set the GraphicsLayer's "inWindow" state. This had the problem of skipping non-primary GraphicsLayers. We also never did this work for page overlay layers. Fix by giving GraphicsLayers a recursive function that sets the inWindow state, and call that from RenderLayerCompositor::setIsInWindow() and PageOverlayController. PageOverlayController also needs to implement tiledBackingUsageChanged so that tiled backings created dynamically get the correct in-window state. Page overlays also had some serious issues in MiniBrowser, in that they disappeared on reload, and on hide/show web view. This was because the overlay root layers were re-parented, but addChild() for each overlay's layer wasn't called. Clean up by replacing willAttachRootLayer() followed by viewOverlayRootLayer()/documentOverlayRootLayer() with single calls that set up the layers, update the inWindow state, and return the layer. Make it possible to dump tile caches in page overlay tests. Make showGraphicsLayers() always dump page overlay layers (source of much confusion). Test: pageoverlay/overlay-remove-reinsert-view.html * page/PageOverlayController.cpp: (WebCore::PageOverlayController::documentOverlayRootLayer): (WebCore::PageOverlayController::viewOverlayRootLayer): (WebCore::PageOverlayController::layerWithDocumentOverlays): (WebCore::PageOverlayController::layerWithViewOverlays): (WebCore::PageOverlayController::tiledBackingUsageChanged): (WebCore::PageOverlayController::willAttachRootLayer): Deleted. * page/PageOverlayController.h: * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::setIsInWindowIncludingDescendants): (WebCore::dumpChildren): * platform/graphics/GraphicsLayer.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers): (WebCore::RenderLayerCompositor::setIsInWindow): (WebCore::RenderLayerCompositor::attachRootLayer): (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged): (WebCore::RenderLayerCompositor::setIsInWindowForLayerIncludingDescendants): Deleted. * rendering/RenderLayerCompositor.h: * testing/Internals.cpp: (WebCore::toLayerTreeFlags): (WebCore::Internals::layerTreeAsText): (WebCore::Internals::pageOverlayLayerTreeAsText): * testing/Internals.h: * testing/Internals.idl: * testing/MockPageOverlayClient.cpp: (WebCore::MockPageOverlayClient::layerTreeAsText): * testing/MockPageOverlayClient.h: Tools: * DumpRenderTree/TestRunner.cpp: (TestRunner::uiScriptDidComplete): Fix an assertion that fires for non-16-bit strings. LayoutTests: * pageoverlay/overlay-large-document-expected.txt: * pageoverlay/overlay-large-document-scrolled-expected.txt: * pageoverlay/overlay-remove-reinsert-view-expected.txt: Added. * pageoverlay/overlay-remove-reinsert-view.html: Added. * platform/ios-simulator-wk2/pageoverlay/overlay-remove-reinsert-view-expected.txt: Added. * platform/mac-wk1/pageoverlay/overlay-remove-reinsert-view-expected.txt: Added. * tiled-drawing/tiled-backing-in-window-expected.txt: Canonical link: https://commits.webkit.org/184886@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-05 19:18:16 +00:00
(bounds 800.00 600.00)
Make it possible to test page overlays https://bugs.webkit.org/show_bug.cgi?id=137339 Reviewed by Dan Bernstein. Tests: pageoverlay/overlay-installation.html pageoverlay/overlay-large-document-scrolled.html pageoverlay/overlay-large-document.html Do some initial work to make page overlays testable. There are many more tests to be written, but this lays the groundwork. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * WebCore.vcxproj/WebCoreTestSupport.vcxproj: * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: * CMakeLists.txt: Add MockPageOverlayClient. * platform/graphics/GraphicsLayer.h: * page/PageOverlayController.h: * page/PageOverlayController.cpp: (WebCore::PageOverlayController::shouldSkipLayerInDump): Don't skip PageOverlayController-owned layers in the layer tree dump if the layerTreeAsText behavior says that we should include them. * platform/graphics/GraphicsLayer.cpp: (WebCore::dumpChildren): * platform/graphics/GraphicsLayerClient.h: (WebCore::GraphicsLayerClient::shouldSkipLayerInDump): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::shouldSkipLayerInDump): * rendering/RenderLayerBacking.h: Pass the LayerTreeAsTextBehavior through shouldSkipLayerInDump. * testing/Internals.cpp: (WebCore::Internals::resetToConsistentState): Uninstall all page overlays when resetting to a consistent state. (WebCore::Internals::installMockPageOverlay): (WebCore::Internals::pageOverlayLayerTreeAsText): Expose two new internals functions. installMockPageOverlay takes "view" or "document", allowing script to choose the appropriate overlay type. pageOverlayLayerTreeAsText dumps both view and document-relative overlays, from each overlay container layer. * testing/Internals.h: * testing/Internals.idl: Fix some typos. * testing/MockPageOverlayClient.cpp: Added. (WebCore::MockPageOverlayClient::shared): (WebCore::MockPageOverlayClient::MockPageOverlayClient): (WebCore::MockPageOverlayClient::installOverlay): (WebCore::MockPageOverlayClient::uninstallAllOverlays): (WebCore::MockPageOverlayClient::layerTreeAsText): (WebCore::MockPageOverlayClient::pageOverlayDestroyed): (WebCore::MockPageOverlayClient::willMoveToPage): (WebCore::MockPageOverlayClient::didMoveToPage): When the overlay is parented, mark it as needing repaint. Future tests might want to test overlays without content, but for now this is a reasonable default behavior. (WebCore::MockPageOverlayClient::drawRect): Paint the overlay rects as described in the LayoutTests ChangeLog. (WebCore::MockPageOverlayClient::mouseEvent): (WebCore::MockPageOverlayClient::didScrollFrame): (WebCore::MockPageOverlayClient::copyAccessibilityAttributeStringValueForPoint): (WebCore::MockPageOverlayClient::copyAccessibilityAttributeBoolValueForPoint): (WebCore::MockPageOverlayClient::copyAccessibilityAttributeNames): * testing/MockPageOverlayClient.h: Added. * pageoverlay/overlay-installation.html: Added. Add a test which just installs one view-relative and one document-relative overlay, and dumps the layer tree and pixel results. The mock overlay strokes a blue rectangle (inset a little from the overlay bounds) for view-relative overlays, and a green rectangle (inset a bit more) for document-relative overlays. * pageoverlay/overlay-large-document.html: Added. * pageoverlay/overlay-large-document-scrolled.html: Added. Tests that do the same as the -installation test, but with a larger document; the view-relative overlay should be the same size (or slightly smaller, because we have scrollbars now), but the document-relative overlay should be the size of the document. The second test scrolls to maxX, maxY, and the document-relative overlay should scroll along with it, while the view-relative overlay should remain fixed. * pageoverlay/overlay-installation-expected.txt: Added. * pageoverlay/overlay-large-document-expected.txt: Added. * pageoverlay/overlay-large-document-scrolled-expected.txt: Added. "Normal" layer tree expectations. * platform/mac-wk1/pageoverlay/overlay-installation-expected.png: Added. * platform/mac-wk1/pageoverlay/overlay-installation-expected.txt: Added. * platform/mac-wk1/pageoverlay/overlay-large-document-expected.png: Added. * platform/mac-wk1/pageoverlay/overlay-large-document-expected.txt: Added. * platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.png: Added. * platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.txt: Added. Expected results for WebKit1 differ for view-relative overlays, because we don't currently hook up view-relative overlays for WebKit1. * platform/mac/pageoverlay/overlay-installation-expected.png: Added. * platform/mac/pageoverlay/overlay-large-document-expected.png: Added. * platform/mac/pageoverlay/overlay-large-document-scrolled-expected.png: Added. "Normal" pixel dump expectations. Canonical link: https://commits.webkit.org/155229@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-10-04 08:47:04 +00:00
(drawsContent 1)
(backgroundColor #00000000)
)
)
)
Document-relative:
(GraphicsLayer
(children 1
(GraphicsLayer
(anchor 0.00 0.00)
(bounds 5008.00 5016.00)
(drawsContent 1)
(backgroundColor #00000000)
)
)
)