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 @@ + + +
+ +