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•4 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 #define
s' jobs?
Comment 2•4 years ago
|
||
Yeah, this one is a bit weird, because there are two "writing-mode" things:
- The
writing-mode
property (which is what these constants are about). - The
WritingMode
class +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•4 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•4 years ago
|
||
Ok, thx!
Assignee | ||
Comment 5•4 years ago
|
||
Updated•4 years ago
|
Pushed by dluca@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ee4a5d3b193f Convert writing-modes #defines to an enum class. r=emilio
Comment 7•4 years ago
|
||
bugherder |
Description
•