Closed
Bug 1093553
Opened 10 years ago
Closed 10 years ago
improve handling of line-height metrics, block ascent, etc., in vertical writing mode
Categories
(Core :: Layout: Block and Inline, defect)
Core
Layout: Block and Inline
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: jfkthame, Assigned: jfkthame)
References
(Blocks 1 open bug)
Details
Attachments
(3 files, 1 obsolete file)
2.17 KB,
text/html
|
Details | |
49.30 KB,
patch
|
smontagu
:
review+
|
Details | Diff | Splinter Review |
1.50 KB,
patch
|
smontagu
:
review+
|
Details | Diff | Splinter Review |
We need to tidy up the handling of line-height metrics etc in vertical mode. Using the attached testcase: * the lines with Latin text are spaced much too widely in vertical mode with sideways-right or mixed orientation, while they're fine in vertical/upright; * the line with Chinese characters moves horizontally by a substantial distance when switching between upright and sideways display; * the different sizes of Latin characters are not properly baseline-aligned when displayed with sideways orientation. Fixing this will provide a better basis for addressing the vertical-align problems (e.g. <sub> and <sup> elements) in bug 1084370.
Assignee | ||
Comment 1•10 years ago
|
||
A couple of things to do here: we need to be more careful to distinguish when we have a vertical text run from when we're using vertical font metrics; and we need to deal with "inverted" lines (sideways-right text in vertical-lr mode) where the block-dir *ascent* will correspond to the text *descent*.
Assignee | ||
Comment 2•10 years ago
|
||
This makes things a lot better; it renames a bunch of 'vertical' flags to clarify whether they're referring to vertical runs or vertical metrics, and fixes ascent/descent issues. What remains after this patch is that with text-orientation:mixed, the different sizes of Latin text appear centered instead of baseline-aligned. (They're fine in sideways-right mode, where we know the run as a whole should have a dominant alphabetic baseline.)
Attachment #8516605 -
Flags: review?(smontagu)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•10 years ago
|
||
Oh, and here's the testcase I intended to attach from the start.
Assignee | ||
Comment 4•10 years ago
|
||
One more thing - with the improved handling of baseline and ascent/descent, we need to make a corresponding fix in nsCaret for the case of "inverted" lines.
Attachment #8516651 -
Flags: review?(smontagu)
Assignee | ||
Updated•10 years ago
|
Attachment #8516605 -
Attachment is obsolete: true
Attachment #8516605 -
Flags: review?(smontagu)
Assignee | ||
Comment 5•10 years ago
|
||
Oops, attached the wrong patch as the "followup". Here it is for real.
Attachment #8516652 -
Flags: review?(smontagu)
Comment 6•10 years ago
|
||
Comment on attachment 8516651 [details] [diff] [review] Improve handling of line-height metrics, block ascent, etc., in vertical writing mode Review of attachment 8516651 [details] [diff] [review]: ----------------------------------------------------------------- I think this is OK, though I'm not hugely familiar with all the code you're touching here. ::: layout/base/nsCSSRendering.cpp @@ +4165,5 @@ > NS_ERROR("Invalid style value!"); > return; > } > > // The y position should be set to the middle of the line. Make the comment here and in the next hunk talk about block direction instead of y
Attachment #8516651 -
Flags: review?(smontagu) → review+
Updated•10 years ago
|
Attachment #8516652 -
Flags: review?(smontagu) → review+
Assignee | ||
Comment 7•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9e5ac3d61831 https://hg.mozilla.org/integration/mozilla-inbound/rev/acb19a80d5f7
Target Milestone: --- → mozilla36
Comment 8•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9e5ac3d61831 https://hg.mozilla.org/mozilla-central/rev/acb19a80d5f7
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•