Ting-Yu Lin
585c00f235
style: Introduce Chrome UI privilege for parsers
...
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
2017-08-03 16:30:08 +08:00
Ting-Yu Lin
fd3b399d26
style: Rename PSEUDO_CLASS_INTERNAL to PSEUDO_CLASS_ENABLED_IN_UA_SHEETS
...
Some of the pseudo classes in nsCSSPseudoClassList are enabled only in UA
sheets but not in chrome. Rename the "internal" flag to "enabled in UA
sheets" to make the semantics clearer.
MozReview-Commit-ID: LKIiPk4pHFv
2017-08-03 16:30:03 +08:00
Simon Sapin
eb98ae6e04
Update cssparser to 0.18
...
https://github.com/servo/rust-cssparser/pull/171
2017-07-24 11:39:12 +02:00
Xidorn Quan
a307653581
Implement parsing of tree pseudo-elements.
2017-07-12 20:33:11 +10:00
Xidorn Quan
2649d0332a
Call non-functional pseudo-elements simple pseudo-element.
2017-07-12 15:07:29 +10:00
Emilio Cobos Álvarez
d5a5a7ff16
style: Don't treat some document-state-related pseudo-classes as revalidation selectors.
2017-06-29 08:45:05 -07:00
Bobby Holley
1d242ad760
Store selectors in matching order, rather than parse order.
...
We add a slow in-place reverse during parsing to achieve this for now, which
gets fixed up later on.
MozReview-Commit-ID: 42QkOzSgV3T
2017-06-20 11:59:10 -07:00
Boris Zbarsky
eddca4d6f6
:-moz-locale-dir shouldn't be a revalidation selector.
...
Fixes Gecko bug 1374019 <https://bugzilla.mozilla.org/show_bug.cgi?id=1374019 >
2017-06-17 23:01:02 -04:00
Simon Sapin
b83afdedc8
Upgrade cssparser to 0.15
2017-06-16 15:05:46 +02:00
Nazım Can Altınova
15fe48f3f6
stylo: Support :hover and :active quirk
2017-06-10 22:18:32 +03:00
Josh Matthews
27ae1ef2e7
Thread ParseError return values through CSS parsing.
2017-06-09 16:46:25 -04:00
Cameron McCormack
c7e2500311
style: Note :lang() as being sensitive to attributes.
2017-06-08 09:37:09 +08:00
Cameron McCormack
e299905606
style: Define types for pseudo-class string argument storage.
2017-06-08 09:37:09 +08:00
Cameron McCormack
17e5c19d70
style: Support matching :-moz-browser-frame and :-moz-table-border-nonzero against snapshots.
2017-06-06 12:26:45 +08:00
Bobby Holley
5ddabef636
Collapse Selector, SelectorInner, and ComplexSelector into a single Selector.
...
The refcounting is still internal. We'll fix that up next.
MozReview-Commit-ID: CTxZNaR3Qgj
2017-06-05 19:44:00 -07:00
Matt Brubeck
08a53a3810
Bug 1367315 - stylo: Make :dir argument a case-insensitive identifier
2017-06-05 11:09:23 -07:00
Manish Goregaokar
25d193ba34
stylo: Use namespace ids for content: attr(..)
...
MozReview-Commit-ID: FZ9YEpHQCBh
2017-06-01 14:11:31 -07:00
Emilio Cobos Álvarez
dd38117487
stylo: Parse but never match :-moz-placeholder as a pseudo-class.
...
Fixes bug 1366709.
2017-05-22 11:47:17 +02:00
Emilio Cobos Álvarez
522f8489d6
Bug 1364850: Move PseudoElement to be just another combinator in selectors. r=bholley
...
MozReview-Commit-ID: 8OoOIodkKJ5
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-17 10:58:24 +02:00
Boris Zbarsky
e03e9de6d0
Add :-moz-is-html support for stylo.
2017-05-16 14:33:44 -04:00
Boris Zbarsky
993cb6eb41
Don't require style sharing cache invalidation for :dir
2017-05-16 09:55:37 -04:00
Simon Sapin
984d696717
Turns out, we never actual hash selectors
2017-05-16 10:24:50 +02:00
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