Closed
Bug 1415581
Opened 7 years ago
Closed 7 years ago
German hyphenation is wrong, single letter teared off
Categories
(Core :: Layout: Text and Fonts, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox56 | --- | wontfix |
firefox57 | --- | wontfix |
firefox58 | --- | fixed |
firefox59 | --- | fixed |
People
(Reporter: bugzilla, Assigned: chenpighead)
References
Details
(Keywords: regression)
Attachments
(3 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
Build ID: 20171024165158
Steps to reproduce:
1. Open https://www.heise.de/newsticker/meldung/US-Regierung-legt-Plan-fuer-verbindliche-Auto-zu-Auto-Kommunikation-auf-Eis-3877728.html
2. Scroll down to "lieber für breitbandiges mobiles Internet nutzen"
Actual results:
m-obiles
Expected results:
Correct hyphenation instead of random word-tearing would be nice. I've seen single teared-off consonants more often recently. Always in German text.
Updated•7 years ago
|
Component: Untriaged → Layout: Text
Product: Firefox → Core
Comment 1•7 years ago
|
||
Updated•7 years ago
|
Attachment #8926484 -
Attachment mime type: text/plain → text/html
Comment 2•7 years ago
|
||
In the above testcase, see hyphenation of "V-ehicle" at the end of the third-from-last line.
Comment 3•7 years ago
|
||
This regressed in March with the landing of bug 1056516.
A key feature of the testcase here is that there's an inline element within the paragraph (there are <a> links in the original webpage; I just used an <u> element in my testcase) that uses the *same* font as the rest of the text -- i.e. underlining or color change is fine, but it is *not* bold or italic -- so that it does not interrupt textrun generation.
Jeremy, could you look into this? I'd guess there's an offset that needs fixing up somewhere...
Updated•7 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
Updated•7 years ago
|
status-firefox56:
--- → affected
Assignee | ||
Comment 4•7 years ago
|
||
(In reply to Jonathan Kew (:jfkthame) from comment #3)
> This regressed in March with the landing of bug 1056516.
>
> A key feature of the testcase here is that there's an inline element within
> the paragraph (there are <a> links in the original webpage; I just used an
> <u> element in my testcase) that uses the *same* font as the rest of the
> text -- i.e. underlining or color change is fine, but it is *not* bold or
> italic -- so that it does not interrupt textrun generation.
>
> Jeremy, could you look into this? I'd guess there's an offset that needs
> fixing up somewhere...
Hmm... indeed, once we remove the inline tag (i.e., <u>), the bug is gone.
I'll investigate this next week.
Assignee: nobody → jeremychen
Flags: needinfo?(jeremychen)
Comment 5•7 years ago
|
||
Let's evaluate an uplift once we have a fix.
Updated•7 years ago
|
status-firefox-esr52:
--- → unaffected
Version: 56 Branch → 55 Branch
Assignee | ||
Comment 6•7 years ago
|
||
I know what happened here. If we put more than one inline tags in a paragraph, they will still belongs to the same gfxTextRun, but might have more than one nsTextFragment, which is not taken into consideration while computing hyphenation data in [1]. For example:
<p>test test <u>underline</u> test</p>
This will create 3 nsTextFragments, one for the texts before <u> element, one for <u> element, and one for the texts after <u> element.
The current implementation only considers one nsTextFragment per gfxTextRun.
[] https://searchfox.org/mozilla-central/rev/a662f122c37704456457a526af90db4e3c0fd10e/layout/generic/nsTextFrame.cpp#3682-3683
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 12•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Attachment #8928957 -
Flags: review?(jfkthame)
Attachment #8928936 -
Flags: review?(jfkthame)
Comment 13•7 years ago
|
||
mozreview-review |
Comment on attachment 8928936 [details]
Bug 1415581 - get the correct positions of explicit hyphens while calling PropertyProvider::GetHyphenationBreaks.
https://reviewboard.mozilla.org/r/200282/#review205986
Attachment #8928936 -
Flags: review?(jfkthame) → review+
Comment 14•7 years ago
|
||
mozreview-review |
Comment on attachment 8928957 [details]
Bug 1415581 - add reftest.
https://reviewboard.mozilla.org/r/200298/#review205988
Attachment #8928957 -
Flags: review?(jfkthame) → review+
Assignee | ||
Updated•7 years ago
|
Status: NEW → ASSIGNED
Comment 15•7 years ago
|
||
Pushed by jichen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8d16bdf7d0fc
add reftest. r=jfkthame
https://hg.mozilla.org/integration/autoland/rev/ef9858e9ad38
get the correct positions of explicit hyphens while calling PropertyProvider::GetHyphenationBreaks. r=jfkthame
Comment 16•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8d16bdf7d0fc
https://hg.mozilla.org/mozilla-central/rev/ef9858e9ad38
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Assignee | ||
Comment 17•7 years ago
|
||
(In reply to Jet Villegas (:jet) from comment #5)
> Let's evaluate an uplift once we have a fix.
The random line breaks are pretty annoying, and this issue is more easily presented in long paragraph articles (e.g., News, Blogs, ... etc.), which is making it even worse. It would be better that our users could get this fix sooner.
Assignee | ||
Comment 18•7 years ago
|
||
Comment on attachment 8928936 [details]
Bug 1415581 - get the correct positions of explicit hyphens while calling PropertyProvider::GetHyphenationBreaks.
Approval Request Comment
[Feature/Bug causing the regression]: CSS hyphens property
[User impact if declined]: texts with long paragraph may have some random/unexpected hyphen breaks
[Is this code covered by automated tests?]: yes, a reftest is added in the patchset
[Has the fix been verified in Nightly?]: yes
[Needs manual test from QE? If yes, steps to reproduce]: no
[List of other uplifts needed for the feature/fix]: no
[Is the change risky?]: Not that I’m aware of
[Why is the change risky/not risky?]: the change is to correct a index calculation, only the rendering of the line breaks is affected, so the risk should be low.
[String changes made/needed]:
Attachment #8928936 -
Flags: approval-mozilla-beta?
Comment 19•7 years ago
|
||
Comment on attachment 8928936 [details]
Bug 1415581 - get the correct positions of explicit hyphens while calling PropertyProvider::GetHyphenationBreaks.
Fix an annoying random line breaks issue. Beta58+.
Attachment #8928936 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 20•7 years ago
|
||
bugherder uplift |
Comment 21•7 years ago
|
||
(In reply to Jeremy Chen [:jeremychen] UTC+8 from comment #18)
> [Is this code covered by automated tests?]: yes, a reftest is added in the
> patchset
> [Needs manual test from QE? If yes, steps to reproduce]: no
Since this change has automated coverage and based on Jeremy's assessment on manual testing needs, marking this as qe-verify-.
Flags: qe-verify-
You need to log in
before you can comment on or make changes to this bug.
Description
•