Emilio Cobos Álvarez
314f2ce714
style: Define a CascadeLevel enum, and make the rule tree operate on it.
...
We'll use this level to know where to stop replacing nodes in the tree.
2017-01-30 23:53:53 +01:00
Rohit Burra
325271ec83
Changes Stylist::set_device to check for mediaqueries in Stylesheets
2017-01-29 17:11:26 +05:30
Marco Concetto Rudilosso
07f04ced2e
changed quickersort with pdqsort
2017-01-27 18:42:22 +00:00
Boris Chiou
19aea7ea78
Bug 1317209 - Part 5: Support transition cascade level. r=emilio
...
Support a new enum, EffectCompositor_CascadeLevel, which is an equivalent of
EffectCompositor::CascadeLevel in Gecko.
2017-01-24 18:44:07 +08:00
Boris Chiou
3a89e89952
Bug 1317209 - Part 4: Put animation rule to cascade. r=emilio
...
We try to get the servo animation rule and declarations during elements
matching, and put the rule to the right priority.
Note: According to CSS Cascade Level spec, Animations is between
Important author declarations and Normal override declarations.
2017-01-24 16:32:20 +08:00
Emilio Cobos Álvarez
5b5243b8af
Bug 1331213: Bootstrap a Gecko-side Device, and track it's dirtiness manually in the per-doc data. r=heycam
...
The setup is quite different to Servo-land, so add a comment about the different
setup.
Also, check viewport rules when flushing stylesheets. I believe that the
previous behavior is plain wrong, though I haven't taken the time to come up
with a test case.
In any case, it doesn't hurt any of both back-ends.
MozReview-Commit-ID: 46gtTkesOsr
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 14:05:23 +01:00
bors-servo
50bba770d6
Auto merge of #14789 - Manishearth:supports, r=SimonSapin
...
Support @supports
fixes #14786
cc @heycam @upsuper
r? @SimonSapin
<!-- 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/14789 )
<!-- Reviewable:end -->
2017-01-09 10:54:38 -08:00
Cameron McCormack
3e0e2bcd2c
Don't inherit all properties for pre-computed pseudos if there are no matching rules.
2017-01-09 17:55:40 +08:00
Manish Goregaokar
1b0842e228
Support @supports ( fixes #14786 )
2017-01-07 23:17:50 -08:00
Emilio Cobos Álvarez
c0cf847043
style: Isolate the soon-to-be style-backend-specific from the media_query module.
2017-01-07 12:34:43 +01:00
Emilio Cobos Álvarez
7788f43c7e
style: Remove unneeded allow's.
...
They're useless right now.
2017-01-07 12:34:30 +01:00
Boris Zbarsky
62961370ec
Bug 1298588 part 12. Compile some bits that call ComputedValues::initial_values only for servo, not stylo. r=bholley
...
Stylist::set_device seems to only be used in servo code, and is the only consumer of ViewportConstraints::maybe_new.
2017-01-04 23:13:50 -05:00
Boris Zbarsky
61f6025dc3
Bug 1298588 part 9, servo piece. Pass through useful default styles to cascade(). r=bholley
2017-01-04 23:13:46 -05:00
Emilio Cobos Álvarez
fa8874fb14
style: Document the restyle hints code, and make it operate on TElement
.
...
This removes the annoying constraint of having to provide the current state from
outside of the restyle hints code.
2017-01-02 12:57:52 +01:00
Emilio Cobos Álvarez
c5f2142d8f
style: Document the stylist module.
2017-01-02 12:57:51 +01:00
Emilio Cobos Álvarez
082866aba6
style: Export fnv's FnvHashMap, instead of rewriting it.
2017-01-02 12:57:51 +01:00
Emilio Cobos Álvarez
121b718e99
style: Remove a bunch of duplicated logic in add_stylesheet.
...
This is remminiscent of my recent @import refactor, and stayed there
incorrectly.
Note that it's the same code that lives in `update` (where it should live).
2017-01-02 12:57:50 +01:00
Emilio Cobos Álvarez
444fef164e
style: Add a struct to represent import rules, and parse them correctly.
2016-12-16 16:57:18 +01:00
Emilio Cobos Álvarez
85b6e5ad80
style: Move Stylist::device into an Arc
2016-12-16 15:10:37 +01:00
Xidorn Quan
599eb1c9f0
Move Arc<RwLock<_>> out from CssRules tuple
2016-11-29 22:15:13 +11:00
bors-servo
d98abaec20
Auto merge of #14300 - bholley:restyle_driven_traversal, r=emilio
...
stylo: Basic infrastructure for RestyleHint-driven traversal
Gecko Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=131701
(Don't review yet, will flag on the gecko bug when the time comes)
<!-- 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/14300 )
<!-- Reviewable:end -->
2016-11-25 09:00:44 -08:00
Cameron McCormack
64ff6dc103
Implement StyleSheet.disabled.
2016-11-25 11:27:51 +08:00
Bobby Holley
992f7dddf4
Bug 1317016 - Basic infrastructure for RestyleHint-driven traversal.
...
MozReview-Commit-ID: 7wH5XcILVmX
2016-11-24 17:07:38 -08:00
Cameron McCormack
22b62e0913
Don't match native anonymous content to user/author rules.
2016-11-24 13:00:12 +08:00
Simon Sapin
f044659b7c
Use selectors::SelectorList
2016-11-22 14:50:23 +01:00
Simon Sapin
81a3de3299
Remove SelectorImpl aliases
2016-11-22 14:50:22 +01:00
Cameron McCormack
48aa7070ac
GC the RuleTree when the Stylist is dropped.
...
We only consider doing a GC currently if the root node has a zero refcount.
But that only happens if it has no children -- even weak children keep a
strong reference to their parent. So at the very least, we should do a
GC specifically when the RuleTree is going away. (We probably want to add
some other GC opportunities too at some point, otherwise it's easy to
never GC a RuleTree.)
2016-11-21 09:01:19 +08: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
Simon Sapin
08066800cd
Rename selector_matching.rs to stylist.rs
2016-11-20 15:29:09 +01:00