aboutsummaryrefslogtreecommitdiffstats
path: root/components/selectors/visitor.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move Stylo to its own repo (#31350)Delan Azabani2024-02-271-111/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove packages that were moved to external repo * Add workspace dependencies pointing to 2023-06-14 branch * Fix servo-tidy.toml errors * Update commit to include #31346 * Update commit to include servo/stylo#2 * Move css-properties.json lookup to target/doc/stylo * Remove dependency on vendored mako in favour of pypi dependency This also removes etc/ci/generate_workflow.py, which has been unused since at least 9e71bd6a7010d6e5723831696ae0ebe26b47682f. * Add temporary code to debug Windows test failures * Fix failures on Windows due to custom target dir * Update commit to include servo/stylo#3 * Fix license in tests/unit/style/build.rs * Document how to build with local Stylo in Cargo.toml
* Revert as many changes to selectors from upstream as possible (#31365)Martin Robinson2024-02-201-1/+0
| | | | | | | | | | This is part of the preparation for splitting stylo into a separate crate. We have made various changes to selectors includings: 1. Bumping the rust edition 2. Fixing typos and updating links In addition to reverting those changes, this PR pulls in some changes to selectors we seem to have missed in the process of updates.
* Further changes required by ServoOriol Brufau2023-11-211-0/+1
|
* style: Record attribute dependencies within the selector list of ↵Zach Hoffman2023-11-211-1/+55
| | | | | | | | | | | | | | | | | | | | :nth-child(... of <selector list>) There are separate filters for IDs, classes, attribute local names, and element state. Also, we invalidate siblings of elements matched against the selector list of :nth-child(... of <selector list>) by marking matched elements with NODE_HAS_SLOW_SELECTOR_NTH_OF. The only remaining invalidation case invalidation case is `:nth-child(An+B of :has())` (bug 1818155), which should not block shipping `layout.css.nth-child-of.enabled`, because :has(...) is still being implemented (bug 418039). Depends on D172352 Differential Revision: https://phabricator.services.mozilla.com/D171936
* style: Implement parsing / selector-matching for :is() and :where().Emilio Cobos Álvarez2020-04-181-30/+15
| | | | | | | | | | | | | | This implements the easy / straight-forward parts of the :where / :is selectors. The biggest missing piece is to handle properly invalidation when there are combinators present inside the :where. That's the hard part of this, actually. But this is probably worth landing in the interim. This fixes some of the visitors that were easy to fix. Differential Revision: https://phabricator.services.mozilla.com/D70788
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-101-2/+2
|
* Run rustfmt on selectors, servo_arc, and style.Bobby Holley2018-04-101-3/+1
| | | | | | | | | | This was generated with: ./mach cargo fmt --package selectors && ./mach cargo fmt --package servo_arc && ./mach cargo fmt --package style Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
* Document selectors::VisitSimon Sapin2018-01-121-0/+28
|
* Remove unused SelectorIter importFernando Jiménez Moreno2017-08-251-1/+1
|
* Remove unused selector visitor argument.Josh Matthews2017-08-241-1/+0
|
* Allow style sharing for elements with ids as long as the ID is not being ↵Boris Zbarsky2017-06-051-1/+1
| | | | used for styling.
* Shrink selectors::Component, add case-insensitive for other attr selectorsSimon Sapin2017-05-181-3/+8
| | | | | * https://bugzilla.mozilla.org/show_bug.cgi?id=1364148 * https://bugzilla.mozilla.org/show_bug.cgi?id=1364162
* Rename SimpleSelector to Component.Bobby Holley2017-04-201-3/+3
| | | | MozReview-Commit-ID: JfaZpHSkG8h
* Store selectors and combinators inline in a single sequence.Bobby Holley2017-04-201-2/+3
| | | | | | | This improves cache locality and reduces allocations during parsing. Note that this reverses the iteration order within a sequence of simple selectors, but that shouldn't matter.
* style: Smoke-test the dependency tracking logic.Emilio Cobos Álvarez2017-04-131-1/+0
| | | | | MozReview-Commit-ID: J5HWdS1H49s Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* style: Simplify dependency visitor, avoid tracking dependencies of nested ↵Emilio Cobos Álvarez2017-04-131-1/+1
| | | | complex selectors separately.
* style: Fix dynamic changes of attributes when combined with :not.Emilio Cobos Álvarez2017-04-131-1/+6
|
* selectors: Remove unused visit_simple_selectors.Emilio Cobos Álvarez2017-04-091-6/+1
|
* style: Stop special-casing a few attributes for style sharing, and use a ↵Emilio Cobos Álvarez2017-04-091-2/+9
| | | | | | | | | | visitor to track dependencies. Also, simplify all the pre-snapshot attribute hacks in the script and style code. MozReview-Commit-ID: 6c9ipeb7Tnr Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* selectors: Remove custom attribute-affecting logic and sibling-affecting ↵Emilio Cobos Álvarez2017-04-091-0/+35
logic from rust-selectors. MozReview-Commit-ID: BjZY6TjJbcb Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>