haikuwebkit/LayoutTests/tiled-drawing/top-content-inset-fixed-att...

29 lines
495 B
HTML
Raw Permalink Normal View History

background-position sometimes doesn't work properly with background-attachment: fixed https://bugs.webkit.org/show_bug.cgi?id=103757 rdar://problem/18749925 Reviewed by Darin Adler. Source/WebCore: Fix sizing issues with fixed backgrounds when top content inset (blurred toolbar) is in effect. The primary issue was that positioningAreaSize was including the top content inset height, and should not have been, but there were also issues with the "fixedBackgroundPaintsInLocalCoordinates" code path, which kicks in when the root background is fixed. Tests: platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local.html platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover.html platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local.html platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): LayoutTests: Tests various configurations for painting the fixed backgrounds. The existing test was actually wrong, so fixed to use a gradient (so you can see where the edges of the image are), and be valid. Testing is complicated by the fact that setting top content inset actually causes the snapshot to be inset at the top. * platform/mac-wk2/tiled-drawing/resources/bordered-image.png: Added. * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-expected.html: Added. * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local-expected.html: Added. * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local.html: Copied from LayoutTests/platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment.html. * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover.html: Added. * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-expected.html: * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local-expected.html: Added. * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local.html: Added. * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned-expected.html: Added. * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned.html: Added. * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment.html: Canonical link: https://commits.webkit.org/162888@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-11 03:56:15 +00:00
<html>
<head>
<style>
body {
margin: 0;
}
.container {
width: 100%;
height: 100%;
background-image: url('resources/bordered-image.png');
background-attachment: fixed;
background-size: contain;
background-repeat: no-repeat;
}
</style>
<script>
function runTest() {
if (window.internals)
window.internals.setTopContentInset(100);
}
window.addEventListener('load', runTest, false);
</script>
</head>
<body>
<div class="container"></div>
</body>
</html>