Closed Bug 1111944 Opened 10 years ago Closed 10 years ago

number of ordered list (<ol>) should support vertical writing mode layout

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: m_kato, Assigned: jfkthame)

References

(Blocks 1 open bug, )

Details

Attachments

(3 files, 1 obsolete file)

- Step Open the following data URL data:text/html,<div style="writing-mode: vertical-rl;"><ol><li>ABC</li></ol></div> - Result number of ordered list doesn't use vertical layout - Expected Result number of ordered list shoulder use vertical layout
Currently list item markers are drawn by nsLayoutUtils::DrawString, not gfxTextRun. We probably need to make DrawString vertical-capable (we will also want that at some point for page headers and footers), but see also bug 397294.
Yes, I was thinking about this recently too. The effect is more fun if you have item markers with varying lengths... :) data:text/html,<div style="writing-mode: vertical-rl;"><ol style="list-style-type:lower-roman"><li>ABC</li><li>ABC</li><li>ABC</li><li>ABC</li><li>ABC</li><li>ABC</li><li>ABC</li><li>ABC</li><li>ABC</li><li>ABC</li></ol></div>
(In reply to Simon Montagu :smontagu from comment #1) > Currently list item markers are drawn by nsLayoutUtils::DrawString, not > gfxTextRun. We probably need to make DrawString vertical-capable (we will > also want that at some point for page headers and footers), but see also bug > 397294. Using gfxTextRun directly can't work, because the marker may involve multiple bidi runs; so we still need to go through something like nsBidiPresUtils::ProcessText to resolve bidi and generate multiple runs if necessary. I think making nsLayoutUtils::DrawString handle vertical text is probably the right way forward here.
This seems to work so far, though I won't be surprised if something more is needed as we test this from the various call-sites.
Attachment #8539285 - Flags: review?(smontagu)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Attachment #8539291 - Flags: review?(smontagu)
Blocks: 1113684
Hmm, tryserver says the reftest fails on most platforms. :( Looks like this may be primarily due to bad line-spacing metrics of the fallback CJK font that's getting used. Need to look into that anyway for some other bugs, too...
Attachment #8539285 - Flags: review?(smontagu) → review+
Attachment #8539286 - Flags: review?(smontagu) → review+
Updated reftest slightly for better robustness. With the font metrics patches from bug 1090329, bug 1095334 and bug 1115916, this passes as expected. https://treeherder.mozilla.org/#/jobs?repo=try&revision=15dd7ce9867b
Attachment #8543174 - Flags: review?(smontagu)
Attachment #8539291 - Attachment is obsolete: true
Attachment #8539291 - Flags: review?(smontagu)
Attachment #8543174 - Flags: review?(smontagu) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: