Commit graph

26698 commits

Author SHA1 Message Date
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
a2a19f02ab Add some unit tests for basic transform operations for Servo. 2017-06-07 13:04:06 +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
bors-servo
2df8f69bcf Auto merge of #17199 - upsuper:shadow, r=Manishearth
Make shadow values share more code

<!-- Please describe your changes on the following line: -->
Make `text-shadow` reuse `Shadow` type directly.

---
<!-- 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
- [x] These changes do not require tests because refactor

<!-- 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/17199)
<!-- Reviewable:end -->
2017-06-06 21:02:30 -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
Boris Chiou
a6099d0fc0 Define ComputedOperation::InterpolateMatrix.
We use this arm to store the interpolated result of two mismatched
transform lists, and we resolve it until we know the reference box size
(on Gecko side). The conversion from ComputedOperation::InterpolateMatrix
to eCSSKeyword_interpolatematrix will be implemented later in this patch series.
2017-06-07 11:30:39 +08:00
Boris Zbarsky
21eafaa9f8 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.
2017-06-06 22:34:46 -04:00
Bobby Holley
586a21e1dd Make a bunch of types 'static.
The reasoning for this is explained in a comment in the next patch.

MozReview-Commit-ID: FQgDY77mg3B
2017-06-06 19:09:16 -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
Bobby Holley
817a2c6cca Address followup review comments.
MozReview-Commit-ID: AghLMEcbUVC
2017-06-06 19:09:04 -07:00
Anthony Ramine
7d09ce0495 Use generics for initial-letter
The former version used ComputedValueAsSpecified, which means we were storing
specified numbers and integers in the computed value.
2017-06-07 01:31:02 +02: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
bors-servo
f388c0ab1e Auto merge of #17141 - MortimerGoro:android_fonts, r=mbrubeck
Ged rid of libfontconfig in Android

Libfontconfig dependency is causing huge startup times in Android (20 seconds on each page load!). On other platforms fontconfig caches are already available or can be prebuilt on installation scripts, but this can't be done on Android. Updating libfontconfig dependency doesn't fix the problem either.

This PR gets rid of libfontconfig in Android. It queries available fonts and variations from Android System font configuration files. Android doesn't provide an API to query system fonts until Android O (which is very far from the minimum API right now...)

---
<!-- 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 #16195 (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/17141)
<!-- Reviewable:end -->
2017-06-06 13:29:05 -07:00
Matt Brubeck
7fd1626901 Reduce allocations during parallel layout 2017-06-06 12:34:36 -07:00
Matt Brubeck
ea154d8278 Reduce parallel layout chunk size to 16 2017-06-06 11:50:57 -07:00
Matt Brubeck
a158b106f4 Don't spawn layout threads in sequential mode 2017-06-06 11:20:13 -07:00
Matt Brubeck
8eecefe4c8 Make layout_thread debug logs less verbose 2017-06-06 11:20:12 -07:00
bors-servo
80488c4494 Auto merge of #17186 - servo:derive-all-the-things, r=emilio
Use more generics and remove more code from mako files

<!-- 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/17186)
<!-- Reviewable:end -->
2017-06-06 10:28:26 -07:00
Anthony Ramine
195e98e745 Use generics for scroll-snap-points-* 2017-06-06 19:27:43 +02:00
bors-servo
87005a0df3 Auto merge of #17185 - servo:unused, r=emilio
Fix some "unused" warnings
2017-06-06 08:13:39 -07:00