Commit cbdc83f7 authored by Ting-Yu Lin's avatar Ting-Yu Lin
Browse files

Bug 1776079 - Delete SharedFlexData() only if there's no flex container's next-in-flow. r=dholbert

parent e6e61d19
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
<!DOCTYPE html>
<style>
html {
  column-width: 0px;
}
.a {
  break-inside: avoid;
  word-wrap: break-word;
  visibility: collapse;
  display: flex;
}
</style>
<li>
<time>a</time>
</li>
<base></base>
<q>
<li class="a">aaaaaaaaaaaa</li>
<ul style="writing-mode: sideways-lr">aaa</ul>
+1 −0
Original line number Diff line number Diff line
@@ -803,3 +803,4 @@ load 1728319.html
asserts(2-8) load 1730506.html # asserts from integer overflow & bogus sizes
asserts(1-4) load 1730570.html # asserts from integer overflow & bogus sizes
load 1734015.html
load 1776079.html
+6 −3
Original line number Diff line number Diff line
@@ -4817,9 +4817,12 @@ void nsFlexContainerFrame::Reflow(nsPresContext* aPresContext,
      data->mContentBoxCrossSize = flr.mContentBoxCrossSize;

      SetProperty(SumOfChildrenBlockSizeProperty(), sumOfChildrenBlockSize);
    } else if (data) {
      // We are fully-complete, so no next-in-flow is needed. Delete the
      // existing data.
    } else if (data && !GetNextInFlow()) {
      // We are fully-complete, so no next-in-flow is needed. However, if we
      // report SetInlineLineBreakBeforeAndReset() in a incremental reflow, our
      // next-in-flow might still exist. It can be reflowed again before us if
      // it is an overflow container. Delete the existing data only if we don't
      // have a next-in-flow.
      RemoveProperty(SharedFlexData::Prop());
      RemoveProperty(SumOfChildrenBlockSizeProperty());
    }