Bug 696307. Floats in a different block to their placeholders should only be painted once. r=mats

This commit is contained in:
Robert O'Callahan 2011-11-08 13:09:39 +13:00
parent 6e8498d824
commit 3efeb8c08d
4 changed files with 15 additions and 1 deletions

View File

@ -1885,7 +1885,11 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
nsPlaceholderFrame* placeholder = static_cast<nsPlaceholderFrame*>(child);
child = placeholder->GetOutOfFlowFrame();
NS_ASSERTION(child, "No out of flow frame?");
if (!child || nsLayoutUtils::IsPopup(child))
// If 'child' is a pushed float then it's owned by a block that's not an
// ancestor of the placeholder, and it will be painted by that block and
// should not be painted through the placeholder.
if (!child || nsLayoutUtils::IsPopup(child) ||
(child->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT))
return NS_OK;
// Make sure that any attempt to use childType below is disappointed. We
// could call GetType again but since we don't currently need it, let's

View File

@ -0,0 +1,5 @@
<!DOCTYPE html>
<html><body>
<div style="float:left; width:200px;">X</div>
<div style="float:left; background:rgba(0,0,0,0.5); width:210px;">Y</div>
</body></html>

View File

@ -0,0 +1,4 @@
<!DOCTYPE HTML>
<html><body>
<div style="-moz-column-count:3; -moz-column-gap:0; width:600px;">X<div style="float:left; background:rgba(0,0,0,0.5);"><div style="position:absolute;">Y</div><span style="padding-left:210px;"></span></div></div>
</body></html>

View File

@ -1670,4 +1670,5 @@ fails-if(layersGPUAccelerated&&cocoaWidget) == 654950-1.html 654950-1-ref.html #
== 670467-2.html 670467-2-ref.html
!= 691087-1.html 691087-1-ref.html
== 691571-1.html 691571-1-ref.html
== 696307-1.html 696307-1-ref.html
== 696739-1.html 696739-1-ref.html