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

Move selector matching to an external library, for use outside Servo. #5010

Merged
merged 1 commit into from Feb 23, 2015

Conversation

SimonSapin
Copy link
Member

The new library is https://github.com/servo/rust-selectors. It’s not quite ready for other users (the API needs work), but this is a first step.

servo/rust-selectors#2 should also be reviewed.

Fixes #3669.

@Manishearth Manishearth reopened this Feb 21, 2015
@jdm jdm added the S-awaiting-review There is new code that needs to be reviewed. label Feb 21, 2015
@Ms2ger Ms2ger closed this Feb 22, 2015
@Ms2ger Ms2ger reopened this Feb 22, 2015
@hoppipolla-critic-bot
Copy link

Critic review: https://critic.hoppipolla.co.uk/r/4053

This is an external review system which you may optionally use for the code review of your pull request.

In order to help critic track your changes, please do not make in-place history rewrites (e.g. via git rebase -i or git commit --amend) when updating this pull request.

@SimonSapin
Copy link
Member Author

To reviewers: this is mostly moving things around and fixing up use statements to make it build, all very mechanical.

The only significant change is that DeclarationBlock is now generic and has a type parameter for what was Vec<PropertyDeclaration> (since PropertyDeclaration stays in libstyle). A future refactoring of rust-selectors will rename things to have this called "payload" rather than "declarations".

bors-servo pushed a commit that referenced this pull request Feb 23, 2015
The new library is https://github.com/servo/rust-selectors. It’s not quite ready for other users (the API needs work), but this is a first step.

servo/rust-selectors#2 should also be reviewed.

Fixes #3669.
@jdm
Copy link
Member

jdm commented Feb 23, 2015

Compiling style v0.0.1 (file:///home/servo/buildbot/slave/linux1/build/components/servo)
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:352:54: 352:70 error: `CompoundSelector` does not name a structure
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:352                         compound_selectors: Arc::new(CompoundSelector {
                                                                                                                                 ^~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:350:28: 370:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:354:33: 354:58 error: failed to resolve. Use of undeclared type or module `SimpleSelector`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:354                                 SimpleSelector::Namespace(ns!(HTML)),
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:353:47: 364:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:350:28: 370:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:354:33: 354:58 error: unresolved name `SimpleSelector::Namespace`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:354                                 SimpleSelector::Namespace(ns!(HTML)),
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:353:47: 364:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:350:28: 370:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:355:59: 355:68 error: `LocalName` does not name a structure
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:355                                 SimpleSelector::LocalName(LocalName {
                                                                                                                                      ^~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:353:47: 364:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:350:28: 370:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:355:33: 355:58 error: failed to resolve. Use of undeclared type or module `SimpleSelector`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:355                                 SimpleSelector::LocalName(LocalName {
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:353:47: 364:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:350:28: 370:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:355:33: 355:58 error: unresolved name `SimpleSelector::LocalName`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:355                                 SimpleSelector::LocalName(LocalName {
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:353:47: 364:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:350:28: 370:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:359:59: 359:71 error: `AttrSelector` does not name a structure
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:359                                 SimpleSelector::AttrEqual(AttrSelector {
                                                                                                                                      ^~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:353:47: 364:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:350:28: 370:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:362:48: 362:77 error: failed to resolve. Use of undeclared type or module `NamespaceConstraint`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:362                                     namespace: NamespaceConstraint::Specific(ns!("")),
                                                                                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:353:47: 364:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:350:28: 370:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:362:48: 362:77 error: unresolved name `NamespaceConstraint::Specific`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:362                                     namespace: NamespaceConstraint::Specific(ns!("")),
                                                                                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:353:47: 364:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:350:28: 370:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:363:57: 363:89 error: failed to resolve. Use of undeclared type or module `CaseSensitivity`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:363                                 }, "hidden".to_owned(), CaseSensitivity::CaseInsensitive)
                                                                                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:353:47: 364:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:350:28: 370:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:363:57: 363:89 error: unresolved name `CaseSensitivity::CaseInsensitive`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:363                                 }, "hidden".to_owned(), CaseSensitivity::CaseInsensitive)
                                                                                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:353:47: 364:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:350:28: 370:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:359:33: 359:58 error: failed to resolve. Use of undeclared type or module `SimpleSelector`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:359                                 SimpleSelector::AttrEqual(AttrSelector {
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:353:47: 364:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:350:28: 370:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:359:33: 359:58 error: unresolved name `SimpleSelector::AttrEqual`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:359                                 SimpleSelector::AttrEqual(AttrSelector {
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:353:47: 364:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:350:28: 370:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:382:54: 382:70 error: `CompoundSelector` does not name a structure
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:382                         compound_selectors: Arc::new(CompoundSelector {
                                                                                                                                 ^~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:380:28: 409:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:384:33: 384:58 error: failed to resolve. Use of undeclared type or module `SimpleSelector`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:384                                 SimpleSelector::Namespace(ns!(HTML)),
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:383:47: 389:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:380:28: 409:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:384:33: 384:58 error: unresolved name `SimpleSelector::Namespace`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:384                                 SimpleSelector::Namespace(ns!(HTML)),
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:383:47: 389:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:380:28: 409:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:385:59: 385:68 error: `LocalName` does not name a structure
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:385                                 SimpleSelector::LocalName(LocalName {
                                                                                                                                      ^~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:383:47: 389:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:380:28: 409:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:385:33: 385:58 error: failed to resolve. Use of undeclared type or module `SimpleSelector`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:385                                 SimpleSelector::LocalName(LocalName {
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:383:47: 389:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:380:28: 409:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:385:33: 385:58 error: unresolved name `SimpleSelector::LocalName`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:385                                 SimpleSelector::LocalName(LocalName {
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:383:47: 389:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:380:28: 409:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:396:54: 396:70 error: `CompoundSelector` does not name a structure
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:396                         compound_selectors: Arc::new(CompoundSelector {
                                                                                                                                 ^~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:380:28: 409:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:398:33: 398:58 error: failed to resolve. Use of undeclared type or module `SimpleSelector`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:398                                 SimpleSelector::Namespace(ns!(HTML)),
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:397:47: 403:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:380:28: 409:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:398:33: 398:58 error: unresolved name `SimpleSelector::Namespace`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:398                                 SimpleSelector::Namespace(ns!(HTML)),
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:397:47: 403:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:380:28: 409:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:399:59: 399:68 error: `LocalName` does not name a structure
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:399                                 SimpleSelector::LocalName(LocalName {
                                                                                                                                      ^~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:397:47: 403:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:380:28: 409:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:399:33: 399:58 error: failed to resolve. Use of undeclared type or module `SimpleSelector`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:399                                 SimpleSelector::LocalName(LocalName {
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:397:47: 403:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:380:28: 409:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:399:33: 399:58 error: unresolved name `SimpleSelector::LocalName`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:399                                 SimpleSelector::LocalName(LocalName {
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:397:47: 403:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:380:28: 409:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:421:54: 421:70 error: `CompoundSelector` does not name a structure
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:421                         compound_selectors: Arc::new(CompoundSelector {
                                                                                                                                 ^~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:419:28: 435:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:423:33: 423:54 error: failed to resolve. Use of undeclared type or module `SimpleSelector`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:423                                 SimpleSelector::Class(Atom::from_slice("ok")),
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:422:47: 424:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:419:28: 435:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:423:33: 423:54 error: unresolved name `SimpleSelector::Class`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:423                                 SimpleSelector::Class(Atom::from_slice("ok")),
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:422:47: 424:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:419:28: 435:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:425:45: 425:61 error: `CompoundSelector` does not name a structure
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:425                             next: Some((box CompoundSelector {
                                                                                                                        ^~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:419:28: 435:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:427:37: 427:55 error: failed to resolve. Use of undeclared type or module `SimpleSelector`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:427                                     SimpleSelector::ID(Atom::from_slice("d1")),
                                                                                                                ^~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:426:51: 428:35 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:419:28: 435:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:427:37: 427:55 error: unresolved name `SimpleSelector::ID`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:427                                     SimpleSelector::ID(Atom::from_slice("d1")),
                                                                                                                ^~~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:426:51: 428:35 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:419:28: 435:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:430:32: 430:49 error: failed to resolve. Use of undeclared type or module `Combinator`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:430                             }, Combinator::Child)),
                                                                                                           ^~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:419:28: 435:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:430:32: 430:49 error: unresolved name `Combinator::Child`
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:430                             }, Combinator::Child)),
                                                                                                           ^~~~~~~~~~~~~~~~~
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:419:28: 435:19 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
<std macros>:7:8: 7:31 note: expansion site
<std macros>:1:1: 7:33 note: in expansion of vec!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:347:16: 454:11 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
/home/servo/buildbot/slave/linux1/build/components/style/stylesheets.rs:345:5: 455:8 note: expansion site
error: aborting due to 33 previous errors
Could not compile `style`.

@SimonSapin
Copy link
Member Author

Adding this change and squashing:

--- a/components/style/stylesheets.rs
+++ b/components/style/stylesheets.rs
@@ -328,7 +328,7 @@ pub fn iter_font_face_rules<F>(stylesheet: &Stylesheet, device: &Device,
 fn test_parse_stylesheet() {
     use std::sync::Arc;
     use cssparser;
-    use selectors::*;
+    use selectors::parser::*;
     use string_cache::Atom;
     use properties::{PropertyDeclaration, DeclaredValue, longhands};
     use std::borrow::ToOwned;

bors-servo pushed a commit that referenced this pull request Feb 23, 2015
The new library is https://github.com/servo/rust-selectors. It’s not quite ready for other users (the API needs work), but this is a first step.

servo/rust-selectors#2 should also be reviewed.

Fixes #3669.
@bors-servo bors-servo closed this Feb 23, 2015
@bors-servo bors-servo merged commit 2a50755 into servo:master Feb 23, 2015
@SimonSapin SimonSapin deleted the external-selectors branch February 23, 2015 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-awaiting-review There is new code that needs to be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extract selector matching as a library
6 participants