Disable a small part of the fix for bug 416168 to fix a regression with outlines of certain empty inlines. b=424236 r+sr=roc a=blocking1.9+

This commit is contained in:
dbaron@dbaron.org 2008-04-05 20:55:15 -07:00
parent 56f5967e96
commit 878a6caed2
4 changed files with 53 additions and 2 deletions

View File

@ -5296,6 +5296,14 @@ nsIFrame::GetOverflowAreaProperty(PRBool aCreateIfNecessary)
return nsnull;
}
inline PRBool
IsInlineFrame(nsIFrame *aFrame)
{
nsIAtom *type = aFrame->GetType();
return type == nsGkAtoms::inlineFrame ||
type == nsGkAtoms::positionedInlineFrame;
}
void
nsIFrame::FinishAndStoreOverflow(nsRect* aOverflowArea, nsSize aNewSize)
{
@ -5321,8 +5329,11 @@ nsIFrame::FinishAndStoreOverflow(nsRect* aOverflowArea, nsSize aNewSize)
// Overflow area must always include the frame's top-left and bottom-right,
// even if the frame rect is empty.
aOverflowArea->UnionRectIncludeEmpty(*aOverflowArea,
nsRect(nsPoint(0, 0), aNewSize));
// Pending a real fix for bug 426879, don't do this for inline frames
// with zero width.
if (aNewSize.width != 0 || !IsInlineFrame(this))
aOverflowArea->UnionRectIncludeEmpty(*aOverflowArea,
nsRect(nsPoint(0, 0), aNewSize));
PRBool geometricOverflow =
aOverflowArea->x < 0 || aOverflowArea->y < 0 ||

View File

@ -0,0 +1,18 @@
<!DOCTYPE HTML> <!-- standards mode only! -->
<html>
<head>
<title>Testcase, overflow on empty spans</title>
<style type="text/css">
html, body { margin: 0; padding: 0.25em; }
body > div { background:aqua; }
body > div > div { margin: 0 1em; }
</style>
</head>
<body>
<div>
<div>text</div>
</div>
</body>
</html>

View File

@ -0,0 +1,21 @@
<!DOCTYPE HTML> <!-- standards mode only! -->
<html>
<head>
<title>Testcase, overflow on empty spans</title>
<style type="text/css">
html, body { margin: 0; padding: 0.25em; }
div { background:aqua; }
div > span { outline: 1px dotted black; }
div > span > span { display:block; margin: 0 1em; }
</style>
</head>
<body>
<div>
<!-- rely on the dot being offscreen -->
<span>
<span>text</span></span>
</div>
</body>
</html>

View File

@ -783,4 +783,5 @@ fails == 413027-3.html 413027-3-ref.html
== 424074-1.xul 424074-1-ref.xul
!= 424074-1.xul 424074-1-ref2.xul
fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") == 424074-1-ref2.xul 424074-1-ref3.xul
== 424236-10.html 424236-10-ref.html
== 424631-1.html 424631-1-ref.html