зеркало из https://github.com/mozilla/pjs.git
Bug 421239: Remove broken/brittle optimization of guessing (incorrectly) whether a line might be empty, when we're determining whether we need to mark next line's margin as dirty. r+sr=roc, a=blocking1.9+
This commit is contained in:
Родитель
581e6848a4
Коммит
018d8c35be
|
@ -1918,7 +1918,7 @@ nsBlockFrame::ReflowDirtyLines(nsBlockReflowState& aState)
|
|||
// to the result of nextLine->ShouldApplyTopMargin.
|
||||
if (line.next() != end_lines()) {
|
||||
PRBool maybeWasEmpty = oldY == line.next()->mBounds.y;
|
||||
PRBool isEmpty = line->mBounds.width == 0 && line->CachedIsEmpty();
|
||||
PRBool isEmpty = line->CachedIsEmpty();
|
||||
if (maybeReflowingForFirstTime /*1*/ ||
|
||||
(isEmpty || maybeWasEmpty) /*2/3/4*/) {
|
||||
line.next()->MarkPreviousMarginDirty();
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
div#a { margin: 100px 0px 100px 0px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="a"></div>
|
||||
<div>b</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<style>
|
||||
div#a { margin: 100px 0px 100px 0px; }
|
||||
</style>
|
||||
<script>
|
||||
function boom()
|
||||
{
|
||||
var a = document.getElementById("a");
|
||||
a.removeChild(a.firstChild);
|
||||
document.documentElement.className = "";
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();">
|
||||
<div id="a">a</div>
|
||||
<div>b</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
div#a { margin: 0px 0px 100px 0px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="a"></div>
|
||||
<div>b</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<style>
|
||||
div#a { margin: 0px 0px 100px 0px; }
|
||||
</style>
|
||||
<script>
|
||||
function boom()
|
||||
{
|
||||
var a = document.getElementById("a");
|
||||
a.removeChild(a.firstChild);
|
||||
document.documentElement.className = "";
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();">
|
||||
<div id="a">a</div>
|
||||
<div>b</div>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче