From 17fcef59bf0b97eff454e5c1314707b59775c7ec Mon Sep 17 00:00:00 2001 From: "dholbert%cs.stanford.edu" Date: Fri, 14 Mar 2008 07:21:20 +0000 Subject: [PATCH] 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+ git-svn-id: svn://10.0.0.236/trunk@247801 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsBlockFrame.cpp | 2 +- .../layout/reftests/bugs/421239-1-ref.html | 12 +++++++++++ mozilla/layout/reftests/bugs/421239-1.html | 20 +++++++++++++++++++ .../layout/reftests/bugs/421239-2-ref.html | 12 +++++++++++ mozilla/layout/reftests/bugs/421239-2.html | 20 +++++++++++++++++++ 5 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 mozilla/layout/reftests/bugs/421239-1-ref.html create mode 100644 mozilla/layout/reftests/bugs/421239-1.html create mode 100644 mozilla/layout/reftests/bugs/421239-2-ref.html create mode 100644 mozilla/layout/reftests/bugs/421239-2.html diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index aad0e78818f..69597d0d22f 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -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(); diff --git a/mozilla/layout/reftests/bugs/421239-1-ref.html b/mozilla/layout/reftests/bugs/421239-1-ref.html new file mode 100644 index 00000000000..6e75fc08e6e --- /dev/null +++ b/mozilla/layout/reftests/bugs/421239-1-ref.html @@ -0,0 +1,12 @@ + + + + + + +
+
b
+ + diff --git a/mozilla/layout/reftests/bugs/421239-1.html b/mozilla/layout/reftests/bugs/421239-1.html new file mode 100644 index 00000000000..d4d94b0bacc --- /dev/null +++ b/mozilla/layout/reftests/bugs/421239-1.html @@ -0,0 +1,20 @@ + + + + + + + +
a
+
b
+ + diff --git a/mozilla/layout/reftests/bugs/421239-2-ref.html b/mozilla/layout/reftests/bugs/421239-2-ref.html new file mode 100644 index 00000000000..3d2770879a8 --- /dev/null +++ b/mozilla/layout/reftests/bugs/421239-2-ref.html @@ -0,0 +1,12 @@ + + + + + + +
+
b
+ + diff --git a/mozilla/layout/reftests/bugs/421239-2.html b/mozilla/layout/reftests/bugs/421239-2.html new file mode 100644 index 00000000000..39f5bf47e4c --- /dev/null +++ b/mozilla/layout/reftests/bugs/421239-2.html @@ -0,0 +1,20 @@ + + + + + + + +
a
+
b
+ +