Bug 1338053: Make nsFlexContainerFrame::MarkIntrinsicISizesDirty() also call its parent class's method. r=emilio draft
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 08 Feb 2017 23:08:43 -0800
changeset 481497 291e8b6c17bc94a5bb557e9dbf75da7d28efb961
parent 481429 a7000da4b6e2a79c5750dad71095865bdf75be04
child 545207 1fbdb76deb149eac1239cca98dbc4a0717098c28
push id44825
push userdholbert@mozilla.com
push dateThu, 09 Feb 2017 23:02:02 +0000
reviewersemilio
bugs1338053
milestone54.0a1
Bug 1338053: Make nsFlexContainerFrame::MarkIntrinsicISizesDirty() also call its parent class's method. r=emilio MozReview-Commit-ID: 72oIlunLcVq
layout/generic/nsFlexContainerFrame.cpp
layout/reftests/xul/css-flex-1-ref.html
layout/reftests/xul/css-flex-1.xul
layout/reftests/xul/reftest.list
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -1863,16 +1863,17 @@ nsFlexContainerFrame::MeasureAscentAndHe
 }
 
 /* virtual */ void
 nsFlexContainerFrame::MarkIntrinsicISizesDirty()
 {
   for (nsIFrame* childFrame : mFrames) {
     childFrame->Properties().Delete(CachedFlexMeasuringReflow());
   }
+  nsContainerFrame::MarkIntrinsicISizesDirty();
 }
 
 nscoord
 nsFlexContainerFrame::
   MeasureFlexItemContentHeight(nsPresContext* aPresContext,
                                FlexItem& aFlexItem,
                                bool aForceVerticalResizeForMeasuringReflow,
                                const ReflowInput& aParentReflowInput)
new file mode 100644
--- /dev/null
+++ b/layout/reftests/xul/css-flex-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <style>
+    body { margin: 0 }
+    div.ref {
+      border: 1px solid black;
+      box-sizing: border-box;
+      background: green;
+      height: 50px;
+      width: 100px;
+    }
+  </style>
+</head>
+<body>
+  <div class="ref"></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/xul/css-flex-1.xul
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+        class="reftest-wait"
+        onload="tweak()">
+  <style xmlns="http://www.w3.org/1999/xhtml">
+    <![CDATA[
+    panelview {
+      border: 1px solid black;
+      background: green;
+      display: flex;
+      height: 50px;
+    }
+    ]]>
+  </style>
+  <script>
+    <![CDATA[
+    function tweak() {
+      var tweakMe = document.getElementById("tweakMe");
+      tweakMe.style.width = "100px";
+      document.documentElement.className = "";
+    }
+    ]]>
+  </script>
+  <hbox>
+    <panelview id="tweakMe"></panelview>
+  </hbox>
+</window>
--- a/layout/reftests/xul/reftest.list
+++ b/layout/reftests/xul/reftest.list
@@ -1,8 +1,10 @@
+== css-flex-1.xul css-flex-1-ref.html
+
 == menuitem-key.xul menuitem-key-ref.xul
 # these random-if(Android) are due to differences between Android Native & Xul, see bug 732569
 random-if(Android) == menulist-shrinkwrap-1.xul menulist-shrinkwrap-1-ref.xul
 random-if(Android) fails-if(winWidget) == menulist-shrinkwrap-2.xul menulist-shrinkwrap-2-ref.xul
 == textbox-overflow-1.xul textbox-overflow-1-ref.xul # for bug 749658
 # accesskeys are not normally displayed on Mac, so skip this test
 skip-if(cocoaWidget) == accesskey.xul accesskey-ref.xul
 fails-if(cocoaWidget) fails-if(browserIsRemote&&dwrite) fuzzy-if(xulRuntime.widgetToolkit=="gtk3",1,11) == tree-row-outline-1.xul tree-row-outline-1-ref.xul # win8: bug 1254832