Commit 8991c154 authored by thatcher's avatar thatcher

LayoutTests:

        Reviewed by Hyatt, checked in by Tim H.

        For: http://bugzilla.opendarwin.org/show_bug.cgi?id=9115
        Added test case to test opacity layers, in particular, opacities
        with a value of zero.

       * fast/css/ZeroOpacityLayers.html: Added.
       * fast/css/ZeroOpacityLayers-expected.txt: Added.
       * fast/css/ZeroOpacityLayers-expected.png: Added.
       * fast/css/ZeroOpacityLayers-expected.checksum: Added.
       * fast/css/ZeroOpacityLayers2.html: Added.
       * fast/css/ZeroOpacityLayers2-expected.txt: Added.
       * fast/css/ZeroOpacityLayers2-expected.png: Added.
       * fast/css/ZeroOpacityLayers2-expected.checksum: Added.

WebCore:

        Reviewed by Hyatt, checked in by Tim H.

        fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=9115
        Changed RenderLayer to only render layers that are not
        totally transparent.

        * rendering/RenderLayer.cpp
        (RenderLayer::paintLayer):
        Changed function to also check if the layer is totally transparent
        and if it is, don't bother painting it.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 864dbca9
2006-06-02 David Carson <dacarson@gmail.com>
Reviewed by Hyatt, checked in by Tim H.
For: http://bugzilla.opendarwin.org/show_bug.cgi?id=9115
Added test case to test opacity layers, in particular, opacities
with a value of zero.
* fast/css/ZeroOpacityLayers.html: Added.
* fast/css/ZeroOpacityLayers-expected.txt: Added.
* fast/css/ZeroOpacityLayers-expected.png: Added.
* fast/css/ZeroOpacityLayers-expected.checksum: Added.
* fast/css/ZeroOpacityLayers2.html: Added.
* fast/css/ZeroOpacityLayers2-expected.txt: Added.
* fast/css/ZeroOpacityLayers2-expected.png: Added.
* fast/css/ZeroOpacityLayers2-expected.checksum: Added.
2006-06-02 Rob Buis <buis@kde.org>
Reviewed by Hyatt, checked in by Tim H.
91a5ac05da632bbda0a383f2644a1fbc
\ No newline at end of file
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
layer at (10,10) size 200x200
RenderBlock (positioned) {DIV} at (10,10) size 200x200 [bgcolor=#0000FF]
layer at (20,20) size 180x180
RenderBlock (positioned) {DIV} at (10,10) size 180x180 [bgcolor=#00FF00]
layer at (30,30) size 160x160
RenderBlock (positioned) {DIV} at (10,10) size 160x160 [bgcolor=#FF0000]
RenderText {#text} at (0,0) size 150x18
text run at (0,0) width 150: "Should not see this text."
RenderText {#text} at (0,0) size 0x0
layer at (40,40) size 140x140
RenderBlock (positioned) {DIV} at (10,10) size 140x140 [bgcolor=#FFFFFF]
RenderText {#text} at (0,0) size 119x36
text run at (0,0) width 119: "Should not see this"
text run at (0,18) width 27: "text."
layer at (100,100) size 200x200
RenderBlock (positioned) {DIV} at (80,80) size 200x200 [bgcolor=#FFFF00]
layer at (10,316) size 790x72
RenderBlock (positioned) {P} at (10,316) size 790x72
RenderText {#text} at (0,0) size 788x54
text run at (0,0) width 788: "Below are four boxes all within each other, and a box overlaping other boxes. The 3rd inner box is red, and has an opacity of"
text run at (0,18) width 771: "zero, and the box within it is black and has an opacity of 1. As the third box has opacity zero, the inner black is not visible."
text run at (0,36) width 627: "The yellow block has opacity of 0.5, and is as the same level in the DOM tree as the 3rd inner box. "
RenderText {#text} at (0,0) size 0x0
RenderText {#text} at (0,0) size 0x0
RenderText {#text} at (627,36) size 768x36
text run at (627,36) width 141: "\\ No newline at end of"
text run at (0,54) width 20: "file"
<html>
<head>
<style>
DIV.one {
position:absolute;
top:10px;
left:10px;
background-color:rgb(0,0,255);
width:200px;
height:200px;
}
DIV.two {
position:absolute;
top:10px;
left:10px;
background-color:rgb(0,255,0);
width:180px;
height:180px;
}
DIV.three-a {
position:absolute;
top:10px;
left:10px;
background-color:rgb(255,0,0);
width:160px;
height:160px;
opacity:0;
}
DIV.three-b {
position:absolute;
top:80px;
left:80px;
background-color:rgb(255,255,0);
width:200px;
height:200px;
opacity:0.5;
}
DIV.four {
position:absolute;
top:10px;
left:10px;
background-color:rgb(255,255,255);
width:140px;
height:140px;
opacity:1;
}
P.desc {
position: absolute;
top:300px;
left:10px;
}
</style>
</head>
<body>
<div class="one">
<div class="two">
<div class="three-a">
Should not see this text.
<div class="four">
Should not see this text.
</div>
</div>
<div class="three-b">
</div>
</div>
</div>
<p class="desc">
Below are four boxes all within each other, and a box overlaping other boxes. The 3rd inner box is red, and has an opacity of zero, and the box within it is black and has an opacity of 1. As the third box has opacity zero, the inner black is not visible. The yellow block has opacity of 0.5, and is as the same level in the DOM tree as the 3rd inner box.
</div>
</body>
</html>
\ No newline at end of file
7f6440da26f60f8c3389c8b62b5f2ade
\ No newline at end of file
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
layer at (10,10) size 200x200
RenderBlock (positioned) {DIV} at (10,10) size 200x200 [bgcolor=#0000FF]
layer at (20,20) size 180x180
RenderBlock (positioned) {DIV} at (10,10) size 180x180 [bgcolor=#00FF00]
layer at (30,30) size 160x160
RenderBlock (positioned) {DIV} at (10,10) size 160x160 [bgcolor=#FF0000]
RenderText {#text} at (0,0) size 150x18
text run at (0,0) width 150: "Should not see this text."
RenderText {#text} at (0,0) size 0x0
layer at (40,40) size 140x140
RenderBlock (positioned) {DIV} at (10,10) size 140x140 [bgcolor=#FFFFFF]
RenderText {#text} at (0,0) size 119x36
text run at (0,0) width 119: "Should not see this"
text run at (0,18) width 27: "text."
layer at (100,100) size 200x200
RenderBlock (positioned) {DIV} at (80,80) size 200x200 [bgcolor=#FFFF00]
layer at (10,316) size 790x72
RenderBlock (positioned) {P} at (10,316) size 790x72
RenderText {#text} at (0,0) size 788x54
text run at (0,0) width 788: "Below are four boxes all within each other, and a box overlaping other boxes. The 3rd inner box is red, and has an opacity of"
text run at (0,18) width 783: "zero, and the box within it is black and has an opacity of 0.5. As the third box has opacity zero, the inner black is not visible."
text run at (0,36) width 627: "The yellow block has opacity of 0.5, and is as the same level in the DOM tree as the 3rd inner box. "
RenderText {#text} at (0,0) size 0x0
RenderText {#text} at (0,0) size 0x0
RenderText {#text} at (627,36) size 768x36
text run at (627,36) width 141: "\\ No newline at end of"
text run at (0,54) width 20: "file"
<html>
<head>
<style>
DIV.one {
position:absolute;
top:10px;
left:10px;
background-color:rgb(0,0,255);
width:200px;
height:200px;
}
DIV.two {
position:absolute;
top:10px;
left:10px;
background-color:rgb(0,255,0);
width:180px;
height:180px;
}
DIV.three-a {
position:absolute;
top:10px;
left:10px;
background-color:rgb(255,0,0);
width:160px;
height:160px;
opacity:0;
}
DIV.three-b {
position:absolute;
top:80px;
left:80px;
background-color:rgb(255,255,0);
width:200px;
height:200px;
opacity:0.5;
}
DIV.four {
position:absolute;
top:10px;
left:10px;
background-color:rgb(255,255,255);
width:140px;
height:140px;
opacity:0.5;
}
P.desc {
position: absolute;
top:300px;
left:10px;
}
</style>
</head>
<body>
<div class="one">
<div class="two">
<div class="three-a">
Should not see this text.
<div class="four">
Should not see this text.
</div>
</div>
<div class="three-b">
</div>
</div>
</div>
<p class="desc">
Below are four boxes all within each other, and a box overlaping other boxes. The 3rd inner box is red, and has an opacity of zero, and the box within it is black and has an opacity of 0.5. As the third box has opacity zero, the inner black is not visible. The yellow block has opacity of 0.5, and is as the same level in the DOM tree as the 3rd inner box.
</div>
</body>
</html>
\ No newline at end of file
2006-06-02 David Carson <dacarson@gmail.com>
Reviewed by Hyatt, checked in by Tim H.
fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=9115
Changed RenderLayer to only render layers that are not
totally transparent.
* rendering/RenderLayer.cpp
(RenderLayer::paintLayer):
Changed function to also check if the layer is totally transparent
and if it is, don't bother painting it.
2006-06-02 Rob Buis <buis@kde.org>
Reviewed by Hyatt, checked in by Tim H.
......
......@@ -1183,6 +1183,10 @@ RenderLayer::paintLayer(RenderLayer* rootLayer, GraphicsContext* p,
updateZOrderLists();
updateOverflowList();
// If this layer is totally invisible, then return as there is nothing to paint
if (!m_object->opacity())
return;
if (isTransparent())
haveTransparency = true;
......
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