Closed Bug 1355005 Opened 4 years ago Closed 4 years ago

stylo: Support -moz-box-orient: {block,inline}-axis

Categories

(Core :: CSS Parsing and Computation, enhancement, P1)

53 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: xidorn, Assigned: kuoe0.tw)

References

Details

Attachments

(1 file, 1 obsolete file)

Currently only horizontal and vertical are implemented, however it should also support {block,inline}-axis (and actually inline-axis is the initial value).

Related file is https://github.com/servo/servo/blob/master/components/style/properties/longhand/xul.mako.rs
Assignee: nobody → kuoe0
In layout/style/nsCSSProps.cpp, we only have StyleBoxOrient::Horizontal and StyleBoxOrient::Vertical. Gecko maps inline-axis to Horizontal and block-axis to Vertical.
```
{ eCSSKeyword_horizontal, StyleBoxOrient::Horizontal },
{ eCSSKeyword_vertical, StyleBoxOrient::Vertical },
{ eCSSKeyword_inline_axis, StyleBoxOrient::Horizontal },
{ eCSSKeyword_block_axis, StyleBoxOrient::Vertical },
```

Is there similar way to map two keywords to the same value in servo?
Flags: needinfo?(xidorn+moz)
You probably would not be able to use the single_keyword helper, and have to expand it to helpers::longhand. You may just use define_css_keyword_enum macro twice for ComputedValue and SpecifiedValue separately.
Flags: needinfo?(xidorn+moz)
Priority: -- → P1
Blocks: 1356087
Status: NEW → ASSIGNED
Attachment #8859437 - Flags: review?(cam)
Attachment #8859438 - Flags: review?(cam)
heycam, you can review the patches now! I already updated with `extra_gecko_alias`.

try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=1121f2f16a5724e11d2fc6afa22a4eeeddc9545d
Flags: needinfo?(cam)
Comment on attachment 8859437 [details]
Bug 1355005 - Add `inline-axis` and `block-axis` aliases for `-moz-box-orient`.

https://reviewboard.mozilla.org/r/131474/#review134362

Nice, saves a lot of code!
Attachment #8859437 - Flags: review?(cam) → review+
Comment on attachment 8859438 [details]
Bug 1355005 - Remove the failures mark of `box-orient` in stylo-failures.md.

https://reviewboard.mozilla.org/r/131476/#review134364
Attachment #8859438 - Flags: review?(cam) → review+
Flags: needinfo?(cam)
Attachment #8859437 - Attachment is obsolete: true
Keywords: checkin-needed
Pushed by tlin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/488534f69bf5
Remove the failures mark of `box-orient` in stylo-failures.md. r=heycam
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/488534f69bf5
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.