Bug 1209697 - Part 1: Clear ancestor intrinsic sizes when our block size changes. r=dholbert, a=lizzard
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sun, 05 Feb 2017 10:26:09 -0500
changeset 378551 43628ac1889b370b04f6776f3c32e7ad32af5b4d
parent 378550 d63931f550626341049889b560f34461143a26ba
child 378552 ae419dfaebbc4c174aa64d323475b4ee1ab73717
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert, lizzard
bugs1209697
milestone53.0a2
Bug 1209697 - Part 1: Clear ancestor intrinsic sizes when our block size changes. r=dholbert, a=lizzard MozReview-Commit-ID: 9LnMm6KDcDP
layout/style/nsStyleStruct.cpp
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -1585,19 +1585,24 @@ nsStylePosition::CalcDifference(const ns
   if (aOldStyleVisibility) {
     bool isVertical = WritingMode(aOldStyleVisibility).IsVertical();
     if (isVertical ? widthChanged : heightChanged) {
       // Block-size changes can affect descendant intrinsic sizes due to
       // replaced elements with percentage bsizes in descendants which
       // also have percentage bsizes. This is handled via
       // nsChangeHint_UpdateComputedBSize which clears intrinsic sizes
       // for frames that have such replaced elements.
+      //
+      // We need to use nsChangeHint_ClearAncestorIntrinsics for
+      // block-size changes so we clear results of cached CSS Flex
+      // measuring reflows.
       hint |= nsChangeHint_NeedReflow |
               nsChangeHint_UpdateComputedBSize |
-              nsChangeHint_ReflowChangesSizeOrPosition;
+              nsChangeHint_ReflowChangesSizeOrPosition |
+              nsChangeHint_ClearAncestorIntrinsics;
     }
 
     if (isVertical ? heightChanged : widthChanged) {
       // None of our inline-size differences can affect descendant
       // intrinsic sizes and none of them need to force children to
       // reflow.
       hint |= nsChangeHint_AllReflowHints &
               ~(nsChangeHint_ClearDescendantIntrinsics |