зеркало из https://github.com/mozilla/gecko-dev.git
Bug 810726: Rework logic in nsColumnSetFrame for handling overflow to prevent infinite loop problems. [r=roc]
This commit is contained in:
Родитель
1966cf0df7
Коммит
bd2aebb3c1
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<iframe width="1200" height="1024" src="810726-2.html">
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
.outer-bound {
|
||||
max-width: 980px;
|
||||
}
|
||||
|
||||
.cols {
|
||||
-moz-column-width: 700px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="outer-bound">
|
||||
<div class="cols">
|
||||
<p>There once was a guy.</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -428,3 +428,4 @@ test-pref(layout.css.flexbox.enabled,true) load 798235-1.html
|
|||
test-pref(layout.css.flexbox.enabled,true) load 799207-1.html
|
||||
asserts(12) test-pref(layout.css.flexbox.enabled,true) load 799207-2.html
|
||||
test-pref(layout.css.flexbox.enabled,true) load 804089-1.xhtml
|
||||
load 810726.html
|
||||
|
|
|
@ -735,7 +735,10 @@ nsColumnSetFrame::ReflowChildren(nsHTMLReflowMetrics& aDesiredSize,
|
|||
}
|
||||
|
||||
if (columnCount >= aConfig.mBalanceColCount) {
|
||||
if (contentBottom >= aReflowState.availableHeight) {
|
||||
if (contentBottom > aReflowState.mComputedMaxHeight ||
|
||||
contentBottom > aReflowState.ComputedHeight()) {
|
||||
aColData.mShouldRevertToAuto = true;
|
||||
} else {
|
||||
// No more columns allowed here. Stop.
|
||||
aStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
|
||||
kidNextInFlow->AddStateBits(NS_FRAME_IS_DIRTY);
|
||||
|
@ -747,12 +750,6 @@ nsColumnSetFrame::ReflowChildren(nsHTMLReflowMetrics& aDesiredSize,
|
|||
}
|
||||
child = nullptr;
|
||||
break;
|
||||
} else if (contentBottom > aReflowState.mComputedMaxHeight ||
|
||||
contentBottom > aReflowState.ComputedHeight()) {
|
||||
aColData.mShouldRevertToAuto = true;
|
||||
} else {
|
||||
// The number of columns required is too high.
|
||||
allFit = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче