Commit graph

16155 commits

Author SHA1 Message Date
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
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
Simon Sapin
008e733df6 Fix some "unused" warnings 2017-06-06 16:58:35 +02:00
Anthony Ramine
bc1eef8f5e Use predefined_type for transition-delay 2017-06-06 14:36:00 +02:00
Anthony Ramine
8912a594c7 Use predefined_type for animation-timing-function 2017-06-06 14:35:59 +02:00
Anthony Ramine
65356b13f8 Use predefined_type for transition-property 2017-06-06 14:35:58 +02:00
Gregory Terzian
3a693c7a23 separate waking the event loop, from communicating with a compositor 2017-06-06 15:46:25 +08:00
bors-servo
2da8eb0342 Auto merge of #17180 - Manishearth:stylo-fill-stroke, r=birtles
stylo: Animate fill and stroke

r=birtles https://bugzilla.mozilla.org/show_bug.cgi?id=1369277

<!-- 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/17180)
<!-- Reviewable:end -->
2017-06-06 00:12:51 -07:00
Manish Goregaokar
3cd48d5b1a stylo: Animate fill and stroke 2017-06-05 23:26:33 -07:00
Manish Goregaokar
9aad71d74f stylo: Make SVGPaint and SVGPaintKind animatable 2017-06-05 23:25:55 -07:00
bors-servo
eaa01223a7 Auto merge of #17173 - Manishearth:supports-fixes, r=upsuper
Stop parsing @supports rules before Delimiter::Bang

Fixes #15482

Shorthand parsing uses `parse_entirely`, so we have to ask it to stop before the `!important`.

An alternate fix is to not use `parse_entirely` there and ensuring that all callers of `PropertyDeclaration::parse_into()` check that the input is exhausted. Two of the three callers do that anyway because they check for `!important`.

We also weren't checking for the end of the parser for `CSS.supports()`.

<!-- 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/17173)
<!-- Reviewable:end -->
2017-06-05 23:19:31 -07:00
bors-servo
6ce567b776 Auto merge of #17165 - heycam:pseudo-other, r=emilio
support matching :-moz-browser-frame and :-moz-table-border-nonzero against snapshots.

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

<!-- 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/17165)
<!-- Reviewable:end -->
2017-06-05 22:09:56 -07:00
Cameron McCormack
c6cac88c6f style: Regenerate Gecko bindings. 2017-06-06 12:26:45 +08:00
Cameron McCormack
17e5c19d70 style: Support matching :-moz-browser-frame and :-moz-table-border-nonzero against snapshots. 2017-06-06 12:26:45 +08:00
Cameron McCormack
90b3691f82 style: Minor restyle_hints.rs code reorganization. 2017-06-06 12:26:45 +08:00
bors-servo
6b78a514f8 Auto merge of #17177 - Manishearth:generic-paint, r=upsuper
Make SVGPaint generic

r=xidorn https://bugzilla.mozilla.org/show_bug.cgi?id=1369277

<!-- 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/17177)
<!-- Reviewable:end -->
2017-06-05 21:17:57 -07:00
Bobby Holley
f105d3438d Fix up unit tests.
MozReview-Commit-ID: 9eyOhoQ02qX
2017-06-05 19:44:13 -07:00
Bobby Holley
442211723c Eliminate redundant parse_selector.
MozReview-Commit-ID: 6eBVgT9ri5Q
2017-06-05 19:44:12 -07:00
Bobby Holley
27568de567 Use ThinArc in Selector.
MozReview-Commit-ID: Axvq0rbqA7Y
2017-06-05 19:44:10 -07:00
Bobby Holley
ce8d2a9208 Implement ThinArc.
MozReview-Commit-ID: LB3bs9ed2WC
2017-06-05 19:44:09 -07:00
Bobby Holley
e8a56e969f Make ParseVec bigger.
MozReview-Commit-ID: DszMC031Xlj
2017-06-05 19:44:08 -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
21448cf266 Add support for dynamically-sized types in servo_arc.
MozReview-Commit-ID: H15cG5RBtZH
2017-06-05 19:44:05 -07:00
Bobby Holley
fa9d2cb036 Move stylearc into a separate crate.
MozReview-Commit-ID: C3btN8Jw9sJ
2017-06-05 19:44:04 -07:00
Bobby Holley
992059c856 Move around specificity computation so that we know it by the time we mint the Selector.
This is important to make the selector immutable, which needs to happen when we stick it in an Arc.

MozReview-Commit-ID: BaMbOEbYC3D
2017-06-05 19:44:02 -07:00
Bobby Holley
1281fd9353 Stop slicing selectors when noting dependencies, and match with an offset instead.
MozReview-Commit-ID: KLqmdRKygO0
2017-06-05 19:44:01 -07:00
Bobby Holley
5ddabef636 Collapse Selector, SelectorInner, and ComplexSelector into a single Selector.
The refcounting is still internal. We'll fix that up next.

MozReview-Commit-ID: CTxZNaR3Qgj
2017-06-05 19:44:00 -07:00
Bobby Holley
713c9a63f6 Move the ancestor hashes out of Selector.
MozReview-Commit-ID: 5mipXnjgSED
2017-06-05 19:43:58 -07:00
Bobby Holley
e3d3c5a7b2 Hoist specificity_and_flags into ComplexSelector (soon to be Selector).
In the upcoming patches we'll eliminate the existing Selector and SelectorInner,
and ComplexSelector will become an Arc-managed |Selector|. So the tuple-indexed
setup is just temporary.

MozReview-Commit-ID: 4CcOYeHGUED
2017-06-05 19:29:23 -07:00
bors-servo
6fe0e30c16 Auto merge of #17169 - servo:jdm-patch-2, r=SimonSapin
Read 32kb from the network at a time.

Now that https://github.com/servo/servo/pull/16989 has merged, this might actually work.

<!-- 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/17169)
<!-- Reviewable:end -->
2017-06-05 18:18:30 -07:00
Manish Goregaokar
74f3284c69 Make SVGPaint generic 2017-06-05 17:05:59 -07:00
bors-servo
9987cb159f Auto merge of #17174 - mbrubeck:dir, r=Manishearth
stylo: Make :dir argument a case-insensitive identifier

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

<!-- 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/17174)
<!-- Reviewable:end -->
2017-06-05 15:44:33 -07:00
bors-servo
bba5339efc Auto merge of #17172 - bzbarsky:cache-parent-level, r=emilio
Parent mismatch should not clear style sharing cache.

We can have cousins in the cache whose parent doesn't match ours, and other
cousins whose parent does.  When we encounter one of the former, that's not a
reason to stop lookin for the latter.

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

<!-- 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=1369620"

<!-- 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/17172)
<!-- Reviewable:end -->
2017-06-05 14:36:35 -07:00
Manish Goregaokar
4ad3224ba8 Stop parsing @supports rules before Delimeter::Bang 2017-06-05 13:41:03 -07:00
bors-servo
621c1a4f96 Auto merge of #17167 - servo:derive-all-the-things, r=emilio
Use generics for transition-timing-function 📈

<!-- 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/17167)
<!-- Reviewable:end -->
2017-06-05 13:38:01 -07:00
Boris Zbarsky
f9205440b5 Parent mismatch should not clear style sharing cache.
We can have cousins in the cache whose parent doesn't match ours, and other
cousins whose parent does.  When we encounter one of the former, that's not a
reason to stop lookin for the latter.

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1369620
2017-06-05 16:31:58 -04: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
Matt Brubeck
08a53a3810 Bug 1367315 - stylo: Make :dir argument a case-insensitive identifier 2017-06-05 11:09:23 -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