Migrate keyword types to predefined types
Categories
(Core :: CSS Parsing and Computation, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(67 external files)
The idea here is to allow a more general "not clone" path, and make ~everything use predefined_type.
| Assignee | ||
Comment 1•2 months ago
|
||
Add get_<longhand>() accessors returning a reference to the stored computed
value for every longhand whose Gecko storage is the computed value type, and
rename the by-value clone_<longhand>() accessors to slow_clone_<longhand>()
to discourage their use.
Longhands stored in per-layer / per-animation arrays (background-, mask-,
animation-, transition-, scroll-timeline-, view-timeline-), and the few
hand-converted ones (font-size, -x-lang, font-feature-settings,
font-variation-settings) keep only slow_clone_. Keyword longhands whose enum
is still defined by hand in nsStyleConsts.h also keep only slow_clone_ until
they are moved to Rust.
The <longhand>_equals() comparators for the array-backed longhands now
compare the arrays in place instead of cloning both sides, and
differing_properties() uses them.
Updated•2 months ago
|
| Assignee | ||
Comment 2•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 3•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 4•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 5•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 6•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 7•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 8•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 9•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 10•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 11•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 12•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 13•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 14•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 15•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 16•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 17•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 18•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 19•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 20•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 21•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 22•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 23•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 24•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 25•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 26•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 27•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 28•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 29•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 30•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 31•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 32•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 33•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 34•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 35•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 36•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 37•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 38•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 39•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 40•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 41•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 42•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 43•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 44•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 45•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 46•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 47•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 48•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 49•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 50•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
The presentation attribute mapping now goes through FromPrimitive like
the other keyword properties, since the value Gecko passes is the enum
itself.
| Assignee | ||
Comment 51•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
The presentation attribute mapping now goes through FromPrimitive like
the other keyword properties, since the value Gecko passes is the enum
itself.
| Assignee | ||
Comment 52•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in gfxFontConstants.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 53•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
The Rust type is called DirectionProperty to avoid clashing with the
existing Direction types in logical_geometry and selector_parser (like
WritingModeProperty), and is renamed back to StyleDirection for C++.
| Assignee | ||
Comment 54•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
The discriminants are kept as they were in C++ since they round-trip
through the LookAndFeel underline style integers. The Sentinel alias is
replaced by Wavy, which is what it was.
| Assignee | ||
Comment 55•2 months ago
|
||
Both properties share the StyleColorInterpolation enum in Gecko, so
define a single ColorInterpolation enum in Rust and export it through
cbindgen instead of keeping a hand-written copy in nsStyleConsts.h. The
Gecko style struct then stores the computed value type directly and the
style struct getters can hand out references.
| Assignee | ||
Comment 56•2 months ago
|
||
Define the enum in Rust and export it through cbindgen, and use it in
nsFont instead of a uint8_t holding NS_FONT_* constants, so the Gecko
style struct stores the computed value type directly and the style
struct getter can hand out a reference.
| Assignee | ||
Comment 57•2 months ago
|
||
Define the enum in Rust and export it through cbindgen, and use it in
nsFont instead of a uint8_t holding NS_FONT_* constants, so the Gecko
style struct stores the computed value type directly and the style
struct getter can hand out a reference.
| Assignee | ||
Comment 58•2 months ago
|
||
Define the enum in Rust and export it through cbindgen, and use it in
nsFont instead of a uint8_t holding NS_FONT_* constants, so the Gecko
style struct stores the computed value type directly and the style
struct getter can hand out a reference.
| Assignee | ||
Comment 59•2 months ago
|
||
Define the enum in Rust and export it through cbindgen, and use it in
nsFont instead of a uint8_t holding NS_FONT_* constants, so the Gecko
style struct stores the computed value type directly and the style
struct getter can hand out a reference.
gfxFontStyle::variantSubSuper becomes the enum too, so the constants go
away entirely.
| Assignee | ||
Comment 60•2 months ago
|
||
Define the enum in Rust and export it through cbindgen, and use it in
nsFont instead of a uint8_t holding NS_FONT_* constants, so the Gecko
style struct stores the computed value type directly and the style
struct getter can hand out a reference.
gfxFontStyle::variantCaps becomes the enum too, so the constants go
away entirely.
| Assignee | ||
Comment 61•2 months ago
|
||
Define the enum in Rust and export it through cbindgen instead of
keeping a hand-written copy in nsStyleConsts.h, so the Gecko style
struct stores the computed value type directly and the style struct
getter can hand out a reference.
| Assignee | ||
Comment 62•2 months ago
|
||
All the single-keyword longhands that Gecko stores now use the computed
value type, so impl_keyword and friends have no remaining users.
| Assignee | ||
Comment 63•2 months ago
|
||
Gecko already stores it as StyleBlend, which is now the Rust Blend enum
that mix-blend-mode uses, so share the type instead of converting through
an inexhaustive keyword match. This also makes background-blend-mode
accept plus-lighter, which the compositing spec allows and which
background-blend-mode-plus-lighter.html in WPT tests.
| Assignee | ||
Comment 64•2 months ago
|
||
Add a BackgroundOrigin enum shared by both properties (like
BackgroundClip), with background-origin rejecting the SVG boxes at parse
time, and store it in nsStyleImageLayers::Layer instead of the
StyleGeometryBox superset. ComputeBoxValueForOrigin maps it to the
geometry box the painting code uses, so the MarginBox assertion is moot.
| Assignee | ||
Comment 65•2 months ago
|
||
It's the last single-keyword longhand. It is internal to Servo, so reuse
the -moz-top-layer enum (none / auto) rather than adding a separate one;
Servo layout can adapt downstream.
| Assignee | ||
Comment 66•2 months ago
|
||
Every longhand now has a predefined type, so the Keyword class, the
keyword branch of the longhand template and the image layer keyword
conversions have no users left.
| Assignee | ||
Comment 67•2 months ago
|
||
Comment 68•2 months ago
|
||
Comment 69•2 months ago
|
||
Comment 70•2 months ago
|
||
Comment 71•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/571b98b1560d
https://hg.mozilla.org/mozilla-central/rev/b110fd0ca8b3
https://hg.mozilla.org/mozilla-central/rev/73094a601044
https://hg.mozilla.org/mozilla-central/rev/bf718ffb35be
https://hg.mozilla.org/mozilla-central/rev/e16e20e5d710
https://hg.mozilla.org/mozilla-central/rev/b1941216aae1
https://hg.mozilla.org/mozilla-central/rev/2afea7559bd6
https://hg.mozilla.org/mozilla-central/rev/a1b71d720703
https://hg.mozilla.org/mozilla-central/rev/59e97da72e59
https://hg.mozilla.org/mozilla-central/rev/0768b3e42098
https://hg.mozilla.org/mozilla-central/rev/c54bc2af86fe
https://hg.mozilla.org/mozilla-central/rev/8346d2e787dc
https://hg.mozilla.org/mozilla-central/rev/3759b3d3a803
https://hg.mozilla.org/mozilla-central/rev/03b3dc892101
https://hg.mozilla.org/mozilla-central/rev/47c1976ed002
https://hg.mozilla.org/mozilla-central/rev/38a19c592f6c
https://hg.mozilla.org/mozilla-central/rev/46aca8b0b0ad
https://hg.mozilla.org/mozilla-central/rev/563e28449490
https://hg.mozilla.org/mozilla-central/rev/ebf023dfa106
https://hg.mozilla.org/mozilla-central/rev/9ceeff36fdd5
https://hg.mozilla.org/mozilla-central/rev/1dc0dc4e7e7a
https://hg.mozilla.org/mozilla-central/rev/d197e9dad4c2
https://hg.mozilla.org/mozilla-central/rev/9e56d964b276
https://hg.mozilla.org/mozilla-central/rev/0013e8702516
https://hg.mozilla.org/mozilla-central/rev/477cfb99b669
https://hg.mozilla.org/mozilla-central/rev/d34fa008427d
https://hg.mozilla.org/mozilla-central/rev/8b58ac8ce5d8
https://hg.mozilla.org/mozilla-central/rev/a5b014642671
https://hg.mozilla.org/mozilla-central/rev/e32ea060cbcc
https://hg.mozilla.org/mozilla-central/rev/1b78254afb37
https://hg.mozilla.org/mozilla-central/rev/72f70569c367
https://hg.mozilla.org/mozilla-central/rev/b26401db57e0
https://hg.mozilla.org/mozilla-central/rev/2420e817f613
https://hg.mozilla.org/mozilla-central/rev/ea9c708f996e
https://hg.mozilla.org/mozilla-central/rev/4b80156d623b
https://hg.mozilla.org/mozilla-central/rev/cf3eca013353
https://hg.mozilla.org/mozilla-central/rev/119ecfdc6e80
https://hg.mozilla.org/mozilla-central/rev/e9a4f893e942
https://hg.mozilla.org/mozilla-central/rev/aee176585aed
https://hg.mozilla.org/mozilla-central/rev/bd91a238967d
https://hg.mozilla.org/mozilla-central/rev/8e01390a82b5
https://hg.mozilla.org/mozilla-central/rev/87fd5e2489fd
https://hg.mozilla.org/mozilla-central/rev/37bdc1f33397
https://hg.mozilla.org/mozilla-central/rev/b0e0205906d8
https://hg.mozilla.org/mozilla-central/rev/3cf64a44a690
https://hg.mozilla.org/mozilla-central/rev/dfb067945884
https://hg.mozilla.org/mozilla-central/rev/accb8704215e
https://hg.mozilla.org/mozilla-central/rev/027c9e802365
https://hg.mozilla.org/mozilla-central/rev/a2f186c02920
https://hg.mozilla.org/mozilla-central/rev/a249548f5043
https://hg.mozilla.org/mozilla-central/rev/79400f5dca1b
https://hg.mozilla.org/mozilla-central/rev/fd9b0b709ee9
https://hg.mozilla.org/mozilla-central/rev/06d860b67ba4
https://hg.mozilla.org/mozilla-central/rev/4746345bc651
https://hg.mozilla.org/mozilla-central/rev/9670a4074804
https://hg.mozilla.org/mozilla-central/rev/1ba43ba45746
https://hg.mozilla.org/mozilla-central/rev/196f372f8f44
https://hg.mozilla.org/mozilla-central/rev/07c88ea20675
https://hg.mozilla.org/mozilla-central/rev/67f8c20113e0
https://hg.mozilla.org/mozilla-central/rev/880cb43432a1
https://hg.mozilla.org/mozilla-central/rev/893e0c0d3952
https://hg.mozilla.org/mozilla-central/rev/43fba7824a6a
https://hg.mozilla.org/mozilla-central/rev/73a371a3a964
https://hg.mozilla.org/mozilla-central/rev/a9f6534c1ea0
https://hg.mozilla.org/mozilla-central/rev/b6a6998f0dd3
https://hg.mozilla.org/mozilla-central/rev/a4ca562cfa0c
https://hg.mozilla.org/mozilla-central/rev/65e4357c0d1f
https://hg.mozilla.org/mozilla-central/rev/4113afefc42d
https://hg.mozilla.org/mozilla-central/rev/e494e86e0d5d
https://hg.mozilla.org/mozilla-central/rev/e9b5fe0761a2
Updated•1 month ago
|
Description
•