New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
style: Use an enumerated array for per-pseudo maps. #17999
Conversation
Heads up! This PR modifies the following files:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@@ -240,7 +240,7 @@ impl Stylist { | |||
|
|||
cascade_data: CascadeData::new(), | |||
animations: Default::default(), | |||
precomputed_pseudo_element_decls: Default::default(), | |||
precomputed_pseudo_element_decls: PerPseudoElementMap::default(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just Default::default()
?
} | ||
|
||
impl PerOriginCascadeData { | ||
fn new() -> Self { | ||
Self { | ||
element_map: SelectorMap::new(), | ||
pseudos_map: Default::default(), | ||
pseudos_map: PerPseudoElementMap::default(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too? (Unless there's a reason it needed to change...)
dae8a16
to
9dbf2b6
Compare
This avoids random HashMaps. MozReview-Commit-ID: LQeZrLsoOnl Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
9dbf2b6
to
faa8646
Compare
@bors-servo r=heycam |
📌 Commit faa8646 has been approved by |
style: Use an enumerated array for per-pseudo maps. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17999) <!-- Reviewable:end -->
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
This change is