Commit f9050b37 authored by simon.fraser@apple.com's avatar simon.fraser@apple.com
Browse files

2008-11-03 Simon Fraser <simon.fraser@apple.com>

        Reviewed by Dave Hyatt

        https://bugs.webkit.org/show_bug.cgi?id=22026

        When computing the bounds of the transparency layer, we need to
        map the clipRect through the enclosing transform.

        Test: fast/layers/opacity-transforms.html

        * rendering/RenderLayer.cpp:
        (WebCore::transparencyClipBox):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38079 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent eb4eabb2
2008-11-03 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dave Hyatt
https://bugs.webkit.org/show_bug.cgi?id=22026
Fix bounds of transparency layer for a div with a transform
inside an opacity layer.
* fast/layers/opacity-transforms.html: Added.
* platform/mac/fast/layers/opacity-transforms-expected.checksum: Added.
* platform/mac/fast/layers/opacity-transforms-expected.png: Added.
* platform/mac/fast/layers/opacity-transforms-expected.txt: Added.
2008-11-01 Adam Barth <abarth@webkit.org>
Reviewed by Sam Weinig.
......
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Opacity-Transform Clipping</title>
<style type="text/css" media="screen">
.container {
position: absolute;
width: 100px;
height: 100px;
left: 100px;
top: 150px;
outline: 1px solid black;
opacity: 0.9;
}
.box {
width: 10px;
height: 10px;
outline: 12px solid blue;
-webkit-transform: translate(50px, 50px);
}
.inner {
position: absolute;
width: 100px;
height: 100px;
background-color: green;
}
#underlay {
position: absolute;
top: 200px;
left: 150px;
width: 100px;
height: 100px;
background-color: red;
}
</style>
</head>
<body>
<div id="underlay">
</div>
<p><a href="https://bugs.webkit.org/show_bug.cgi?id=22026">https://bugs.webkit.org/show_bug.cgi?id=22026</a></p>
<p>Test that elements with transform and opacity on a parent are not clipped. You should see no red below.</p>
<div class="container">
<div class="box">
<div class="inner"></div>
</div>
</div>
</body>
</html>
110ad4456ffec2282cc7fbce1e582a22
\ No newline at end of file
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x84
RenderBlock {HTML} at (0,0) size 800x84
RenderBody {BODY} at (8,16) size 784x52
RenderBlock {P} at (0,0) size 784x18
RenderInline {A} at (0,0) size 305x18 [color=#0000EE]
RenderText {#text} at (0,0) size 305x18
text run at (0,0) width 305: "https://bugs.webkit.org/show_bug.cgi?id=22026"
RenderBlock {P} at (0,34) size 784x18
RenderText {#text} at (0,0) size 654x18
text run at (0,0) width 654: "Test that elements with transform and opacity on a parent are not clipped. You should see no red below."
layer at (150,200) size 100x100
RenderBlock (positioned) {DIV} at (150,200) size 100x100 [bgcolor=#FF0000]
layer at (100,150) size 100x100
RenderBlock (positioned) {DIV} at (100,150) size 100x100
layer at (100,150) size 10x10
RenderBlock {DIV} at (0,0) size 10x10
layer at (100,150) size 100x100
RenderBlock (positioned) {DIV} at (0,0) size 100x100 [bgcolor=#008000]
2008-11-03 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dave Hyatt
https://bugs.webkit.org/show_bug.cgi?id=22026
When computing the bounds of the transparency layer, we need to
map the clipRect through the enclosing transform.
Test: fast/layers/opacity-transforms.html
* rendering/RenderLayer.cpp:
(WebCore::transparencyClipBox):
2008-11-03 Kevin Decker <kdecker@apple.com>
 
Reviewed by Anders Carlsson.
......
......@@ -526,7 +526,9 @@ static IntRect transparencyClipBox(const AffineTransform& enclosingTransform, co
clipRect.unite(transparencyClipBox(enclosingTransform, curr, rootLayer));
}
}
return clipRect;
// Now map the clipRect via the enclosing transform
return enclosingTransform.mapRect(clipRect);
}
void RenderLayer::beginTransparencyLayers(GraphicsContext* p, const RenderLayer* rootLayer)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment