Emilio Cobos Álvarez
e3b5a1dcb0
style: Add a test for the size of a Dependency.
2017-07-13 09:36:25 +02:00
Bobby Holley
1c7f2a9f09
Account for left-to-right rather than right-to-left precedence of classes in selector maps.
...
MozReview-Commit-ID: 8qIl4k3RxaC
2017-06-20 11:59:12 -07:00
Simon Sapin
5bccf98aa4
ID and class selectors are ASCII case-insensitive in quirks mode.
...
https://bugzilla.mozilla.org/show_bug.cgi?id=1363778
2017-06-12 23:33:53 +02:00
Bobby Holley
3afab1400a
Make source_order u32 and shrink Rule.
...
MozReview-Commit-ID: AKNTZZqke1O
2017-06-12 12:13:10 -07:00
Bobby Holley
f105d3438d
Fix up unit tests.
...
MozReview-Commit-ID: 9eyOhoQ02qX
2017-06-05 19:44:13 -07:00
Boris Zbarsky
d031b5badb
Add selectors with an id in them to the list of revalidation selectors.
2017-06-05 13:32:02 -04:00
Emilio Cobos Álvarez
a67e880256
style: Move SelectorMap to its own submodule.
2017-05-23 14:48:04 +02:00
bors-servo
1306b16d5a
Auto merge of #16968 - HeyZoos:stylist-accessors, r=emilio
...
Stylist accessors
<!-- Please describe your changes on the following line: -->
Add accessor methods for the `device` and `ruleset` fields in the `Stylist` struct.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16857 (github issue number if applicable).
<!-- Either: -->
- [X] There are tests for these changes
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- 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/16968 )
<!-- Reviewable:end -->
2017-05-22 20:12:46 -05:00
heyzoos
e3d9c7449a
Add tests for the device and rule_tree accessors
2017-05-20 11:20:49 -05:00
Anthony Ramine
00bfc6b172
Remove a lot of unused imports
2017-05-20 15:23:19 +02:00
Simon Sapin
685b9efed6
Move "is universal" logic from stylist.rs to selectors/parser.rs
2017-05-16 18:41:27 +02:00
Emilio Cobos Álvarez
dd38740ece
Bug 1364412: Store full selectors in the Rule object. r=bholley
...
MozReview-Commit-ID: EKLKxNCghLD
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-16 02:49:26 +02:00
Fernando Jiménez Moreno
bc156cfe1c
Stylo: Bug 1350175 - Support getting line / column number of CSS rules
...
Fix font_cache_thread test
2017-05-12 15:20:12 +02:00
Bobby Holley
e9d4110ad4
Handle importance when inserting into the rule tree.
2017-05-11 17:37:17 +02:00
Bobby Holley
a6fe7bea5e
Generalize SelectorMap.
...
MozReview-Commit-ID: HX4EcLurrr8
2017-05-05 10:48:18 -07:00
bors-servo
8b41c7c137
Auto merge of #16689 - servo:m5e, r=nox
...
Upgrade to html5ever 0.16
<!-- 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/16689 )
<!-- Reviewable:end -->
2017-05-03 08:42:41 -05:00
Bobby Holley
d78ca4c4f9
Use StyleArc in the style system.
...
MozReview-Commit-ID: flF0fv9E9M
2017-05-02 17:35:44 -07:00
Simon Sapin
6c518c89b9
Upgrade to html5ever 0.16
2017-05-02 19:24:28 +02:00
Emilio Cobos Álvarez
f879140ad2
style: Reftest for bogus style sharing across cousins.
2017-05-01 20:22:19 +02:00
Emilio Cobos Álvarez
e09ae428eb
style: Account for cousin sharing in the revalidation logic.
...
Fixes bug 1361013.
2017-05-01 20:22:16 +02:00
Bobby Holley
6e413653e7
Add unit tests for revalidation selectors.
...
If these break, our cache may be subtly wrong in certain situations, which may
be hard to detect.
MozReview-Commit-ID: AXG2tpGnQ6k
2017-04-27 11:13:04 -07:00
Bobby Holley
1d6763c8e9
Avoid pointer-chasing to check whether there are any declarations.
2017-04-21 17:28:10 -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
Bobby Holley
9524c5cb57
Introduce SelectorInner and use it for top-level matching.
...
MozReview-Commit-ID: DxG6USsPIkh
2017-04-18 20:07:53 -07:00
Simon Sapin
1bacd0eb15
Move all PropertyDeclarationBlock from RwLock<_> to Locked<_>
2017-03-19 22:30:38 +01:00
Simon Sapin
aeffca2a59
Replace RwLock<StyleRule> with Locked<StyleRule>
2017-03-19 22:30:37 +01:00
Bobby Holley
8cf331a498
Rearrange PropertyDeclaration to avoid embedding DeclaredValue.
...
From https://bugzilla.mozilla.org/show_bug.cgi?id=1347719
This effectively combines the discriminants of the two enums and reduces the
size of PropertyDeclaration by one word.
MozReview-Commit-ID: 9rCRiSVZTQT
2017-03-16 14:40:55 -07:00
Simon Sapin
da4e5146e9
Make PropertyDeclarationBlock::important_count private.
2017-03-07 23:37:31 +01:00
Emilio Cobos Álvarez
db26ef9acb
style: Ensure that precomputed pseudo-element declarations are correctly sorted.
2017-02-09 13:20:09 +01:00
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
Simon Sapin
58d452fa4e
Use PropertyId instead of Atom for CSSStyleDeclaration::get_computed_style
2016-12-09 17:06:50 -10:00
Simon Sapin
f044659b7c
Use selectors::SelectorList
2016-11-22 14:50:23 +01:00
Simon Sapin
82b13d50e3
Update to selectors 0.15
2016-11-22 14:50:21 +01:00
Simon Sapin
08066800cd
Rename selector_matching.rs to stylist.rs
2016-11-20 15:29:09 +01:00