Fix behavior of -moz-box-shadow on flexible non-flexbox children of flexboxes. (Bug 531098) r=roc

This commit is contained in:
L. David Baron 2009-12-13 19:40:55 -08:00
parent c04a2d4b08
commit 5de5dfea69
4 changed files with 26 additions and 0 deletions

View File

@ -6311,6 +6311,12 @@ nsFrame::DoLayout(nsBoxLayoutState& aState)
}
}
// Should we do this if IsCollapsed() is true?
nsSize size(GetSize());
desiredSize.mOverflowArea.UnionRect(desiredSize.mOverflowArea,
nsRect(nsPoint(0, 0), size));
FinishAndStoreOverflow(&desiredSize.mOverflowArea, size);
SyncLayout(aState);
return rv;

View File

@ -0,0 +1,7 @@
<!DOCTYPE HTML>
<style type="text/css">
html, body { margin: 0; padding: 0; border: none; }
</style>
<div style="position: absolute; width: 200px; height: 400px; top: 100px; left: 100px; -moz-box-shadow: 0 0 20px blue">A</div>
<div style="position: absolute; width: 100px; height: 400px; top: 100px; left: 400px; -moz-box-shadow: 0 0 20px blue">B</div>

View File

@ -0,0 +1,12 @@
<!DOCTYPE HTML>
<style type="text/css">
html, body { margin: 0; padding: 0; border: none; }
</style>
<div style="margin: 100px; height: 400px; width: 400px; display: -moz-box; -moz-box-orient: horizontal">
<div style="width: 200px; -moz-box-shadow: 0 0 20px blue">A</div>
<div style="width: 100px"></div>
<div style="-moz-box-flex: 1; -moz-box-shadow: 0 0 20px blue">B</div>
</div>

View File

@ -1349,4 +1349,5 @@ fails-if(MOZ_WIDGET_TOOLKIT!="cocoa") == 488692-1.html 488692-1-ref.html # needs
== 528038-1f.html 528038-1-ref.html
== 528038-2.html 528038-2-ref.html
== 530686-1.html 530686-1-ref.html
== 531098-1.html 531098-1-ref.html
== 531371-1.html 531371-1-ref.html