diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index e7d1eeb7d01b..4afc6eecb924 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -1501,6 +1501,13 @@ nsBlockFrame::UpdateOverflow() ConsiderChildOverflow(lineAreas, lineFrame); } + // Consider the overflow areas of the floats attached to the line as well + if (line->HasFloats()) { + for (nsFloatCache* fc = line->GetFirstFloat(); fc; fc = fc->Next()) { + ConsiderChildOverflow(lineAreas, fc->mFloat); + } + } + line->SetOverflowAreas(lineAreas); } diff --git a/layout/reftests/floats/775350-1-ref.html b/layout/reftests/floats/775350-1-ref.html new file mode 100644 index 000000000000..db8d6c2719f2 --- /dev/null +++ b/layout/reftests/floats/775350-1-ref.html @@ -0,0 +1,11 @@ + + + +
+
+
+
+
+
+ + diff --git a/layout/reftests/floats/775350-1.html b/layout/reftests/floats/775350-1.html new file mode 100644 index 000000000000..8d5ffddb9ac4 --- /dev/null +++ b/layout/reftests/floats/775350-1.html @@ -0,0 +1,30 @@ + + + + + + + +
+
+
+
+
+ + diff --git a/layout/reftests/floats/reftest.list b/layout/reftests/floats/reftest.list index f26ab6389b41..1f83b49df24e 100644 --- a/layout/reftests/floats/reftest.list +++ b/layout/reftests/floats/reftest.list @@ -15,3 +15,4 @@ fails == 345369-2.html 345369-2-ref.html == 345369-5.html 345369-5-ref.html == 429974-1.html 429974-1-ref.html == 546048-1.html 546048-1-ref.html +== 775350-1.html 775350-1-ref.html