mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 440149. Don't break after empty text at the start of the line, even if we're past the available width. r=smontagu
This commit is contained in:
parent
0a88efce86
commit
ec55ad45cf
@ -6041,7 +6041,9 @@ nsTextFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
eNormalBreak);
|
eNormalBreak);
|
||||||
}
|
}
|
||||||
PRBool breakAfter = forceBreakAfter;
|
PRBool breakAfter = forceBreakAfter;
|
||||||
if (!breakAfter && charsFit == length &&
|
// length == 0 means either the text is empty or it's all collapsed away
|
||||||
|
PRBool emptyTextAtStartOfLine = atStartOfLine && length == 0;
|
||||||
|
if (!breakAfter && charsFit == length && !emptyTextAtStartOfLine &&
|
||||||
transformedOffset + transformedLength == mTextRun->GetLength() &&
|
transformedOffset + transformedLength == mTextRun->GetLength() &&
|
||||||
(mTextRun->GetFlags() & nsTextFrameUtils::TEXT_HAS_TRAILING_BREAK)) {
|
(mTextRun->GetFlags() & nsTextFrameUtils::TEXT_HAS_TRAILING_BREAK)) {
|
||||||
// We placed all the text in the textrun and we have a break opportunity at
|
// We placed all the text in the textrun and we have a break opportunity at
|
||||||
|
13
layout/reftests/bugs/440149-1-ref.html
Normal file
13
layout/reftests/bugs/440149-1-ref.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<head><style>
|
||||||
|
div {
|
||||||
|
width: 0px;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
border: 5px solid orange;
|
||||||
|
margin-left: 50px;
|
||||||
|
}
|
||||||
|
</style></head>
|
||||||
|
<body><div><span><input></span></div></body>
|
||||||
|
</html>
|
13
layout/reftests/bugs/440149-1.html
Normal file
13
layout/reftests/bugs/440149-1.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<head><style>
|
||||||
|
div {
|
||||||
|
width: 0px;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
border: 5px solid orange;
|
||||||
|
margin-left: 50px;
|
||||||
|
}
|
||||||
|
</style></head>
|
||||||
|
<body><div><span><!--whitespace--> <input></span></div></body>
|
||||||
|
</html>
|
@ -929,6 +929,7 @@ random == 429849-1.html 429849-1-ref.html # bug 432288
|
|||||||
== 439004-1.html 439004-1-ref.html
|
== 439004-1.html 439004-1-ref.html
|
||||||
== 439639-1.html 439639-1-ref.html
|
== 439639-1.html 439639-1-ref.html
|
||||||
== 439910.html 439910-ref.html
|
== 439910.html 439910-ref.html
|
||||||
|
== 440149-1.html 440149-1-ref.html
|
||||||
== 441259-1.html 441259-1-ref.html
|
== 441259-1.html 441259-1-ref.html
|
||||||
fails == 441259-2.html 441259-2-ref.html # bug 441400
|
fails == 441259-2.html 441259-2-ref.html # bug 441400
|
||||||
== 442542-1.html 442542-1-ref.html
|
== 442542-1.html 442542-1-ref.html
|
||||||
|
Loading…
Reference in New Issue
Block a user