Bug 1595199 - Make nsGfxScrollFrame propagate ReflowInput's mFlags.mIsBResizeForPercentages to its inner, to fix vertical resizing layout bugs. r=dholbert

Differential Revision: https://phabricator.services.mozilla.com/D52439

--HG--
extra : moz-landing-system : lando
This commit is contained in:
L. David Baron 2019-11-12 07:37:40 +00:00
Родитель c3434cf2c0
Коммит 3812bc0ba4
4 изменённых файлов: 67 добавлений и 1 удалений

Просмотреть файл

@ -626,9 +626,13 @@ void nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowInput* aState,
kidReflowInput.SetComputedBSize(computedBSize);
kidReflowInput.ComputedMinBSize() = computedMinBSize;
kidReflowInput.ComputedMaxBSize() = computedMaxBSize;
if (aState->mReflowInput.IsBResizeForWM(kidReflowInput.GetWritingMode())) {
const WritingMode kidWM = kidReflowInput.GetWritingMode();
if (aState->mReflowInput.IsBResizeForWM(kidWM)) {
kidReflowInput.SetBResize(true);
}
if (aState->mReflowInput.IsBResizeForPercentagesForWM(kidWM)) {
kidReflowInput.mFlags.mIsBResizeForPercentages = true;
}
// Temporarily set mHasHorizontalScrollbar/mHasVerticalScrollbar to
// reflect our assumptions while we reflow the child.

Просмотреть файл

@ -0,0 +1,20 @@
<!DOCTYPE HTML>
<meta charset=UTF-8>
<title>Testcase reference, bug 1595199</title>
<style>
#outer {
background: fuchsia;
height: 100px;
}
#inner {
background: blue;
height: 100px;
width: 50%;
}
</style>
<div id="outer">
<div id="inner">
</div>
</div>

Просмотреть файл

@ -0,0 +1,41 @@
<!DOCTYPE HTML>
<meta charset=UTF-8>
<title>Testcase, bug 1595199</title>
<style>
#outer {
background: red;
overflow: hidden;
}
#wrapper1 {
background: red;
height: 100%;
}
#wrapper2 {
background: fuchsia;
height: 100%;
}
#inner {
background: blue;
height: 100px;
width: 50%;
}
</style>
<div id="outer" style="height: 50px">
<div id="wrapper1">
<div id="wrapper2">
<div id="inner">
</div>
</div>
</div>
</div>
<script>
window.addEventListener("load", function load_handler() {
document.getElementById("wrapper2").offsetHeight; // flush layout
document.getElementById("outer").style.height = "auto";
});
</script>

Просмотреть файл

@ -2087,3 +2087,4 @@ test-pref(plain_text.wrap_long_lines,false) != 1565129.txt 1565129.txt
fuzzy(0-32,0-8) fuzzy-if(Android&&webrender,0-32,0-1458) == 1576553-1.html 1576553-1-ref.html
fuzzy(0-1,0-10000) == 1577566-1.html 1577566-1-ref.html
== 1579953-2.html 1579953-2-ref.html
== 1595199-1.html 1595199-1-ref.html