зеркало из https://github.com/mozilla/pjs.git
Bug 423385 - "floating parent does not size correctly with floating child using negative margin" [p=roc@ocallahan.org (Robert O'Callahan [roc]) r+sr=dbaron a1.9b5=beltzner]
This commit is contained in:
Родитель
95875bf531
Коммит
f6b33472d5
|
@ -2871,11 +2871,14 @@ nsIFrame::InlinePrefWidthData::ForceBreak(nsIRenderingContext *aRenderingContext
|
|||
|
||||
nscoord &floats_cur = floatDisp->mFloats == NS_STYLE_FLOAT_LEFT
|
||||
? floats_cur_left : floats_cur_right;
|
||||
floats_cur =
|
||||
NSCoordSaturatingAdd(floats_cur,
|
||||
nscoord floatWidth =
|
||||
nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
|
||||
floatFrame,
|
||||
nsLayoutUtils::PREF_WIDTH));
|
||||
nsLayoutUtils::PREF_WIDTH);
|
||||
// Negative-width floats don't change the available space so they
|
||||
// shouldn't change our intrinsic line width either.
|
||||
floats_cur =
|
||||
NSCoordSaturatingAdd(floats_cur, PR_MAX(0, floatWidth));
|
||||
}
|
||||
|
||||
nscoord floats_cur =
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body>
|
||||
<div style="float:left; background-color:yellow; height:100px; width:2px;"></div>
|
||||
<div style="float:left; background-color:purple; height:100px; width:150px;"></div>
|
||||
<div style="float:left; background-color:yellow; height:100px; width:10px;"></div>
|
||||
<div style="float:left; background-color:red; height:100px; width:272px;"></div>
|
||||
<div style="float:left; background-color:yellow; height:100px; width:4px;"></div>
|
||||
<div style="float:left; background-color:orange; height:100px; width:150px;"></div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body>
|
||||
<div style="float:left; background-color:yellow;
|
||||
height:100px; overflow:hidden;">
|
||||
<div style="float:left; width: 272px;background-color:red;
|
||||
height:100px;margin-left:162px;">
|
||||
</div>
|
||||
<div style="width:150px;margin-left:-432px;height:100px;float:left;background-color:purple;">
|
||||
</div>
|
||||
<div style="width:150px;margin-left:4px;float:left;background-color:orange;height:100px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -772,4 +772,5 @@ fails == 413027-3.html 413027-3-ref.html
|
|||
== 421419-1.html 421419-1-ref.html
|
||||
== 422394-1.html 422394-1-ref.html
|
||||
== 423130-1.html 423130-1-ref.html
|
||||
== 423385-1.html 423385-1-ref.html
|
||||
== 423599-1.html 423599-1-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче