haikuwebkit/LayoutTests/fast/backgrounds/transformed-body-background...

28 lines
535 B
HTML
Raw Permalink Normal View History

-webkit-background-clip:text produces artifacts when applied to the body and the browser is resized https://bugs.webkit.org/show_bug.cgi?id=89287 Reviewed by Beth Dakin. Source/WebCore: If the body had -webkit-background-clip: text, we'd fail to paint anything behind it, so would see garbage pixels. Fix by having RenderView::paintBoxDecorations() check for a background-clip of "text" on the renderer that paints the root background. Added some new pixel tests for combinations of html and body transform and backgrounds; earlier versions of the patch broke some of these tests. Tests: fast/backgrounds/background-clip-text-on-body.html fast/backgrounds/transformed-body-background.html fast/backgrounds/transformed-body-html-background.html fast/backgrounds/transformed-html-body-background.html * rendering/RenderView.cpp: (WebCore::rendererObscuresBackground): Broke up the single condition into early 'false' returns when possible. We need to also check whether the renderer that actually paints the background (which might be the body) will fill it; background-clip: text does not. (WebCore::RenderView::paintBoxDecorations): Rather than checking firstChild(), actually check the root renderer, so that we can reliably get to the renderer that mains the root background. LayoutTests: Test with -webkit-background-clip: text on the body, which scrolls. Some additional tests that exercise different combinations of html and body transform and background. * compositing/repaint/composited-document-element.html: * fast/backgrounds/background-clip-text-on-body-expected.png: Added. * fast/backgrounds/background-clip-text-on-body-expected.txt: Added. * fast/backgrounds/background-clip-text-on-body.html: Added. * fast/backgrounds/transformed-body-background-expected.png: Added. * fast/backgrounds/transformed-body-background-expected.txt: Added. * fast/backgrounds/transformed-body-background.html: Added. * fast/backgrounds/transformed-body-html-background-expected.png: Added. * fast/backgrounds/transformed-body-html-background-expected.txt: Added. * fast/backgrounds/transformed-body-html-background.html: Added. * fast/backgrounds/transformed-html-body-background-expected.png: Added. * fast/backgrounds/transformed-html-body-background-expected.txt: Added. * fast/backgrounds/transformed-html-body-background.html: Added. Canonical link: https://commits.webkit.org/119496@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@133686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-11-07 00:03:53 +00:00
<!DOCTYPE html>
<html>
<head>
<style>
body {
-webkit-transform: rotate(20deg);
-webkit-transform-origin: top left;
background-color: silver;
overflow: hidden;
}
.contents {
height: 1200px;
width: 100%;
border: 1px solid black;
}
</style>
<script>
if (window.testRunner)
testRunner.dumpAsText(true);
</script>
</head>
<body>
<div class="contents"></div>
</body>
</html>