зеркало из https://github.com/mozilla/pjs.git
Bug 412607: Fix wrapping issue by clearing trimmable width before trying CanPlaceFrame. r+sr=roc, a=blocking1.9
This commit is contained in:
Родитель
07191a6f2b
Коммит
6fe22be8e2
|
@ -990,6 +990,11 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
|
|||
// runs (hence return false here) except for text frames and inline containers.
|
||||
PRBool continuingTextRun = aFrame->CanContinueTextRun();
|
||||
|
||||
// Clear any residual mTrimmableWidth if this isn't a text frame
|
||||
if (!continuingTextRun && !pfd->GetFlag(PFD_SKIPWHENTRIMMINGWHITESPACE)) {
|
||||
mTrimmableWidth = 0;
|
||||
}
|
||||
|
||||
// See if we can place the frame. If we can't fit it, then we
|
||||
// return now.
|
||||
PRBool optionalBreakAfterFits;
|
||||
|
@ -1009,9 +1014,6 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
|
|||
}
|
||||
|
||||
if (!continuingTextRun) {
|
||||
if (!pfd->GetFlag(PFD_SKIPWHENTRIMMINGWHITESPACE)) {
|
||||
mTrimmableWidth = 0;
|
||||
}
|
||||
if (!psd->mNoWrap && (!CanPlaceFloatNow() || placedFloat)) {
|
||||
// record soft break opportunity after this content that can't be
|
||||
// part of a text run. This is not a text frame so we know
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
<html>
|
||||
<head>
|
||||
<style>
|
||||
div.wrapper {
|
||||
width: 80px;
|
||||
height: 30px;
|
||||
}
|
||||
div.a, div.b {
|
||||
height: 20px;
|
||||
display: inline-block;
|
||||
}
|
||||
div.a {
|
||||
width: 20px;
|
||||
background: blue;
|
||||
}
|
||||
div.b {
|
||||
width: 80px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div class="a"></div> <div class="b"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,27 @@
|
|||
<html>
|
||||
<head>
|
||||
<style>
|
||||
div.wrapper {
|
||||
width: 100px;
|
||||
height: 30px;
|
||||
}
|
||||
div.a, div.b {
|
||||
height: 20px;
|
||||
display: inline-block;
|
||||
}
|
||||
div.a {
|
||||
width: 20px;
|
||||
background: blue;
|
||||
}
|
||||
div.b {
|
||||
width: 80px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div class="a"></div> <div class="b"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,27 @@
|
|||
<html>
|
||||
<head>
|
||||
<style>
|
||||
div.wrapper {
|
||||
width: 101px;
|
||||
height: 30px;
|
||||
}
|
||||
div.a, div.b {
|
||||
height: 20px;
|
||||
display: inline-block;
|
||||
}
|
||||
div.a {
|
||||
width: 20px;
|
||||
background: blue;
|
||||
}
|
||||
div.b {
|
||||
width: 80px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div class="a"></div> <div class="b"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -681,6 +681,8 @@ random == 403134-1.html 403134-1-ref.html # bug 405377
|
|||
!= 409659-1c.html 409659-1-ref.html
|
||||
== 409659-1d.html 409659-1-ref.html
|
||||
# == 400813-1.html 400813-1-ref.html
|
||||
== 412607-1a.html 412607-1-ref.html
|
||||
== 412607-1b.html 412607-1-ref.html
|
||||
== 412679-1.html 412679-1-ref.html
|
||||
== 412679-2.html 412679-2-ref.html
|
||||
== 411334-1.xml 411334-1-ref.xml
|
||||
|
|
Загрузка…
Ссылка в новой задаче