aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/selector_parser.rs
Commit message (Collapse)AuthorAgeFilesLines
* Rustfmt.Emilio Cobos Álvarez2021-02-261-1/+2
|
* style: Allow resource:// stylesheets to use chrome-only rules.Emilio Cobos Álvarez2021-02-261-1/+1
| | | | | | We'll use it to use @-moz-document from plaintext.css. Differential Revision: https://phabricator.services.mozilla.com/D101516
* style: Add derived ToShmem implementations.Cameron McCormack2019-04-121-1/+1
| | | | Differential Revision: https://phabricator.services.mozilla.com/D17197
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition --features gecko`Simon Sapin2018-11-101-3/+3
|
* `cargo fix --edition`Simon Sapin2018-11-101-7/+7
|
* Reorder importsPyfisch2018-11-061-1/+1
|
* style: Fix servo build.Emilio Cobos Álvarez2018-09-031-1/+1
|
* style: Use an Atom to represent Direction values in pseudo-classes.Cameron McCormack2018-09-031-19/+38
| | | | Differential Revision: https://phabricator.services.mozilla.com/D4730
* style: Measure heap allocations hanging off selector components.Cameron McCormack2018-07-161-1/+1
| | | | | | Bug: 1475191 Reviewed-by: emilio MozReview-Commit-ID: D7vZQ7v8owS
* Run rustfmt on selectors, servo_arc, and style.Bobby Holley2018-04-101-11/+10
| | | | | | | | | | 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)
* Change ToCss to take a CssWriter<W>Anthony Ramine2018-01-231-2/+2
| | | | | | This more concrete wrapper type can write a prefix the very first time something is written to it. This allows removing plenty of useless monomorphisations caused by the former W/SequenceWriter<W> pair of types.
* style: Move :-moz-locale-dir matching to rust.Emilio Cobos Álvarez2018-01-111-0/+14
|
* moving :dir() param serialization FIXMEMichael Wilson2017-11-211-0/+1
|
* Auto merge of #19315 - emilio:chrome-rules-user-sheets, r=heycambors-servo2017-11-211-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | style: Enable chrome-only CSS features in user stylesheets. MozReview-Commit-ID: FJ4vTiOrotH Bug: 1418963 Reviewed-by: heycam <!-- 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/19315) <!-- Reviewable:end -->
| * style: Enable chrome-only CSS features in user stylesheets.Emilio Cobos Álvarez2017-11-211-2/+3
| | | | | | | | | | | | MozReview-Commit-ID: FJ4vTiOrotH Reviewed-by: heycam Bug: 1418963
* | style: :dir() pseudo class now represented by enumMichael Wilson2017-11-151-2/+24
|/ | | | Fixes #19195
* Revert "Diagnostic map semantics."Manish Goregaokar2017-10-231-9/+0
| | | | This reverts commit f5c5be00a7df984647364dfc84c0c9bc6d3e2f34.
* Add slots in PerPseudoElementMap for tree pseudos.Xidorn Quan2017-10-201-21/+9
|
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* style: Remove the ElementExt trait.Emilio Cobos Álvarez2017-10-161-9/+0
| | | | It is likely it's the most useless trait ever existing.
* Diagnostic map semantics.Bobby Holley2017-10-071-0/+9
| | | | MozReview-Commit-ID: C0a5g6xMPY0
* Revert #18668 - Add mprotect diagnostics for HashMap crashBobby Holley2017-10-031-9/+0
|
* Semantics for ProtectedHashMap.Bobby Holley2017-09-281-0/+9
| | | | MozReview-Commit-ID: K0m65uZi7iw
* Measure the UA cache.Nicholas Nethercote2017-09-201-0/+1
| | | | | | | | | | | | | | | | ServoStyleSetSizes now has two uses, one for the Stylist, and one for the UA cache, and so the patch removes 'Stylist' from the field names. Example output from about:memory: > +----1,359,608 B (00.55%) -- layout > | +----756,488 B (00.31%) -- style-sheet-cache [2] > | +----393,968 B (00.16%) -- servo-ua-cache > | | +--234,496 B (00.10%) -- element-and-pseudos-maps > | | +---59,648 B (00.02%) -- revalidation-selectors > | | +---58,320 B (00.02%) -- invalidation-map > | | +---30,752 B (00.01%) -- other > | | +---10,752 B (00.00%) -- precomputed-pseudos
* Measure the stylist during memory reporting.Nicholas Nethercote2017-09-051-0/+5
|
* order derivable traits listsClément DAVID2017-08-231-1/+1
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* stylo: Remove a lot of the restyle damage related complexity.Emilio Cobos Álvarez2017-08-201-10/+0
| | | | | | | | | | The only reason why we had the `existing_style_for_style_damage` bit is to apply some optimizations that we don't have anymore. I still want to reintroduce a few of them, at least for the non-eager pseudo-element case... But I think I won't need this at all. This allows us to remove a fair amount of Gecko code too.
* style: Use an enumerated array for per-pseudo maps.Emilio Cobos Álvarez2017-08-081-14/+75
| | | | | | | This avoids random HashMaps. MozReview-Commit-ID: LQeZrLsoOnl Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* style: Introduce Chrome UI privilege for parsersTing-Yu Lin2017-08-031-1/+11
| | | | | | | | | | | The motivation is that Chrome XBL stylesheets can be parsed under author level, but we allow some event-state pseudo classes like :-moz-handled-clicktoplay to be used. Also synchronize the privilege of pseudo classes in non_ts_pseudo_class_list.rs and nsCSSPseudoClassList.h (except :fullscreen). MozReview-Commit-ID: 8fUjjC8hbQO
* stylo: Introduce ComputedValuesInnerManish Goregaokar2017-07-171-1/+1
|
* Call non-functional pseudo-elements simple pseudo-element.Xidorn Quan2017-07-121-1/+1
|
* Thread ParseError return values through CSS parsing.Josh Matthews2017-06-091-3/+5
|
* Look for relevant links while matchingJ. Ryan Stinnett2017-05-241-3/+0
| | | | | | | | | | | | | | | | | Adjust the matching process to look for a "relevant link" while matching. A "relevant link" is the element being matched if it is a link or the nearest ancestor link. Matching for links now depends on the `VisitedHandlingMode`, which determines whether all links match as if they are unvisited (the default) or if the relevant link matches as visited (and all others remain unvisited). If a relevant link is ever found for any selector, track this as part of the `MatchingContext` object. This is used in the next patch to determine if an additional match and cascade should be performed to compute the styles when visited. MozReview-Commit-ID: 3xUbRo7vpuD
* style: Refactor the cascade function.Emilio Cobos Álvarez2017-05-171-1/+1
| | | | | The `cascade_primary_or_pseudo` function was nice when we shared more code, but right now I think it just makes it harder to understand what's going on.
* Use StyleArc in the style system.Bobby Holley2017-05-021-1/+1
| | | | MozReview-Commit-ID: flF0fv9E9M
* style: Stop special-casing a few attributes for style sharing, and use a ↵Emilio Cobos Álvarez2017-04-091-40/+1
| | | | | | | | | | 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>
* Use a more compact representation to store eager pseudo-elements.Bobby Holley2017-04-031-16/+0
| | | | | | This means that ElementStyles only need a single word to store eager pseudos. MozReview-Commit-ID: 5bDXlDweN46
* Improve some ergonomics around pseudo-elements.Bobby Holley2017-04-031-22/+2
| | | | | | I think a lot of the current indirection predates the crate merge. MozReview-Commit-ID: FM28dgZa5go
* style: Document the restyle hints code, and make it operate on `TElement`.Emilio Cobos Álvarez2017-01-021-24/+66
| | | | | This removes the annoying constraint of having to provide the current state from outside of the restyle hints code.
* Make Restyle tracking more granular.Bobby Holley2016-12-091-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | The primary idea of this patch is to ditch the rigid enum of Previous/Current styles, and replace it with a series of indicators for the various types of work that needs to be performed (expanding snapshots, rematching, recascading, and damage processing). This loses us a little bit of sanity checking (since the up-to-date-ness of our style is no longer baked into the type system), but gives us a lot more flexibility that we'll need going forward (especially when we separate matching from cascading). We also eliminate get_styling_mode in favor of a method on the traversal. This patch does a few other things as ridealongs: * Temporarily eliminates the handling for transfering ownership of styles to the frame. We'll need this again at some point, but for now it's causing too much complexity for a half-implemented feature. * Ditches TRestyleDamage, which is no longer necessary post-crate-merge, and is a constant source of compilation failures from either needing to be imported or being unnecessarily imported (which varies between gecko and servo). * Expands Snapshots for the traversal root, which was missing before. * Fixes up the skip_root stuff to avoid visiting the skipped root. * Unifies parallel traversal and avoids spawning for a single work item. * Adds an explicit pre_traverse step do any pre-processing and determine whether we need to traverse at all. MozReview-Commit-ID: IKhLAkAigXE
* Don't match native anonymous content to user/author rules.Cameron McCormack2016-11-241-0/+2
|
* Remove SelectorImpl aliasesSimon Sapin2016-11-221-8/+4
|
* Update to selectors 0.15Simon Sapin2016-11-221-9/+31
|
* Rename selector_impl.rs to selector_parser.rsSimon Sapin2016-11-201-0/+137
This makes it consistent with an upcoming update of the selectors crate.