зеркало из https://github.com/mozilla/gecko-dev.git
Bug 478834 - Record that we need to look for clearance if we encounter a block that might need to be pushed down for intersecting floats (i.e., one that establishes a BFC). r=roc
Without this change, nsBlockFrame::ReflowBlockFrame will fail to have mayNeedRetry true, which means that it won't set blockHTMLRS.mDiscoveredClearance, which means that on a descendant replaced block we will fail to fall into any of the cases that call ClearFloats. This change will cause us to hit the first ClearFloats call and discover the need for clearance. I tested locally that the new reftest fails without the patch and passes with the patch.
This commit is contained in:
Родитель
bbc8170ee0
Коммит
dc94df9c46
|
@ -164,7 +164,8 @@ nsBlockReflowContext::ComputeCollapsedBStartMargin(const nsHTMLReflowState& aRS,
|
|||
availSpace);
|
||||
// Record that we're being optimistic by assuming the kid
|
||||
// has no clearance
|
||||
if (kid->StyleDisplay()->mBreakType != NS_STYLE_CLEAR_NONE) {
|
||||
if (kid->StyleDisplay()->mBreakType != NS_STYLE_CLEAR_NONE ||
|
||||
!nsBlockFrame::BlockCanIntersectFloats(kid)) {
|
||||
*aMayNeedRetry = true;
|
||||
}
|
||||
if (ComputeCollapsedBStartMargin(innerReflowState, aMargin,
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 478834 Testcase</title>
|
||||
<style>
|
||||
html { overflow: hidden }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="background:teal; width: 500px">
|
||||
<div style="background:yellow; width: 100px; height: 50px;"></div>
|
||||
<div style="margin-right: 150px">
|
||||
<table width="100%" style="background: fuchsia">
|
||||
<tr><td>
|
||||
x x x x x x x x x x x x x x x x x x x x x x
|
||||
x x x x x x x x x x x x x x x x x x x x x x
|
||||
x x x x x x x x x x x x x x x x x x x x x x
|
||||
x x x x x x x x x x x x x x x x x x x x x x
|
||||
x x x x x x x x x x x x x x x x x x x x x x
|
||||
x x x x x x x x x x x x x x x x x x x x x x
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 478834 Testcase</title>
|
||||
<style>
|
||||
html { overflow: hidden }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="background:teal; width: 500px">
|
||||
<div style="background:yellow; float:left; width: 100px; height: 50px;"></div>
|
||||
<div style="margin-right: 150px">
|
||||
<table width="100%" style="background: fuchsia">
|
||||
<tr><td>
|
||||
x x x x x x x x x x x x x x x x x x x x x x
|
||||
x x x x x x x x x x x x x x x x x x x x x x
|
||||
x x x x x x x x x x x x x x x x x x x x x x
|
||||
x x x x x x x x x x x x x x x x x x x x x x
|
||||
x x x x x x x x x x x x x x x x x x x x x x
|
||||
x x x x x x x x x x x x x x x x x x x x x x
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -16,6 +16,7 @@ fails == 345369-2.html 345369-2-ref.html
|
|||
== 345369-4.html 345369-4-ref.html
|
||||
== 345369-5.html 345369-5-ref.html
|
||||
== 429974-1.html 429974-1-ref.html
|
||||
== 478834-1.html 478834-1-ref.html
|
||||
== 546048-1.html 546048-1-ref.html
|
||||
== 775350-1.html 775350-1-ref.html
|
||||
== 1114329.html 1114329-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче