Commit graph

32 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
fe8da51fee
Bug 1364412: Properly reject to parse pseudo-element states that don't support state. r=bholley
MozReview-Commit-ID: KQCFPtOTGQI
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-16 02:53:44 +02:00
Emilio Cobos Álvarez
5820e3ecac
Bug 1364412: Convert pseudo-elements to an enum. r=hiro,xidorn 2017-05-16 02:53:41 +02:00
Emilio Cobos Álvarez
84f5a90668
Bug 1364412: Use the pseudo selector to reject state selectors. r=bholley
MozReview-Commit-ID: 73dnp6nZpdU
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-16 02:49:30 +02:00
Emilio Cobos Álvarez
10560ae043
Bug 1364412: Allow pseudo-element selectors to store state. r=bholley
MozReview-Commit-ID: CzAwg2uxqO2
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-16 02:49:22 +02:00
Emilio Cobos Álvarez
46bf5d61f0
Bug 1355343: Take all the snapshots into account. r=bholley
I've chosen this approach mainly because there's no other good way to guarantee
the model is correct than holding the snapshots alive until a style refresh.

What I tried before this (storing them in a sort of "immutable element data") is
a pain, since we call into style from the frame constructor and other content
notifications, which makes keeping track of which snapshots should be cleared an
which shouldn't an insane task.

Ideally we'd have a single entry-point for style, but that's not the case right
now, and changing that requires pretty non-trivial changes to the frame
constructor.

MozReview-Commit-ID: FF1KWZv2iBM
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-10 12:05:39 +02:00
Xidorn Quan
10b7001dd1 Make atom files generated at build-time. 2017-05-08 21:33:58 +10:00
Xidorn Quan
869e5e025e Rename gecko_ prefix of pseudo_element_helper file. 2017-05-08 21:33:53 +10:00
Bobby Holley
f4d81b010b Properly handle -moz-any for revalidation selectors.
Note that, while the comment is correct that there is a fair amount of -moz-any
usage in the UA sheet, it's always used as an ancestor selector, and thus ignored
for our purposes. Nevertheless, it's straightforward enough to support properly,
so we do that here.

MozReview-Commit-ID: Kz1yNfPUIaP
2017-04-27 11:13:11 -07:00
Emilio Cobos Álvarez
be0139ff3c
Bug 1331047: Implement the new traversal semantics for stylo. r=bholley,hiro
MozReview-Commit-ID: 4BXx9JpGZKX
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-27 14:26:48 +02:00
Emilio Cobos Álvarez
e136863939
stylo: Fix a serialization bug for string pseudos.
The string is null-terminated, so we need to avoid passing that last null
character.
2017-04-24 19:28:11 +02:00
Bobby Holley
cf06e2bf1e Use Boxed slices for Empty and MozAny.
MozReview-Commit-ID: CmVK3u0vYn0
2017-04-20 15:00:50 -07:00
Bobby Holley
6d66ec5e11 Store selectors and combinators inline in a single sequence.
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.
2017-04-20 15:00:43 -07:00
Emilio Cobos Álvarez
568fa4cc0d
style: Fix dynamic changes of attributes when combined with :not. 2017-04-13 01:00:59 +08:00
Emilio Cobos Álvarez
0ea58d1ffa
style: Stop special-casing a few attributes for style sharing, and use a 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>
2017-04-09 18:15:50 +08:00
Bobby Holley
3f0d022ba2 Use a more compact representation to store eager pseudo-elements.
This means that ElementStyles only need a single word to store eager pseudos.

MozReview-Commit-ID: 5bDXlDweN46
2017-04-03 14:34:23 -07:00
Bobby Holley
1ff008caa3 Improve some ergonomics around pseudo-elements.
I think a lot of the current indirection predates the crate merge.

MozReview-Commit-ID: FM28dgZa5go
2017-04-03 12:35:14 -07:00
Emilio Cobos Álvarez
ab2956a815
Bug 1349553: Account for negations of state-dependent selectors.
MozReview-Commit-ID: VyHuxh9q5N
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-03-23 09:51:24 +01:00
Manish Goregaokar
f2f832d1d9 stylo: Support all non-ts pseudos with an argument 2017-03-21 12:33:57 -07:00
Matt Brubeck
b8dead37f6 Bug 1348487 - stylo: Don't allow combinators in :-moz-any. 2017-03-20 08:28:56 -07:00
Matt Brubeck
2872c8bfab Bug 1340683 - stylo: Implement the :-moz-any pseudo-class 2017-03-16 11:44:47 -07:00
Manish Goregaokar
b37f991cb8 stylo: Add parsing support for functional non-ts pseudoclasses, add stub -moz-system-metric pseudo
MozReview-Commit-ID: KADDH6adZqR
2017-03-16 00:00:37 -07:00
Manish Goregaokar
c4f5f469b8 Replace non_ts_pseudo_class_list include hack with higher order macro
MozReview-Commit-ID: IBGhult0Ujv
2017-03-15 16:46:14 -07:00
Hiroyuki Ikezoe
22de4dc7a6 Add a utility function to convert PseudoElement to nsIAtom*.
MozReview-Commit-ID: 14qYFpiW0iG
2017-03-10 11:08:58 +09:00
Xidorn Quan
4bb982131b Put stylo's pseudo-class into a list file 2017-01-24 10:17:57 +11:00
Xidorn Quan
e7e3889422 Add :-moz-browser-frame pseudo-class 2017-01-06 21:26:12 +11:00
Xidorn Quan
0399f359c1 Add NonTSPseudoClass::is_internal function 2017-01-06 21:26:06 +11:00
Xidorn Quan
fa27ac0544 Add function to convert NonTSPseudoClass to CSSPseudoClassType 2017-01-06 21:25:45 +11:00
Emilio Cobos Álvarez
bcac8265c9
style: Document Gecko's selector parser. 2017-01-02 12:58:02 +01:00
Jansen Jan
55f0e56224 Add support for fullscreen #10102 2016-12-09 11:45:50 +01:00
Simon Sapin
81a3de3299 Remove SelectorImpl aliases 2016-11-22 14:50:22 +01:00
Simon Sapin
82b13d50e3 Update to selectors 0.15 2016-11-22 14:50:21 +01:00
Simon Sapin
b203ab2419 Rename selector_impl.rs to selector_parser.rs
This makes it consistent with an upcoming update of the selectors crate.
2016-11-20 15:30:37 +01:00
Renamed from components/style/gecko/selector_impl.rs (Browse further)