Bug 1209994 - Take block-wrapper path only for blocks that are wrappers. r=bz, a=sylvestre
authorRobert O'Callahan <robert@ocallahan.org>
Wed, 21 Oct 2015 16:27:50 +1300
changeset 296687 278b5140a696
parent 296686 26ef30e81468
child 296688 7d24cb4584fc
push id5289
push userrocallahan@mozilla.com
push date2015-11-11 03:13 +0000
treeherdermozilla-beta@278b5140a696 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, sylvestre
bugs1209994
milestone43.0
Bug 1209994 - Take block-wrapper path only for blocks that are wrappers. r=bz, a=sylvestre
layout/generic/nsHTMLReflowState.cpp
layout/reftests/bugs/1209994-1-ref.html
layout/reftests/bugs/1209994-1.html
layout/reftests/bugs/1209994-2-ref.html
layout/reftests/bugs/1209994-2.html
layout/reftests/bugs/1209994-3-ref.html
layout/reftests/bugs/1209994-3.html
layout/reftests/bugs/1209994-4-ref.html
layout/reftests/bugs/1209994-4.html
layout/reftests/bugs/reftest.list
--- a/layout/generic/nsHTMLReflowState.cpp
+++ b/layout/generic/nsHTMLReflowState.cpp
@@ -615,17 +615,17 @@ nsHTMLReflowState::InitResizeFlags(nsPre
       (mFlags.mSpecialBSizeReflow ||
        (frame->FirstInFlow()->GetStateBits() &
          NS_TABLE_CELL_HAD_SPECIAL_REFLOW)) &&
       (frame->GetStateBits() & NS_FRAME_CONTAINS_RELATIVE_BSIZE)) {
     // Need to set the bit on the cell so that
     // mCBReflowState->IsBResize() is set correctly below when
     // reflowing descendant.
     SetBResize(true);
-  } else if (mCBReflowState && !nsLayoutUtils::IsNonWrapperBlock(frame)) {
+  } else if (mCBReflowState && frame->IsBlockWrapper()) {
     // XXX Is this problematic for relatively positioned inlines acting
     // as containing block for absolutely positioned elements?
     // Possibly; in that case we should at least be checking
     // NS_SUBTREE_DIRTY, I'd think.
     SetBResize(mCBReflowState->IsBResize());
   } else if (ComputedBSize() == NS_AUTOHEIGHT) {
     if (eCompatibility_NavQuirks == aPresContext->CompatibilityMode() &&
         mCBReflowState) {
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1209994-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<style>
+div {
+  height: 240px;
+}
+#f {
+  height: auto;
+  overflow: hidden;
+  padding: 0;
+  border: none;
+}
+</style>
+There should be a visible fieldset below:
+<div>
+  <fieldset id="f">This is fieldset</fieldset>
+</div>
+
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1209994-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<style>
+div {
+  height: 240px;
+}
+#f {
+  height: 0;
+  overflow: hidden;
+  padding: 0;
+  border: none;
+}
+</style>
+There should be a visible fieldset below:
+<div>
+  <fieldset id="f">This is fieldset</fieldset>
+</div>
+<script>
+h = document.body.clientHeight;
+f.style.height = "auto";
+</script>
+
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1209994-2-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<style>
+div {
+  height: 240px;
+}
+#f {
+  height: auto;
+  overflow: hidden;
+  padding: 0;
+  border: none;
+}
+</style>
+There should be a visible button below:
+<div>
+  <button id="f">This is button</button>
+</div>
+
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1209994-2.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<style>
+div {
+  height: 240px;
+}
+#f {
+  height: 0;
+  overflow: hidden;
+  padding: 0;
+  border: none;
+}
+</style>
+There should be a visible button below:
+<div>
+  <button id="f">This is button</button>
+</div>
+<script>
+h = document.body.clientHeight;
+f.style.height = "auto";
+</script>
+
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1209994-3-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<style>
+div {
+  height: 240px;
+}
+#f {
+  height: auto;
+  overflow: hidden;
+  padding: 0;
+  border: none;
+}
+</style>
+There should be a visible table below:
+<div>
+  <table id="f">This is a table</table>
+</div>
+
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1209994-3.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<style>
+div {
+  height: 240px;
+}
+#f {
+  height: 0;
+  overflow: hidden;
+  padding: 0;
+  border: none;
+}
+</style>
+There should be a visible table below:
+<div>
+  <table id="f">This is a table</table>
+</div>
+<script>
+h = document.body.clientHeight;
+f.style.height = "auto";
+</script>
+
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1209994-4-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<style>
+div {
+  height: 240px;
+}
+#f {
+  height: auto;
+  overflow: hidden;
+  padding: 0;
+  border: none;
+}
+</style>
+There should be a visible select below:
+<div>
+  <select id="f"><option>This is a select</option></select>
+</div>
+
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1209994-4.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<style>
+div {
+  height: 240px;
+}
+#f {
+  height: 0;
+  overflow: hidden;
+  padding: 0;
+  border: none;
+}
+</style>
+There should be a visible select below:
+<div>
+  <select id="f"><option>This is a select</option></select>
+</div>
+<script>
+h = document.body.clientHeight;
+f.style.height = "auto";
+</script>
+
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1930,8 +1930,12 @@ skip-if(B2G||Mulet) == 1150021-1.xul 115
 == 1156129-1.html 1156129-1-ref.html
 == 1169331-1.html 1169331-1-ref.html
 == 1179078-1.html 1179078-1-ref.html
 fuzzy(1,74) fuzzy-if(gtkWidget,6,79) == 1174332-1.html 1174332-1-ref.html
 == 1190635-1.html 1190635-1-ref.html
 == 1202512-1.html 1202512-1-ref.html
 == 1202512-2.html 1202512-2-ref.html
 != 1207326-1.html about:blank
+== 1209994-1.html 1209994-1-ref.html
+== 1209994-2.html 1209994-2-ref.html
+== 1209994-3.html 1209994-3-ref.html
+== 1209994-4.html 1209994-4-ref.html