Closed Bug 1582224 Opened 1 year ago Closed 1 year ago

Split the SIDEWAYS bit in WritingMode

Categories

(Core :: Layout: Block and Inline, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

Details

Attachments

(1 file)

This bug is spun from the review in D45912 of bug 1102175. Currently, writing-mode:sideways-* and writing-mode:vertical-*; text-orientation:sideways; both set the same SIDEWAYS bit.

However, we need to distingish how the sideways bit is set on used value of WritingMode on nsIFrame. One use case is: when propagating <body>'s used writing-mode to <html>, <html>'s used writing-mode is different from its computed writing-mode, and we need to set block formatting context bits to <html>'s children if their writing-mode are different from <html>'s, per writing-mode spec..

If a box has a different writing-mode value than its parent box ... If the box is a block container, then it establishes an independent block formatting context.

That is, we need to differentiate vertical-rl from sideways-rl, and vertical-lr from sideways-lr on WritingMode. Some layout code tried hard to decipher the bits on the latter case, but there's no way for the former case.

Currently, there's no way to tell whether the SIDEWAYS bits is set from
writing-mode:sideways-* or writing-mode:vertical-*; text-orientation:sideways;. To be able to tell them apart, split SIDEWAYS bits
into VERTICAL_SIDEWAYS and TEXT_SIDEWAYS.

Also, provide convenience methods related to sideways writing-mode, and replace
obscure checks in the codebase.

Note that we don't have the use cases to distinguish vertical-rl from
sideways-rl in layout, but for the completeness, IsSidewaysLR() is still
defined.

Summary: Split the SIDEWAY bit in WritingMode → Split the SIDEWAYS bit in WritingMode
Attachment #9093656 - Attachment description: Bug 1582224 - Split SIDEWAY bit in WritingMode. → Bug 1582224 - Split SIDEWAYS bit in WritingMode.
Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/ca386b968a71
Split SIDEWAYS bit in WritingMode. r=jfkthame,emilio
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.