Closed
Bug 1140264
Opened 11 years ago
Closed 11 years ago
Line is incorrectly broken between ruby and previous open bracket
Categories
(Core :: Layout: Text and Fonts, defect)
Core
Layout: Text and Fonts
Tracking
()
RESOLVED
FIXED
mozilla39
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: xidorn, Assigned: xidorn)
References
(Blocks 1 open bug)
Details
Attachments
(6 files, 1 obsolete file)
394 bytes,
text/html
|
Details | |
9.31 KB,
image/png
|
Details | |
5.12 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
5.33 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
2.42 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
18.86 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
I see this bug in tweet [1]. This bug seems to happen in some condition.
[1] https://twitter.com/Takenspc/status/573652668582776832
Assignee | ||
Comment 1•11 years ago
|
||
This is a testcase simplified from that page. This bug can be reproduced when the window is resized to a certain width.
Assignee | ||
Comment 2•11 years ago
|
||
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8574462 -
Flags: review?(dbaron)
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #8574463 -
Flags: review?(dbaron)
Assignee | ||
Comment 5•11 years ago
|
||
The patch 2 actually fixes this bug, but causes regression when ruby is the the first element in a line. This patch fixes this problem by making rbc not inline descendant of ruby, which allows line layout to record NeedsBackup for <rb>s in CanPlaceFrame instead of skip them because of NoWrap.
Assignee | ||
Comment 6•11 years ago
|
||
Attachment #8574465 -
Flags: review?(dbaron)
Assignee | ||
Updated•11 years ago
|
Attachment #8574464 -
Flags: review?(dbaron)
Attachment #8574462 -
Flags: review?(dbaron) → review+
Attachment #8574463 -
Flags: review?(dbaron) → review+
Comment on attachment 8574464 [details] [diff] [review]
patch 3 - exclude rbc from inline descendant of ruby
Maybe the flag should be renamed to IsNonbreakableDescendantOfRuby / IS_NONBREAKABLE_DESCENDANT_OF_RUBY or similar, since its meaning is now more subtle?
r=dbaron with that or similar
Attachment #8574464 -
Flags: review?(dbaron) → review+
Comment on attachment 8574465 [details] [diff] [review]
patch 4 - reftest
If this test relies on particular font size ratios between the ruby bases and ruby annotations, I think it should specify font sizes explicitly.
r=dbaron with that
Attachment #8574465 -
Flags: review?(dbaron) → review+
Assignee | ||
Comment 9•11 years ago
|
||
(In reply to David Baron [:dbaron] (UTC-8) from comment #8)
> Comment on attachment 8574465 [details] [diff] [review]
> patch 4 - reftest
>
> If this test relies on particular font size ratios between the ruby bases
> and ruby annotations, I think it should specify font sizes explicitly.
I don't think it relies on that, because I use the unit rem in the annotation.
Ah, right. It does rely on the font providing a square glyph for 咲. I'm not sure how likely that is to break...
Assignee | ||
Comment 11•11 years ago
|
||
Is there any test font which guarantees to generate a square for any cjk ideographic character? It seems Ahem doesn't include those characters.
Assignee | ||
Comment 12•11 years ago
|
||
Attachment #8574464 -
Attachment is obsolete: true
Attachment #8575038 -
Flags: review?(dbaron)
Assignee | ||
Comment 13•11 years ago
|
||
Comment hidden (obsolete) |
Comment 15•11 years ago
|
||
(In reply to Xidorn Quan [:xidorn] (UTC+11) from comment #11)
> Is there any test font which guarantees to generate a square for any cjk
> ideographic character? It seems Ahem doesn't include those characters.
http://blogs.adobe.com/CCJKType/2013/05/css-orientation-test-opentype-fonts.html sounds like what you're looking for (I haven't yet tried to use it myself).
Comment on attachment 8575038 [details] [diff] [review]
patch 3 - rename the style context bit and exclude rbc/rtc from it
>Bug 1140264 part 3 - Rename IsInlineDescendantOfRuby to ShouldSUppressLineBreak and exclude rbc/rtc from it.
"SUppress" -> "Suppress"
>+ // the level containers themselvs are breakable. We have to check
themselvs -> themselves
>+ // because any of the ruby box could be anonymous.
box -> boxes
r=dbaron with that
Attachment #8575038 -
Flags: review?(dbaron) → review+
Assignee | ||
Comment 17•11 years ago
|
||
(In reply to Simon Montagu :smontagu from comment #15)
> (In reply to Xidorn Quan [:xidorn] (UTC+11) from comment #11)
> > Is there any test font which guarantees to generate a square for any cjk
> > ideographic character? It seems Ahem doesn't include those characters.
>
> http://blogs.adobe.com/CCJKType/2013/05/css-orientation-test-opentype-fonts.
> html sounds like what you're looking for (I haven't yet tried to use it
> myself).
Thanks. I guess I can just use a latin character here with Ahem font, since the line breaking behavior here should be identical for latin character and ideographic character.
Assignee | ||
Comment 18•11 years ago
|
||
Comment 19•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6ee3e7424d3a
https://hg.mozilla.org/mozilla-central/rev/a71446331ce6
https://hg.mozilla.org/mozilla-central/rev/f672b2cd7a4f
https://hg.mozilla.org/mozilla-central/rev/144ea3057b66
Status: NEW → RESOLVED
Closed: 11 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in
before you can comment on or make changes to this bug.
Description
•