haikuwebkit/LayoutTests/pageoverlay/overlay-installation-expect...

28 lines
531 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, 800, 600)
CONSOLE MESSAGE: MockPageOverlayClient::drawRect dirtyRect (0, 0, 800, 600)
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)
(bounds 800.00 600.00)
(drawsContent 1)
(backgroundColor #00000000)
)
)
)
Document-relative:
(GraphicsLayer
(children 1
(GraphicsLayer
(anchor 0.00 0.00)
(bounds 800.00 600.00)
(drawsContent 1)
(backgroundColor #00000000)
)
)
)