Skip to content
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

Merged
merged 1 commit into from Aug 8, 2017

Conversation

emilio
Copy link
Member

@emilio emilio commented Aug 7, 2017

This change is Reviewable

@highfive
Copy link

highfive commented Aug 7, 2017

Heads up! This PR modifies the following files:

  • @bholley: components/style/gecko/generated/pseudo_element_definition.rs, components/style/gecko/generated/bindings.rs, components/style/selector_map.rs, components/style/gecko/selector_parser.rs, components/style/gecko/pseudo_element_definition.mako.rs and 2 more
  • @canaltinova: components/style/gecko/generated/pseudo_element_definition.rs, components/style/gecko/generated/bindings.rs, components/style/selector_map.rs, components/style/gecko/selector_parser.rs, components/style/gecko/pseudo_element_definition.mako.rs and 2 more

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 7, 2017
@emilio
Copy link
Member Author

emilio commented Aug 7, 2017

This is on top of #17992.

r? @heycam

(Needs the servo bits I'll finish off tomorrow, but mod that it should be ready to go).

@highfive highfive assigned heycam and unassigned jdm Aug 7, 2017
Copy link
Contributor

@heycam heycam left a 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(),
Copy link
Contributor

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(),
Copy link
Contributor

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...)

This avoids random HashMaps.

MozReview-Commit-ID: LQeZrLsoOnl
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
@emilio
Copy link
Member Author

emilio commented Aug 8, 2017

@bors-servo r=heycam

@bors-servo
Copy link
Contributor

📌 Commit faa8646 has been approved by heycam

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Aug 8, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit faa8646 with merge b6d4678...

bors-servo pushed a commit that referenced this pull request Aug 8, 2017
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 -->
@bors-servo
Copy link
Contributor

☀️ 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
Approved by: heycam
Pushing b6d4678 to master...

@bors-servo bors-servo merged commit faa8646 into servo:master Aug 8, 2017
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Aug 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants