Bug 1341009 - Reset aStatus before calling nsLineLayout::ReflowFrame(). draft
authorTing-Yu Lin <tlin@mozilla.com>
Thu, 14 Sep 2017 13:11:22 +0800
changeset 666703 346cbb78fcca4aec86f1536be38610ff72a560ef
parent 666702 1395c28ced5de8f4872e09841d76da1a06d173c8
child 666704 e7caf759589cdbc3d6bfe0d9963ad66d7ae5b90a
push id80486
push userbmo:tlin@mozilla.com
push dateTue, 19 Sep 2017 03:52:30 +0000
bugs1341009
milestone57.0a1
Bug 1341009 - Reset aStatus before calling nsLineLayout::ReflowFrame(). This ensures the nsIFrame::Reflow() call in nsLineLayout::ReflowFrame() is using an empty reflow status. MozReview-Commit-ID: EBHs8xX7MI1
layout/generic/nsInlineFrame.cpp
--- a/layout/generic/nsInlineFrame.cpp
+++ b/layout/generic/nsInlineFrame.cpp
@@ -789,16 +789,17 @@ nsInlineFrame::ReflowInlineFrame(nsPresC
                                  const ReflowInput& aReflowInput,
                                  InlineReflowInput& irs,
                                  nsIFrame* aFrame,
                                  nsReflowStatus& aStatus)
 {
   nsLineLayout* lineLayout = aReflowInput.mLineLayout;
   bool reflowingFirstLetter = lineLayout->GetFirstLetterStyleOK();
   bool pushedFrame;
+  aStatus.Reset();
   lineLayout->ReflowFrame(aFrame, aStatus, nullptr, pushedFrame);
 
   if (aStatus.IsInlineBreakBefore()) {
     if (aFrame != mFrames.FirstChild()) {
       // Change break-before status into break-after since we have
       // already placed at least one child frame. This preserves the
       // break-type so that it can be propagated upward.
       StyleClear oldBreakType = aStatus.BreakType();