haikuwebkit/LayoutTests/tiled-drawing/fixed-layout-size-fixed-att...

32 lines
696 B
HTML
Raw Permalink Normal View History

REGRESSION (r172417, r184065): Multiple rendering issues with fixed attached background-image https://bugs.webkit.org/show_bug.cgi?id=147049 <rdar://problem/21110936> Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-07-21 Reviewed by Simon Fraser. Source/WebCore: The fixed-attached background-image rendering is special. In general, to display it, the destinationSize should be set to visibleContentSize. The destinationLocation should be set such that the background-image does not move with scrolling. The topContentInset should be subtracted from the destinationLocation such that background-image can be rendered blurred in the topContentArea. However there are cases in which these rules have to be changed. -- destinationSize: In the case of fixed layout size, the fixedLayoutSize is bigger than the visibleContentSize. In this case, if the background-image belongs to the root element, the destinationSize has to be set to fixedLayoutSize. Otherwise it has to be set to the borderBoxSize unless the overflow is hidden. -- destinationLocation: If the background-image belongs to the root element, no scroll offset to added to destinationLocation. For non-root element case, FrameView::documentScrollOffsetRelativeToViewOrigin() should be used if no page scaling is applied. Otherwise FrameView::scrollOffsetForFixedPosition() should be used instead. Tests: platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-cover.html platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-local.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Ensure the geometry for the fixed-attached background-image is calculated correctly. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGeometry): Ensure the background layer gets the correct size for the fixedLayoutSize mode. LayoutTests: fixedLayoutSize background-image rendering for root and non-root elements. * platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-cover-expected.html: Added. * platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-cover.html: Added. * platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-local-expected.html: Added. * platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-local.html: Added. Canonical link: https://commits.webkit.org/165196@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-07-21 19:56:24 +00:00
<html>
<head>
<style>
html {
background: white;
}
body {
margin: 0;
height: 2000px;
overflow: hidden;
background: url(resources/green-blue.png);
background-attachment: fixed;
background-size: contain;
background-repeat: no-repeat;
}
</style>
<script>
function runTest() {
if (window.internals) {
window.internals.setFixedLayoutSize(800, 600);
window.internals.setPageScaleFactor(0.5, 0, 0);
window.internals.setUseFixedLayout(true);
Enable visual viewports by default on Mac, and iOS Wk2 https://bugs.webkit.org/show_bug.cgi?id=165452 Reviewed by Zalan Bujtas. Source/WebCore: Some tests revealed an issue where, during scrollbar updates, the visual viewport would be 15px wider than the layout viewport, which results in the layout viewport shifting 15px to the right. Prevent this by disallowing viewport updates during the AdjustViewSize phase; we'll be called again in postLayoutTasks. * page/FrameView.cpp: (WebCore::FrameView::updateLayoutViewport): Source/WebKit/mac: Turn visual viewports on by default for WK1 on Mac. * WebView/WebPreferences.mm: (+[WebPreferences initialize]): Source/WebKit2: Turn visual viewports on by default for WK2. * Shared/WebPreferencesDefinitions.h: LayoutTests: Skip, fix or adjust tests for visual viewports. * TestExpectations: * animations/trigger-container-scroll-boundaries.html: * animations/trigger-container-scroll-empty.html: * animations/trigger-container-scroll-simple.html: * compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport.html: * compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt: * compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt: * fast/scrolling/ios/remove-scrolling-role-expected.txt: * fast/zooming/client-rect-in-fixed-zoomed-expected.txt: * fast/zooming/client-rect-in-fixed-zoomed.html: * platform/ios-simulator-wk2/compositing/geometry/fixed-in-composited-expected.txt: Removed. * platform/ios-simulator-wk2/compositing/geometry/limit-layer-bounds-fixed-expected.txt: * platform/ios-simulator-wk2/compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt: * platform/ios-simulator-wk2/compositing/layer-creation/fixed-position-under-transform-expected.txt: * platform/ios-simulator-wk2/compositing/layer-creation/no-compositing-for-sticky-expected.txt: * platform/ios-simulator-wk2/fast/overflow/position-fixed-transform-clipping-expected.txt: * platform/ios-simulator/compositing/absolute-inside-out-of-view-fixed-expected.txt: * platform/ios-simulator/compositing/geometry/fixed-in-composited-expected.txt: * scrollingcoordinator/ios/non-stable-viewport-scroll-expected.txt: * scrollingcoordinator/ios/ui-scrolling-tree-expected.txt: * tiled-drawing/fixed-layout-size-fixed-attachment-cover.html: * tiled-drawing/fixed-layout-size-fixed-attachment-local.html: * tiled-drawing/scrolling/clamp-out-of-bounds-scrolls-expected.txt: * tiled-drawing/scrolling/fixed-background/fixed-body-background-zoomed-expected.txt: * tiled-drawing/scrolling/fixed/absolute-inside-fixed-expected.txt: * tiled-drawing/scrolling/fixed/absolute-inside-out-of-view-fixed-expected.txt: * tiled-drawing/scrolling/fixed/fixed-in-overflow-expected.txt: * tiled-drawing/scrolling/fixed/fixed-position-out-of-view-expected.txt: * tiled-drawing/scrolling/fixed/fixed-position-out-of-view-negative-zindex-expected.txt: * tiled-drawing/scrolling/fixed/four-bars-expected.txt: * tiled-drawing/scrolling/fixed/four-bars-with-header-and-footer-expected.txt: * tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt: * tiled-drawing/scrolling/fixed/negative-scroll-offset-expected.txt: * tiled-drawing/scrolling/fixed/negative-scroll-offset-in-view-expected.txt: * tiled-drawing/scrolling/fixed/nested-fixed-expected.txt: * tiled-drawing/scrolling/fixed/percentage-inside-fixed-expected.txt: * tiled-drawing/scrolling/frames/coordinated-frame-expected.txt: * tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt: * tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt: * tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor-expected.txt: * tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt: * tiled-drawing/scrolling/frames/frameset-frame-scrollability-expected.txt: * tiled-drawing/scrolling/frames/frameset-nested-frame-scrollability-expected.txt: * tiled-drawing/scrolling/frames/remove-coordinated-frame-expected.txt: * tiled-drawing/scrolling/frames/scroll-region-after-frame-layout-expected.txt: * tiled-drawing/scrolling/scrolling-tree-after-scroll-expected.txt: * tiled-drawing/scrolling/scrolling-tree-slow-scrolling-expected.txt: * tiled-drawing/scrolling/sticky/negative-scroll-offset-expected.txt: * tiled-drawing/scrolling/sticky/sticky-horizontal-expected.txt: * tiled-drawing/scrolling/sticky/sticky-vertical-expected.txt: Canonical link: https://commits.webkit.org/183076@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209409 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-12-06 19:39:32 +00:00
window.internals.settings.setVisualViewportEnabled(false);
REGRESSION (r172417, r184065): Multiple rendering issues with fixed attached background-image https://bugs.webkit.org/show_bug.cgi?id=147049 <rdar://problem/21110936> Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-07-21 Reviewed by Simon Fraser. Source/WebCore: The fixed-attached background-image rendering is special. In general, to display it, the destinationSize should be set to visibleContentSize. The destinationLocation should be set such that the background-image does not move with scrolling. The topContentInset should be subtracted from the destinationLocation such that background-image can be rendered blurred in the topContentArea. However there are cases in which these rules have to be changed. -- destinationSize: In the case of fixed layout size, the fixedLayoutSize is bigger than the visibleContentSize. In this case, if the background-image belongs to the root element, the destinationSize has to be set to fixedLayoutSize. Otherwise it has to be set to the borderBoxSize unless the overflow is hidden. -- destinationLocation: If the background-image belongs to the root element, no scroll offset to added to destinationLocation. For non-root element case, FrameView::documentScrollOffsetRelativeToViewOrigin() should be used if no page scaling is applied. Otherwise FrameView::scrollOffsetForFixedPosition() should be used instead. Tests: platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-cover.html platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-local.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Ensure the geometry for the fixed-attached background-image is calculated correctly. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGeometry): Ensure the background layer gets the correct size for the fixedLayoutSize mode. LayoutTests: fixedLayoutSize background-image rendering for root and non-root elements. * platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-cover-expected.html: Added. * platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-cover.html: Added. * platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-local-expected.html: Added. * platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-local.html: Added. Canonical link: https://commits.webkit.org/165196@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-07-21 19:56:24 +00:00
}
}
window.addEventListener('load', runTest, false);
</script>
</head>
<body>
</body>
</html>