Commit graph

16155 commits

Author SHA1 Message Date
Cameron McCormack
18d847227c style: Update Gecko bindings. 2017-06-08 09:37:33 +08:00
Cameron McCormack
f492c8fe6e style: Match :lang() using snapshots correctly. 2017-06-08 09:37:09 +08: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
094052c544 style: Clean up extended_filtering a bit. 2017-06-08 09:37:09 +08:00
Cameron McCormack
524794c09a script: Move extended_filtering to the style crate.
We'll need to call it from the style crate in later patches, when matching
:lang() against element snapshots.
2017-06-08 09:37:09 +08:00
Xidorn Quan
bf77f81ed6 Create RGBAColor for colors compute to RGBA. 2017-06-08 10:42:26 +10:00
Xidorn Quan
d0d170767d Unify specified Color type between Stylo and Servo. 2017-06-08 10:42:24 +10:00
Xidorn Quan
f3610d2724 Factor out Gecko-specific color keywords. 2017-06-08 10:42:22 +10:00
Xidorn Quan
b7d8fd0ff5 Move ToComputedValue impl of color types into specified::color. 2017-06-08 10:42:21 +10:00
Xidorn Quan
a7dda61158 Move specified color types into specified::color mod. 2017-06-08 10:42:19 +10:00
Xidorn Quan
6e1b36b32f Remove unused CSSRGBA. 2017-06-08 10:42:18 +10:00
bors-servo
1ea4a44fad Auto merge of #17216 - nox:fix-computed-circle-serialisation, r=canaltinova
Fix serialisation of computed circle() shapes

<!-- 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/17216)
<!-- Reviewable:end -->
2017-06-07 17:31:17 -07: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
bors-servo
07b0770d21 Auto merge of #17193 - asajeffrey:test-tidy-brace-count, r=jdm
Count number of braces on a line when checking spec links in test-tidy

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

Allow more than one brace per line when checking spec links in test-tidy.

We had problems caused  by `if unsafe { ... } {`.

---
<!-- 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 have tests.

<!-- 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/17193)
<!-- Reviewable:end -->
2017-06-07 15:36:36 -07:00
Anthony Ramine
5704e02529 Fix serialisation of computed circle() shapes 2017-06-07 23:47:03 +02:00
bors-servo
3553ae4df9 Auto merge of #17214 - bzbarsky:backout-style-sharing-increase, r=bustage
Back out https://github.com/servo/servo/pull/17198 for Gecko test failures

<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] 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/17214)
<!-- Reviewable:end -->
2017-06-07 13:50:54 -07:00
Boris Zbarsky
3d3ce51797 Back out https://github.com/servo/servo/pull/17198 for Gecko test failures 2017-06-07 15:57:48 -04:00
bors-servo
0934df77fd Auto merge of #17212 - jryans:visited-selectors, r=emilio
Stylo: Visited selectors for nested links

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

<!-- 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/17212)
<!-- Reviewable:end -->
2017-06-07 12:49:34 -07:00
Alan Jeffrey
1270080538 Count number of braces on a line in . 2017-06-07 14:25:07 -05:00
J. Ryan Stinnett
2c8866e919 Stop looking for relevant links once found
Once we've encountered a relevant link, stop looking for potential relevant
link.  A relevant link is only the nearest ancestor link, so it is incorrect to
keep looking once one is found.  This only matters for the somewhat unusual case
of nested links.

MozReview-Commit-ID: LiXsUGWfxg3
2017-06-07 14:24:06 -05:00
J. Ryan Stinnett
6b1b8bbee8 Log element during selector matching
MozReview-Commit-ID: D8eFyRCy5BR
2017-06-07 14:23:53 -05:00
bors-servo
bf46da065d Auto merge of #17150 - asajeffrey:script-paint-worklets-plumbing, r=jdm
Implemented the plumbing for paint worklets

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

This PR implements the plumbing for paint worklets:

* Adding CSS values for paint worklets.
* Implementing a skeleton for the `PaintWorkletGlobalScope` webidl.
* Implementing an executor for paint worklet tasks, and passing it from script to layout.
* Building the display list items for paint worklet images.

This PR does not implement registering or calling paint worklets in JS.

Before it merges, this PR needs a reftest added for basic paint worklet functionality.

---
<!-- 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
- [ ] 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/17150)
<!-- Reviewable:end -->
2017-06-07 11:57:07 -07:00
Alan Jeffrey
fd17dcd604 Implemented the plumbing for paint worklets. 2017-06-07 13:49:30 -05:00
bors-servo
eaefcbe551 Auto merge of #17211 - Manishearth:stylo-single-generic, r=heycam
stylo: Prefill default font when a single generic is set

r=heycam https://bugzilla.mozilla.org/show_bug.cgi?id=1370734

<!-- 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/17211)
<!-- Reviewable:end -->
2017-06-07 10:53:25 -07:00
bors-servo
cb281af463 Auto merge of #17210 - ferjm:bug1367615.inDOMUtils, r=emilio
Bug 1367615 - Stylo: implement inIDOMUtils.getSelectorCount and inIDO…

…MUtils.getSelectorTextFromIndex

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

<!-- 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/17210)
<!-- Reviewable:end -->
2017-06-07 09:54:47 -07:00
Manish Goregaokar
3db0d3b4fa stylo: Prefill default font when a single generic is set 2017-06-07 09:40:15 -07:00
Manish Goregaokar
6dbca89ff5 stylo: Refactor generic font handling into a method 2017-06-07 09:39:58 -07:00
bors-servo
738483742c Auto merge of #17209 - servo:derive-all-the-things, r=emilio
Introduce more generics and more deriving

<!-- 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/17209)
<!-- Reviewable:end -->
2017-06-07 08:55:08 -07:00
Fernando Jiménez Moreno
36f3255484 Bug 1367615 - Stylo: implement inIDOMUtils.getSelectorCount and inIDOMUtils.getSelectorTextFromIndex 2017-06-07 17:42:29 +02:00
Anthony Ramine
45e8b0e8c7 Support unit variants when deriving ToCss 2017-06-07 16:47:59 +02:00
bors-servo
7e273d6c9b Auto merge of #17068 - gterzian:remove_compositorproxy, r=asajeffrey
Separate waking the event loop, from communicating with Compositor

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

@paulrouget first step of #15934, Glutin only for now, please take a look...

If this makes sense, I will also update the code for ports other than Glutin...

One question: one do I add the `warn!` macro to `servolib`? Also perhaps we would also want to add `box`, since I had to switch to using `Box::new`...

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] 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/17068)
<!-- Reviewable:end -->
2017-06-07 05:52:35 -07:00
bors-servo
fdd1d719f3 Auto merge of #17198 - bzbarsky:bigger-sharing-cache, r=bholley
Increase the size of the style sharing cache to 31.

Still a lot of guesswork here, but this does seem to get us better sharing.  See
https://bugzilla.mozilla.org/show_bug.cgi?id=1369621 for some data.

<!-- 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 https://bugzilla.mozilla.org/show_bug.cgi?id=1369621

<!-- Either: -->
- [ ] 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/17198)
<!-- Reviewable:end -->
2017-06-07 04:13:50 -07: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
644773d492 Auto merge of #17204 - heycam:recascade-nac, r=emilio
style: always re-cascade in native anonymous subtrees

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

<!-- 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/17204)
<!-- Reviewable:end -->
2017-06-07 01:04:08 -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
bors-servo
ffc47e89b3 Auto merge of #17197 - bholley:nonzero_arc, r=Manishearth
Force the NonZero optimization for servo_arc and StrongRuleNode

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

Also addressing followup feedback from https://bugzilla.mozilla.org/show_bug.cgi?id=1370107

<!-- 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/17197)
<!-- Reviewable:end -->
2017-06-06 22:42:42 -07:00
Cameron McCormack
a1093ea868 style: always re-cascade in native anonymous subtrees 2017-06-07 13:22:00 +08:00
Boris Chiou
1d44c273d3 Implement an FFI and matrix conversions for matrix decomposition/interpolation/recomposition.
We use Servo backend to decompose/interpolate/recompose matrices on both
main thread and compositor thread.
2017-06-07 13:04:05 +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
Xidorn Quan
a87f63fa04 Create sugar for nsCSSShadowItem. 2017-06-07 13:32:19 +10:00
Xidorn Quan
3e47e6eab2 Make text-shadow reuse Shadow directly. 2017-06-07 13:32:17 +10:00
Xidorn Quan
ccd7022457 Reuse ToCss of Shadow types in drop-shadow filter. 2017-06-07 13:32:16 +10:00
Xidorn Quan
e659fa6c23 Serialize spread in shadow conditionally. 2017-06-07 13:32:14 +10:00
Xidorn Quan
828665a6af Fix serialization order for computed Shadow. 2017-06-07 13:32:12 +10:00
Xidorn Quan
2bd1ff0450 Move ToCss impl for Shadow types to values mod. 2017-06-07 13:32:10 +10:00
Boris Chiou
1a3845b719 Convert between {Accumulate, Interpolate}Matrix and the related gecko type.
We convert ComputedOperation::{Accumulate, Interpolate}Matrix into gecko type
not on the main thread, so we cannot use nsCSSValueList_heap (which is not
thread safe so we cannot create it and destroy it on different threads).
Therefore, we use nsCSSValueSharedList to represent the cloned
from_list/to_list. In this patch, we also implement the reversing way,
i.e. Convert eCSSKeyword_{accumulate, interpolate}matrix into
{Accumulate, Interpolate}Matrix.
2017-06-07 11:31:27 +08:00
Boris Chiou
8a69132de0 Use IntoIterator for nsCSSValueList. 2017-06-07 11:31:14 +08:00
Boris Chiou
313f7d86db Define ComputedOperation::AccmulateMatrix.
If we set the composite operation to accumulate, we may need to accumulate two
mismatched transform lists, and then to interpolate them. In order to
accumulate two mismatched transform lists, we also need the reference
box information, so use the same idea as that for interpolation. i.e.
use AccmulateMatrix to store it temporarily, and convert it into matrix
later.
2017-06-07 11:31:01 +08:00