haikuwebkit/LayoutTests/tiled-drawing/tile-coverage-view-exposed-...

34 lines
853 B
HTML
Raw Permalink Normal View History

Make it possible to test effect of view exposed rect on tiled backing https://bugs.webkit.org/show_bug.cgi?id=156365 Reviewed by Tim Horton. Source/WebCore: Implement Internals::setViewExposedRect(). When the viewExposedRect is non-null, assume that we're scrollable on both axes to avoid creation of huge tiles in this scenario. We also need to call adjustTiledBackingScrollability() when setViewExposedRect() has been called. Tests: tiled-drawing/tile-coverage-view-exposed-rect.html tiled-drawing/tile-size-view-exposed-rect.html * page/FrameView.cpp: (WebCore::FrameView::adjustTiledBackingScrollability): (WebCore::FrameView::setViewExposedRect): * testing/Internals.cpp: (WebCore::Internals::setViewExposedRect): * testing/Internals.h: * testing/Internals.idl: Tools: Expose testRunner.setViewSize() and internals.setViewExposedRect() to enable testing of tile coverage when setViewExposedRect() is passed a non-null rectangle. testRunner.setViewSize() is used instead of using window.resizeTo(), since we can't easily resize a window to larger than the screen being tested on. * DumpRenderTree/TestRunner.cpp: (setViewSizeCallback): (TestRunner::staticFunctions): * DumpRenderTree/TestRunner.h: * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::setViewSize): * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::postSetViewSize): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setViewSize): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): LayoutTests: Tests for tile size and tile coverage when we have an exposed view rect. * tiled-drawing/tile-coverage-view-exposed-rect-expected.txt: Added. * tiled-drawing/tile-coverage-view-exposed-rect.html: Added. * tiled-drawing/tile-size-view-exposed-rect-expected.txt: Added. * tiled-drawing/tile-size-view-exposed-rect.html: Added. Canonical link: https://commits.webkit.org/174469@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-07 23:14:25 +00:00
<!DOCTYPE html>
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
if (window.internals)
internals.setViewExposedRect(0, 1025, 800, 200);
testRunner.setViewSize(800, 2500);
testRunner.waitUntilDone();
}
function doTest()
{
window.setTimeout(function() {
if (window.internals) {
document.getElementById('layers').innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_TILE_CACHES);
}
if (window.testRunner)
testRunner.notifyDone();
}, 0);
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<pre id="layers">Layer tree goes here</p>
</body>
</html>