Commit graph

5330 commits

Author SHA1 Message Date
bors-servo
33766b2714 Auto merge of #17348 - emilio:bup, r=bholley
style: Inline RestyleData.

Bug: 1368236
MozReview-Commit-ID: 49s3SO0PMHf

<!-- 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/17348)
<!-- Reviewable:end -->
2017-06-15 20:28:56 -07:00
Emilio Cobos Álvarez
ffc45e9aaa
style: Inline RestyleData.
Bug: 1368236
MozReview-Commit-ID: 49s3SO0PMHf
2017-06-16 03:36:18 +02:00
bors-servo
04935de3ea Auto merge of #17347 - duckinator:fix-issue-17319, r=mbrubeck
Fix setting img src before window.onload causing panic

<!-- Please describe your changes on the following line: -->

Setting an image source asynchronously (e.g. using `setTimeout` or in the callback of an `XMLHttpRequest`) before `window.onload` fired would cause a panic due to a preexisting load blocker not being terminated before assigning a new one.

This PR fixes that and adds a test for it.

---
<!-- 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 #17319.

<!-- 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/17347)
<!-- Reviewable:end -->
2017-06-15 16:58:20 -07:00
Ellen Marie Dash
53da1e3915 add title to test; update manifest. 2017-06-15 17:13:30 -04:00
Ellen Marie Dash
3ec15aa3df test that setting img src async before window.onload doesn't panic. 2017-06-15 17:06:13 -04:00
Anthony Ramine
608e7f71a2 Make computed types hold Percentage instead of bare CSSFloat 2017-06-15 16:59:03 +02:00
Anthony Ramine
51a4481388 Use CustomIdent for transition-property 2017-06-15 13:03:23 +02:00
bors-servo
b0392dbf39 Auto merge of #17324 - ferjm:bug1371393.column, r=SimonSapin
stylo: set location for NestedRuleParser during prelude parsing

From https://bugzilla.mozilla.org/show_bug.cgi?id=1371393

<!-- 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/17324)
<!-- Reviewable:end -->
2017-06-15 01:36:22 -07:00
Fernando Jiménez Moreno
7334298f30 stylo: set location for NestedRuleParser during prelude parsing 2017-06-15 10:26:42 +02:00
bors-servo
09b8f124f5 Auto merge of #17331 - birtles:animate-display, r=hiro
Support animation of the display property

These are the Servo-side changes of [Mozilla bug 1371518](https://bugzilla.mozilla.org/show_bug.cgi?id=1371518).

These changes have been reviewed by @hiikezoe.

<!-- 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/17331)
<!-- Reviewable:end -->
2017-06-14 20:17:47 -07:00
Bobby Holley
d5fb93d487 Bump rayon to 0.8.
MozReview-Commit-ID: 8OFE5PghMzl
2017-06-14 18:52:05 -07:00
Brian Birtles
8f3dad598f Use AnimatableLonghand for AnimationValueMap and related code
In the next few patches we move all non-transition related code over to
using AnimatableLonghand instead of TransitionProperty. This will allow
us to re-purpose TransitionProperty to represent only properties that
can be transitioned (i.e. excluding discrete properties) as well as
simplifying the code by removing the need to deal with shorthands and
the "all" value in places that do not need to handle those values.
2017-06-15 10:18:18 +09:00
Nicolas Silva
8617320500 Bump euclid to 0.14. 2017-06-14 16:00:59 +02:00
Hiroyuki Ikezoe
8bfed4cb3c Move ParsingMode into style_traits. 2017-06-14 09:51:36 +09:00
Alan Jeffrey
4e04daa9d0 Clear webrender image id when resizing a canvas. 2017-06-13 09:30:26 -05: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
Xidorn Quan
cdc537f23e Bug 1331291 part 1 - Set stylesheet url_data correctly for import rule. 2017-06-13 10:07:06 +10: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
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
bors-servo
811c980864 Auto merge of #17257 - servo:jdm-patch-4, r=emilio
Run selectors tests.

<!-- 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/17257)
<!-- Reviewable:end -->
2017-06-11 06:43:21 -07:00
Josh Matthews
27ae1ef2e7 Thread ParseError return values through CSS parsing. 2017-06-09 16:46:25 -04:00
Josh Matthews
97a536f741 Run selectors tests. 2017-06-09 14:51:49 -04:00
Boris Zbarsky
6601ae2810 Reduce the size of ApplicableDeclarationBlock.
The level is a u8, so on 64-bit it packs nicely after the u32 specificity.
2017-06-08 14:44:55 -04:00
bors-servo
09b4f79ed3 Auto merge of #17218 - canaltinova:transform-bug, r=emilio
Don't accept an extra token at the end of transform property

The lack of `input.try` usage makes transform property to accept values like `rotate(70deg)foo`.

---
<!-- 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

<!-- 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/17218)
<!-- Reviewable:end -->
2017-06-08 03:37:44 -07:00
bors-servo
12dca42dd7 Auto merge of #17196 - glennw:update-wr-cache-glyphs, r=jdm
Update WR (move glyph data to gpu cache and halve glyph alloc/uploads).

<!-- 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/17196)
<!-- Reviewable:end -->
2017-06-07 22:55:53 -07:00
Xidorn Quan
7568a19688 Merge CSSColor into Color. 2017-06-08 12:59:22 +10:00
Glenn Watson
392ed2c8db Update WR (move glyph data to gpu cache and halve glyph alloc/uploads). 2017-06-08 12:19:40 +10:00
Xidorn Quan
d0d170767d Unify specified Color type between Stylo and Servo. 2017-06-08 10:42:24 +10:00
Nazım Can Altınova
51066436fa
Don't accept an extra token at the end of transform property 2017-06-08 02:36:52 +03:00
Alan Jeffrey
fd17dcd604 Implemented the plumbing for paint worklets. 2017-06-07 13:49:30 -05:00
bors-servo
3db7f5d556 Auto merge of #17189 - bd339:iss17038, r=emilio
Add pref to force WebGL context creation failure

<!-- Please describe your changes on the following line: -->
Introduces the pref `webgl.testing.context_creation_error`, to force creation of a new WebGLRenderingContext to fail.

---
<!-- 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 #17038 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/17189)
<!-- Reviewable:end -->
2017-06-07 02:27:29 -07:00
bors-servo
f4a720483d Auto merge of #17202 - BorisChiou:stylo/animation/mismatched_transform, r=Manishearth,birtles
stylo: Bug 1335998 - Handle interpolation and accumulation of mismatched transform lists

These are the interdependent patches of Bug 1335998. We want to do interpolation and accumulation for mismatched transform lists, so introduce ComputedOperation::InterpolateMatrix and ComputedOperation::Accumulation. Both arms store the from_list and to_list, and resolve them until we have the layout information. For the Servo part, we haven't implemented how to read the transform lists in layout/fragment.rs, but I think it would be easy. (related issue #13267)

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1335998](https://bugzilla.mozilla.org/show_bug.cgi?id=1335998)
- [X] There are tests for these changes

<!-- 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/17202)
<!-- Reviewable:end -->
2017-06-06 23:54:41 -07:00
Boris Chiou
a2a19f02ab Add some unit tests for basic transform operations for Servo. 2017-06-07 13:04:06 +08:00
Bobby Holley
b3a61b7a1c Use NonZeroPtrMut for {Strong,Weak}RuleNode.
MozReview-Commit-ID: Da4Ds7SIcCD
2017-06-06 21:38:52 -07:00
Bobby Holley
eee07be227 Introduce NonZeroPtrMut and use it in servo_arc.
MozReview-Commit-ID: AAmeyjfyXeU
2017-06-06 21:38:51 -07:00
Bobby Holley
c369d0708c Add some size tests for ElementData and what's inside.
MozReview-Commit-ID: Aj0rryEnJpl
2017-06-06 19:09:10 -07:00
Benjamin Dahse
c034d99880 Add pref to force WebGL context creation failure
The pref `webgl.testing.context_creation_error` will cause creation of a new WebGLRenderingContext to fail, iff set to true.
Also update test expectation of `context_creation_error.html` to pass.
2017-06-06 23:08:57 +02:00
Simon Sapin
008e733df6 Fix some "unused" warnings 2017-06-06 16:58:35 +02:00
Bobby Holley
f105d3438d Fix up unit tests.
MozReview-Commit-ID: 9eyOhoQ02qX
2017-06-05 19:44:13 -07:00
Bobby Holley
27568de567 Use ThinArc in Selector.
MozReview-Commit-ID: Axvq0rbqA7Y
2017-06-05 19:44:10 -07:00
Bobby Holley
852efb825f Use dynamically-sized Arcs for Selector.
MozReview-Commit-ID: hq0jYrx8Sg
2017-06-05 19:44:06 -07:00
Bobby Holley
b815cabaf7 Add a size_of test for Rule.
MozReview-Commit-ID: J9y9cl0rpxX
2017-06-05 19:29:17 -07:00
bors-servo
9a9a0749b8 Auto merge of #17104 - Eijebong:bump_euclid_heapsize, r=emilio
Bump euclid to 0.13 and heapsize to 0.4

This is necessary for the serde 1.0 update.

--
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

- [X] These changes do not require tests because it's just a dependency bump

<!-- 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/17104)
<!-- Reviewable:end -->
2017-06-05 12:34:19 -07:00
bors-servo
429db6a3c6 Auto merge of #17055 - bzbarsky:sharing-across-ids, r=emilio
Allow style sharing for elements with ids as long as the ID is not being used for styling

<!-- Please describe your changes on the following line: -->

---
<!-- 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 part of the problem we're seeing in https://bugzilla.mozilla.org/show_bug.cgi?id=1367862

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because the only impact is on performance and memory.

<!-- 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/17055)
<!-- Reviewable:end -->
2017-06-05 11:05:00 -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
Bastien Orivel
0a254b0306 Bump euclid to 0.13 and heapsize to 0.4 2017-06-05 19:28:39 +02:00
bors-servo
b584944f17 Auto merge of #17112 - cbrewster:custom_element_registry, r=jdm
Implement custom element registry

<!-- Please describe your changes on the following line: -->
Implements https://html.spec.whatwg.org/multipage/#customelementregistry

---
<!-- 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 #16753 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/17112)
<!-- Reviewable:end -->
2017-06-05 08:38:03 -07:00