Emilio Cobos Álvarez
46d4128d1f
style: Less refcount churn while inserting in the rule tree.
...
There's no need for it since we know no GC is happening while we're doing it.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-06-13 22:00:22 +02:00
Josh Matthews
8a784db594
Remove default cargo config.
2017-06-13 14:21:23 -04:00
bors-servo
6db2354b73
Auto merge of #17298 - asajeffrey:script-more-debug-impls, r=mbrubeck
...
Added Debug implementations.
<!-- Please describe your changes on the following line: -->
Added enough `Debug` implementations to be able to debug script thread message processing.
---
<!-- 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 do not require tests because we don't test debugging
<!-- 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/17298 )
<!-- Reviewable:end -->
2017-06-13 10:31:25 -07:00
bors-servo
fe573c1ce9
Auto merge of #17299 - servo:derive-all-the-things, r=emilio
...
Revert "Derive ToCss for MozImageRect"
This reverts commit fe19c3810c
.
<!-- 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/17299 )
<!-- Reviewable:end -->
2017-06-13 09:31:19 -07:00
Anthony Ramine
8eec24cd46
Revert "Derive ToCss for MozImageRect"
...
This reverts commit fe19c3810c
.
2017-06-13 18:00:29 +02:00
Alan Jeffrey
a47e94c8f6
Added Debug implementations.
2017-06-13 10:46:59 -05:00
bors-servo
c4d7a3d95c
Auto merge of #17296 - canaltinova:pseudo-quirk, r=bholley
...
Handle PseudoElement cases in :active and :hover quirk
Reviewed by bholley in bugzilla bug.
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1371963](https://bugzilla.mozilla.org/show_bug.cgi?id=1371963 )
<!-- 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/17296 )
<!-- Reviewable:end -->
2017-06-13 08:34:04 -07:00
bors-servo
8c2a7d6787
Auto merge of #17278 - asajeffrey:canvas-clear-webrender-image-key-when-resizing, r=emilio
...
Clear webrender image id when resizing a canvas.
<!-- Please describe your changes on the following line: -->
Webrender isn't very happy if images change size, so clear the webrender image key when resizing a canvas.
---
<!-- 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 #17277
- [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/17278 )
<!-- Reviewable:end -->
2017-06-13 07:38:12 -07:00
Alan Jeffrey
4e04daa9d0
Clear webrender image id when resizing a canvas.
2017-06-13 09:30:26 -05:00
Nazım Can Altınova
57d02dc0e9
Handle PseudoElement case in :active and :hover quirk
2017-06-13 17:22:39 +03:00
bors-servo
682af8bb19
Auto merge of #17293 - servo:derive-all-the-things, r=emilio
...
Derive two more ToCss impls
<!-- 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/17293 )
<!-- Reviewable:end -->
2017-06-13 06:36:12 -07:00
bors-servo
07f6e11485
Auto merge of #17292 - emilio:better-style-invalidation, r=heycam
...
style: Implement a more fine-grained invalidation method.
<!-- 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/17292 )
<!-- Reviewable:end -->
2017-06-13 04:56:09 -07:00
Emilio Cobos Álvarez
30252ee829
style: Update bindings.
...
MozReview-Commit-ID: K7X7EyYR2X
2017-06-13 13:27:11 +02:00
Emilio Cobos Álvarez
6b0f4c0410
style: Move one-off checks out of the recursive invalidation function.
...
There isn't a need to pay the cost for them multiple times.
Bug: 1372068
MozReview-Commit-ID: 3K2mRcWTheJ
2017-06-13 13:27:09 +02:00
Emilio Cobos Álvarez
36bac58863
style: Don't try to go down the tree if there aren't invalidations.
...
This can happen when adding an empty stylesheet, for example.
Bug: 1372068
MozReview-Commit-ID: Jtm4eJBWjEA
2017-06-13 13:27:08 +02:00
Emilio Cobos Álvarez
4434509088
style: Add an AllLinksVisitedAndUnvisited for invalidation.
...
Otherwise, tests like the following fail, given we always match as unvisited,
and we'd never mark the link as needing invalidation.
<!doctype html>
<style>
a {
color: red !important;
}
.foo :visited {
color: green !important;
}
</style>
<div>
<a href="https://google.es ">visit me</a>
<button onclick="this.parentNode.className = 'foo'">Then click me</button>
</div>
Bug: 1368240
MozReview-Commit-ID: LDv6S28c4ju
2017-06-13 13:27:06 +02:00
Emilio Cobos Álvarez
fdf9093466
style: Add missing visitedness check while invalidating elements.
...
This is needed for the omta test to pass. This is pretty much the equivalent to
the old restyle hints code.
Bug: 1368240
MozReview-Commit-ID: BLUfw5Wxpxd
2017-06-13 13:27:02 +02:00
Emilio Cobos Álvarez
14bb57c08f
style: Properly handle invalidation of eager pseudo-elements.
...
Bug: 1368240
MozReview-Commit-ID: EkzDVhC3GPH
2017-06-13 13:26:46 +02:00
Emilio Cobos Álvarez
cb06375fe2
style: Implement a more fine-grained invalidation method.
...
This commit also removes the old restyle_hints module and splits it into
multiple modules under components/style/invalidation/element/.
The basic approach is to walk down the tree using compound selectors as needed,
in order to do as little selector-matching as possible.
Bug: 1368240
MozReview-Commit-ID: 2YO8fKFygZI
2017-06-13 13:26:41 +02:00
bors-servo
5a33912882
Auto merge of #17295 - heycam:nac-style, r=emilio
...
style: Don't skip style attributes on NAC.
From https://bugzilla.mozilla.org/show_bug.cgi?id=1372089 .
2017-06-13 03:52:11 -07:00
Cameron McCormack
e314dbb4ac
style: Don't skip style attributes on NAC.
2017-06-13 17:44:33 +08:00
Anthony Ramine
53b465895f
Derive ToCss for EndingShape
2017-06-13 11:29:46 +02:00
Anthony Ramine
fe19c3810c
Derive ToCss for MozImageRect
2017-06-13 11:29:25 +02:00
Emilio Cobos Álvarez
fd10729941
style: Also print the class name when logging elements.
...
Bug: 1368240
MozReview-Commit-ID: 1MSn4rty5RL
2017-06-13 10:59:17 +02:00
Emilio Cobos Álvarez
151b636562
style: Add a way to match a single compound selector.
...
Also improve the ergonomics of matches_complex_selector.
Bug: 1368240
MozReview-Commit-ID: 9DWDvyZmetM
2017-06-13 10:58:47 +02:00
Emilio Cobos Álvarez
262f6adc30
Record whether an snapshot is recording a class attribute change or id change.
...
I'll use this information in order to get fewer dependencies out of the
dependency set.
Bug: 1368240
MozReview-Commit-ID: 5HlmKmSNO8p
2017-06-13 10:57:43 +02:00
bors-servo
44eb8c8e4f
Auto merge of #17291 - servo:derive-all-the-things, r=<try>
...
Function support for #[derive(ToCss)] and an Animatable fix
2017-06-13 01:24:53 -07:00
Anthony Ramine
f658215f12
Fix Animatable impl for LengthOrPercentageOrNone
2017-06-13 10:19:23 +02:00
Anthony Ramine
43a5257a0c
Introduce #[css(function)] for #[derive(ToCss)]
...
Any variant with this attribute gets serialised as a CSS function,
using the variant name as the function name.
2017-06-13 10:19:23 +02:00
Anthony Ramine
fd1ab75af9
Derive ToCss for ShapeRadius<L>
2017-06-13 10:19:23 +02:00
bors-servo
8449eb4a62
Auto merge of #17285 - heycam:newly-bound, r=bholley
...
geckolib: Don't panic when attempting to restyle an element with newly applied XBL bindings.
From https://bugzilla.mozilla.org/show_bug.cgi?id=1370793 .
<!-- 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/17285 )
<!-- Reviewable:end -->
2017-06-12 18:46:41 -07:00
Cameron McCormack
f989a2c21c
style: Update Gecko bindings.
2017-06-13 08:30:45 +08:00
bors-servo
abd5f3ed59
Auto merge of #17286 - upsuper:import-url-data, r=heycam
...
Set stylesheet url_data correctly for import rule
This is the servo side change of [bug 1331291](https://bugzilla.mozilla.org/show_bug.cgi?id=1331291 ).
2017-06-12 17:08:49 -07:00
Xidorn Quan
cdc537f23e
Bug 1331291 part 1 - Set stylesheet url_data correctly for import rule.
2017-06-13 10:07:06 +10:00
Cameron McCormack
06860d85c6
geckolib: Don't panic when attempting to restyle an element with newly applied XBL bindings.
2017-06-13 07:32:53 +08:00
bors-servo
1b07730323
Auto merge of #17213 - servo:quirk-case, r=bholley
...
ID and class selectors are ASCII case-insensitive in quirks mode.
https://bugzilla.mozilla.org/show_bug.cgi?id=1363778
<!-- 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/17213 )
<!-- Reviewable:end -->
2017-06-12 15:52:29 -07:00
Simon Sapin
138c03b24d
Stylo: avoid atom refcount traffic in ID selector matching
2017-06-13 00:51:41 +02:00
Simon Sapin
b82713924c
Pre-compute classes and IDs case-sensitivity
2017-06-13 00:36:12 +02:00
Simon Sapin
9316c41bf7
Make MatchingContext::quirks_mode field private, add read-only accessor.
2017-06-13 00:35:56 +02:00
Simon Sapin
700aaf2bd6
Move MatchingContext to a new module
2017-06-13 00:31:29 +02:00
Simon Sapin
c5c1c1b350
Classes/IDs case-sensitivity: get quirks mode from matching context.
2017-06-13 00:27:41 +02: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
Simon Sapin
524fcac191
Add Atom::to_ascii_lowercase
2017-06-12 23:33:15 +02:00
bors-servo
c1ea54d3c4
Auto merge of #17276 - servo:jdm-patch-3, r=mbrubeck
...
Use new ARM target for nightly upload.
This should fix #17275 after the changes in #17008 .
<!-- 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/17276 )
<!-- Reviewable:end -->
2017-06-12 13:58:59 -07:00
bors-servo
75d6796cbd
Auto merge of #17281 - bholley:shrink_rule_again, r=emilio
...
Pack bloom filter hashes better and save a word on Rule
https://bugzilla.mozilla.org/show_bug.cgi?id=1371949
<!-- 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/17281 )
<!-- Reviewable:end -->
2017-06-12 12:41:39 -07:00
Bobby Holley
2d412d4e3a
Add a size_of test for RuleNode.
...
MozReview-Commit-ID: Id6iedlK5tg
2017-06-12 12:13:27 -07:00
Bobby Holley
a98fff1af8
Hoist ApplicableDeclaration{Block,List} into a separate file.
...
MozReview-Commit-ID: EXnAzfyoZ1e
2017-06-12 12:13:21 -07:00
Bobby Holley
0caad2ffdc
Use even fewer bits for source order and shrink ApplicableDeclarationsBlock by another word.
...
MozReview-Commit-ID: 7B1i1g0HLTj
2017-06-12 12:13:16 -07: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
6e3e7b282c
Pack the fourth ancestor hash into the upper byte of the first three hashes.
...
MozReview-Commit-ID: KbtKQzLmwVO
2017-06-12 12:13:04 -07:00