зеркало из https://github.com/mozilla/gecko-dev.git
Bug 957128 - Report hyphen breaks also for word-wrap:break-word (to display soft-hyphens). r=smontagu
This commit is contained in:
Родитель
caedc4da28
Коммит
945c0cc094
|
@ -6400,7 +6400,7 @@ gfxTextRun::BreakAndMeasureText(uint32_t aStart, uint32_t aMaxLength,
|
|||
|
||||
if (lineBreakHere || hyphenation || wordWrapping) {
|
||||
gfxFloat hyphenatedAdvance = advance;
|
||||
if (!lineBreakHere && !wordWrapping) {
|
||||
if (!lineBreakHere && hyphenation) {
|
||||
hyphenatedAdvance += aProvider->GetHyphenWidth();
|
||||
}
|
||||
|
||||
|
@ -6409,7 +6409,7 @@ gfxTextRun::BreakAndMeasureText(uint32_t aStart, uint32_t aMaxLength,
|
|||
lastBreak = i;
|
||||
lastBreakTrimmableChars = trimmableChars;
|
||||
lastBreakTrimmableAdvance = trimmableAdvance;
|
||||
lastBreakUsedHyphenation = !lineBreakHere && !wordWrapping;
|
||||
lastBreakUsedHyphenation = !lineBreakHere && hyphenation;
|
||||
*aBreakPriority = hyphenation || lineBreakHere ?
|
||||
gfxBreakPriority::eNormalBreak : gfxBreakPriority::eWordWrapBreak;
|
||||
}
|
||||
|
|
|
@ -33,6 +33,9 @@ fuzzy-if(Android,255,42) == pre-line-1.html pre-line-1-ref.html
|
|||
== soft-hyphens-1a.html soft-hyphens-1-ref.html
|
||||
== soft-hyphens-1b.html soft-hyphens-1-ref.html
|
||||
== soft-hyphens-1c.html soft-hyphens-1-ref.html
|
||||
== soft-hyphens-break-word-1a.html soft-hyphens-break-word-1-ref.html
|
||||
== soft-hyphens-break-word-1b.html soft-hyphens-break-word-1-ref.html
|
||||
== soft-hyphens-break-word-1c.html soft-hyphens-break-word-1-ref.html
|
||||
# Tests for soft hyphens in table cells, bug 418975
|
||||
!= soft-hyphen-in-table-1.html soft-hyphen-in-table-1-notref.html
|
||||
== soft-hyphen-in-table-1.html soft-hyphen-in-table-1-ref.html
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<html>
|
||||
<body>
|
||||
|
||||
<div>
|
||||
<p>H<br>y-<br>p<br>h<br>e<br>n<br>.
|
||||
<p>H<br>y-<br>p<br>h<br>e<br>n<br>.
|
||||
<p>H<br>y-<br>p<br>h<br>e<br>n<br>.
|
||||
<p>H<br>y-<br>p<br>h<br>e<br>n<br>.
|
||||
<p>H<br>y-<br>p<br>h<br>e<br>n<br>.
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<html>
|
||||
<body>
|
||||
|
||||
<div style="width:0; word-wrap:break-word;">
|
||||
<p>Hy­phen.
|
||||
<p><span>H</span>y­phen.
|
||||
<p><span>Hy</span>­phen.
|
||||
<p><span>Hy­</span>phen.
|
||||
<p><span>Hy­p</span>hen.
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<html>
|
||||
<body>
|
||||
|
||||
<div style="width:0; word-wrap:break-word;">
|
||||
<p>Hy­­phen.
|
||||
<p><span>Hy</span>­­phen.
|
||||
<p><span>Hy­</span>­phen.
|
||||
<p><span>Hy­­</span>phen.
|
||||
<p><span>Hy­­p</span>hen.
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<html>
|
||||
<body>
|
||||
|
||||
<div style="width:0; word-wrap:break-word;">
|
||||
<p><span>H</span><span>y­phen</span>.
|
||||
<p><span>Hy</span><span>­phen</span>.
|
||||
<p><span>Hy</span>­<span>phen</span>.
|
||||
<p><span>Hy­</span><span>phen</span>.
|
||||
<p><span>Hy­p</span><span>hen</span>.
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче