haikuwebkit/LayoutTests/compositing/absolute-inside-out-of-view...

58 lines
1.1 KiB
HTML
Raw Permalink Normal View History

https://bugs.webkit.org/show_bug.cgi?id=101303 Fixed position elements that are out of view still end up forcing non-threaded scrolling -and corresponding- <rdar://problem/12642222> Reviewed by Simon Fraser. Source/WebCore: Re-name hasNonLayerFixedObjects() to hasVisibleSlowRepaintFixedObjects() and make it virtual. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintFixedObjects): (WebCore::ScrollingCoordinator::mainThreadScrollingReasons): * page/scrolling/ScrollingCoordinator.h: (ScrollingCoordinator): Override hasVisibleSlowRepaintFixedObjects() to always return false. We don't want to bother with the extra computation in the ScrollingCoordinator implementation, though other ports might still want it. * page/scrolling/mac/ScrollingCoordinatorMac.h: (WebCore::ScrollingCoordinatorMac::hasVisibleSlowRepaintFixedObjects): (ScrollingCoordinatorMac): Make this function const so that we can call it from requiresCompositingForPosition(). * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::calculateCompositedBounds): Actually be thorough here and check if the fixed object has any descendants that are visible in the view. If it does, then we do want to composite the fixed object. (WebCore::RenderLayerCompositor::requiresCompositingForPosition): * rendering/RenderLayerCompositor.h: LayoutTests: New tests for an invisible fixed object that has visible children. * compositing/absolute-inside-out-of-view-fixed-expected.txt: Added. * compositing/absolute-inside-out-of-view-fixed.html: Added. * platform/mac/tiled-drawing/fixed/absolute-inside-out-of-view-fixed-expected.txt: Added. * platform/mac/tiled-drawing/fixed/absolute-inside-out-of-view-fixed.html: Added. Updated results because these tests can now scroll on the scrolling thread, yay! * platform/mac/tiled-drawing/fixed/fixed-position-out-of-view-expected.txt: * platform/mac/tiled-drawing/fixed/fixed-position-out-of-view-negative-zindex-expected.txt: Canonical link: https://commits.webkit.org/119604@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@133807 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-11-07 22:27:12 +00:00
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 0;
height: 2500px;
}
.box {
height: 100px;
width: 100px;
}
.fixed {
position: fixed;
left: 0px;
top: 0px;
}
.wrapper {
position: absolute;
background-color: green;
}
</style>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
Have fixedPositionCreatesStackingContext be on by default everywhere https://bugs.webkit.org/show_bug.cgi?id=169334 Reviewed by Zalan Bujtas. It makes no sense to have web-exposed CSS functionality be different based on setting, and other browser are now aligned with having position:fixed create stacking context. So remove the fixedPositionCreatesStackingContext setting and have StyleResolver::adjustRenderStyle() always force stacking context for position:fixed. Source/WebCore: * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): * page/Settings.cpp: * page/Settings.in: Source/WebKit/mac: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Source/WebKit2: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setUseFixedLayout): * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm: (WebKit::RemoteLayerTreeDrawingArea::updatePreferences): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): LayoutTests: * compositing/absolute-inside-out-of-view-fixed.html: * compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport.html: * compositing/layer-creation/fixed-overlap-extent-rtl.html: * compositing/layer-creation/fixed-overlap-extent.html: * compositing/layer-creation/fixed-position-change-out-of-view-in-view.html: * compositing/layer-creation/fixed-position-in-view-dynamic.html: * compositing/layer-creation/fixed-position-out-of-view-dynamic.html: * compositing/layer-creation/fixed-position-out-of-view-scaled-iframe-scroll.html: * compositing/layer-creation/fixed-position-out-of-view-scaled-iframe.html: * compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html: * compositing/layer-creation/fixed-position-out-of-view-scaled.html: * compositing/layer-creation/fixed-position-transformed-into-view.html: * compositing/layer-creation/fixed-position-transformed-outside-view.html: * compositing/layer-creation/no-compositing-for-fixed-position-under-transform.html: * compositing/repaint/scroll-fixed-layer-no-content.html: * compositing/repaint/scroll-fixed-layer-out-of-view.html: * fast/block/positioning/fixed-position-stacking-context2.html: * fullscreen/full-screen-fixed-pos-parent.html: Canonical link: https://commits.webkit.org/186326@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-08 05:46:52 +00:00
if (window.internals)
Remove some autogenerated settings from InternalSettings.idl https://bugs.webkit.org/show_bug.cgi?id=106114 Reviewed by Ojan Vafai. Source/WebCore: Remove 6 methods that are now autogenerated. setAcceleratedFiltersEnabled was never called. AcceleratedCompositingForOverflowScrollEnabled was never backed up/restored. setEnableCompositingForFixedPosition and setEnableCompositingForScrollableFrames are renamed to match the name in Settings.in. No new tests, there should be no change in behavior. This is covered by existing tests in compositing and platform/chromium/compositing. * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): Remove code. (WebCore::InternalSettings::Backup::restoreTo): Remove code. * testing/InternalSettings.h: (Backup): Remove member variables. (InternalSettings): * testing/InternalSettings.idl: Remove methods that are no longer used. LayoutTests: Rename setters to match the name in Settings.in setEnableCompositingForFixedPosition -> setAcceleratedCompositingForFixedPositionEnabled setEnableCompositingForScrollableFrames -> setAcceleratedCompositingForScrollableFramesEnabled * compositing/absolute-inside-out-of-view-fixed.html: * compositing/geometry/fixed-position-composited-page-scale-down.html: * compositing/geometry/fixed-position-composited-page-scale-scroll.html: * compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport.html: * compositing/geometry/fixed-position-composited-page-scale.html: * compositing/geometry/fixed-position-composited-switch.html: * compositing/geometry/fixed-position-iframe-composited-page-scale-down.html: * compositing/geometry/fixed-position-iframe-composited-page-scale.html: * compositing/geometry/fixed-position-transform-composited-page-scale-down.html: * compositing/geometry/fixed-position-transform-composited-page-scale.html: * compositing/layer-creation/fixed-position-out-of-view-scaled-iframe-scroll.html: * compositing/layer-creation/fixed-position-out-of-view-scaled-iframe.html: * compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html: * compositing/layer-creation/fixed-position-out-of-view-scaled.html: * compositing/layer-creation/fixed-position-out-of-view-scroll-reason.html: * compositing/layer-creation/fixed-position-out-of-view.html: * compositing/overflow/automatically-opt-into-composited-scrolling.html: * platform/chromium/compositing/force-compositing-mode/force-composite-empty.html: * platform/chromium/compositing/force-compositing-mode/no-overflow-iframe-layer.html: * platform/chromium/compositing/force-compositing-mode/overflow-hidden-iframe-layer.html: * platform/chromium/compositing/force-compositing-mode/overflow-iframe-enter-compositing.html: * platform/chromium/compositing/force-compositing-mode/overflow-iframe-layer.html: * platform/chromium/compositing/force-compositing-mode/overflow-iframe-leave-compositing.html: Canonical link: https://commits.webkit.org/124315@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@138840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-04 20:51:10 +00:00
window.internals.settings.setAcceleratedCompositingForFixedPositionEnabled(true);
https://bugs.webkit.org/show_bug.cgi?id=101303 Fixed position elements that are out of view still end up forcing non-threaded scrolling -and corresponding- <rdar://problem/12642222> Reviewed by Simon Fraser. Source/WebCore: Re-name hasNonLayerFixedObjects() to hasVisibleSlowRepaintFixedObjects() and make it virtual. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintFixedObjects): (WebCore::ScrollingCoordinator::mainThreadScrollingReasons): * page/scrolling/ScrollingCoordinator.h: (ScrollingCoordinator): Override hasVisibleSlowRepaintFixedObjects() to always return false. We don't want to bother with the extra computation in the ScrollingCoordinator implementation, though other ports might still want it. * page/scrolling/mac/ScrollingCoordinatorMac.h: (WebCore::ScrollingCoordinatorMac::hasVisibleSlowRepaintFixedObjects): (ScrollingCoordinatorMac): Make this function const so that we can call it from requiresCompositingForPosition(). * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::calculateCompositedBounds): Actually be thorough here and check if the fixed object has any descendants that are visible in the view. If it does, then we do want to composite the fixed object. (WebCore::RenderLayerCompositor::requiresCompositingForPosition): * rendering/RenderLayerCompositor.h: LayoutTests: New tests for an invisible fixed object that has visible children. * compositing/absolute-inside-out-of-view-fixed-expected.txt: Added. * compositing/absolute-inside-out-of-view-fixed.html: Added. * platform/mac/tiled-drawing/fixed/absolute-inside-out-of-view-fixed-expected.txt: Added. * platform/mac/tiled-drawing/fixed/absolute-inside-out-of-view-fixed.html: Added. Updated results because these tests can now scroll on the scrolling thread, yay! * platform/mac/tiled-drawing/fixed/fixed-position-out-of-view-expected.txt: * platform/mac/tiled-drawing/fixed/fixed-position-out-of-view-negative-zindex-expected.txt: Canonical link: https://commits.webkit.org/119604@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@133807 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-11-07 22:27:12 +00:00
}
function doScroll()
{
window.setTimeout(function() {
window.scrollTo(0, 200);
if (window.internals) {
document.getElementById('results').innerText = internals.layerTreeAsText(document);
testRunner.notifyDone();
}
}, 10);
}
window.addEventListener('load', doScroll, false);
</script>
</head>
<body>
<pre id="results"></pre>
<div class="fixed">
<div class="wrapper box">
</div>
</div>
</body>
</html>