Convert writing-modes #defines to an enum class.
Categories
(Core :: CSS Parsing and Computation, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox80 | --- | fixed |
People
(Reporter: zech.ph, Assigned: zech.ph)
Details
Attachments
(1 file)
| Assignee | ||
Comment 1•6 years ago
|
||
I started converting the existing NS_STYLE_WRITING_MODE_* defines to an enum calling it StyleWritingMode but upon compilation realized that there already exists a struct in the same namespace (mozilla) with the same name in ServoStyleConsts.h. Are they somehow related? Is this enum even necessary, or shall the struct in general take over the former #defines' jobs?
Comment 2•6 years ago
|
||
Yeah, this one is a bit weird, because there are two "writing-mode" things:
- The
writing-modeproperty (which is what these constants are about). - The
WritingModeclass +StyleWritingMode, which is really a bitfield with various information computed fromwriting-mode,direction,text-orientation... As these affect each other.
So I think the right thing to do here is calling the new enum StyleWritingModeProperty or something like this, so that it properly differentiates from one from the other.
Comment 3•6 years ago
|
||
Alternatively we could rename StyleWritingMode / WritingMode, but those are much more widely used, and it's not clear what the right name for that would be otherwise, so it seems better / more straight-forward to rename the (not-yet-existing) enum :)
| Assignee | ||
Comment 4•6 years ago
|
||
Ok, thx!
| Assignee | ||
Comment 5•6 years ago
|
||
Updated•6 years ago
|
Comment 7•6 years ago
|
||
| bugherder | ||
Description
•