Commit graph

26502 commits

Author SHA1 Message Date
Bastien Orivel
0a254b0306 Bump euclid to 0.13 and heapsize to 0.4 2017-06-05 19:28:39 +02:00
Boris Zbarsky
98f95a32da Fix the handling of the Bloom filter in the style sharing cache. 2017-06-05 12:51:51 -04: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
Connor Brewster
87bf4ca2ef Update test expectations 2017-06-05 09:18:58 -06:00
Connor Brewster
1800da779c Fix custom element registry define test
The test relies on DOM elements with ids beind added
as properties of the window. Servo does not do this, and
this is not a best practice.
2017-06-05 09:18:56 -06:00
Connor Brewster
e21e64a33c Add custom element registry 2017-06-05 09:18:54 -06:00
Anthony Ramine
874885e235 Use generics for transition-timing-function 📈 2017-06-05 16:49:55 +02:00
bors-servo
a36edb9970 Auto merge of #17163 - jgraham:gecko_wpt_update, r=jdm
Update mach bootstrap for changes to wpt harness path in gecko

Gecko is now using the wpt harness under the wpt tools directory
rather than a copy in an adjacent directory. Therefore the path to the
requirements files, and the required model paths, have changed.

<!-- 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
- [X] These changes do not require tests because it only affects the mach bootstrap script

<!-- 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/17163)
<!-- Reviewable:end -->
2017-06-05 06:26:31 -07:00
bors-servo
e2ae3b683e Auto merge of #17164 - paulrouget:kill_got_load_complete_message, r=jdm
Remove no-op got_load_complete_message compositor property.

Removing no-op code.

---
<!-- 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 no-op code

<!-- 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/17164)
<!-- Reviewable:end -->
2017-06-05 05:24:38 -07:00
Paul Rouget
fbb59f925a Remove no-op got_load_complete_message compositor property. 2017-06-05 11:00:16 +02:00
bors-servo
63be9d7af2 Auto merge of #17123 - KuoE0:bug-1358993, r=heycam
Store the pointer of reusable sheets in StylesheetLoader.

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

To make stylo support reusable style sheets, we need to store the pointer of reusable style sheets we got from gecko. And we pass them back to gecko to reuse.

---
<!-- 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 [Bug 1358993](https://bugzilla.mozilla.org/show_bug.cgi?id=1358993).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because the test cases are in Gecko.

<!-- 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/17123)
<!-- Reviewable:end -->
2017-06-05 01:44:53 -07:00
James Graham
06cdf7bb3b Update mach bootstrap for changes to wpt harness path in gecko
Gecko is now using the wpt harness under the wpt tools directory
rather than a copy in an adjacent directory. Therefore the path to the
requirements files, and the required model paths, have changed.
2017-06-05 08:52:48 +01:00
KuoE0
00d3fc29bc Update generated files
MozReview-Commit-ID: 3bQbda2PJLX
2017-06-05 15:12:45 +08:00
KuoE0
3a15cbd5c3 Store the pointer of reusable sheets in StylesheetLoader.
MozReview-Commit-ID: DZP2bChjj3k
2017-06-05 15:12:44 +08:00
bors-servo
d767e6046b Auto merge of #17162 - birtles:additive-smil, r=hiro
Support additive SMIL animation

These are the Servo-side changes for [Bug 1355349](https://bugzilla.mozilla.org/show_bug.cgi?id=1355349). They 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/17162)
<!-- Reviewable:end -->
2017-06-04 21:41:06 -07:00
Brian Birtles
6491509f87 Add FFI for calling Servo's add and accumulate methods on animation values 2017-06-05 12:49:33 +09:00
Brian Birtles
34556f7769 Add FFI for getting the zero value of an animation value 2017-06-05 12:49:33 +09:00
Brian Birtles
e48f94cbda Don't introduce calc() when interpolating between length and percentages if either side is zero
Without this patch anim-css-strokewidth-1-by-pct-pct.svg (and possibly
others) fails because we calculate the result as 'calc(0px + 10%)' and
we don't support calc on stroke-width (yet) so the rendered result is
incorrect.

As a more thorough fix, we should make the zero-value for
LengthOrPercentageOrNumber a zero *number* (instead of a zero length)
but that won't work yet since we don't support animating between
stroke-widths with units and those that don't (see
https://bugzilla.mozilla.org/show_bug.cgi?id=1369614). Regardless of
that, we still shouldn't introduce calc in order to add a zero value
using the LengthOrPercentage type, so this change is still needed.
2017-06-05 12:49:32 +09:00
Brian Birtles
00cdced2ca Add get_zero_value to Animatable trait 2017-06-05 12:49:31 +09:00
bors-servo
67eaae82ed Auto merge of #17157 - upsuper:animation-type, r=<try>
Remove some redundant animation interpolation code

<!-- 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/17157)
<!-- Reviewable:end -->
2017-06-04 19:34:05 -07:00
Xidorn Quan
61eb7e055f Use animation_value_type in AnimatedProperty.
So that we can remove redundant interpolation code for corresponding
computed types.
2017-06-05 11:23:18 +10:00
Xidorn Quan
0ef3a23313 Use move for conversion between animatable value and computed types. 2017-06-05 10:33:50 +10:00
bors-servo
c260c6ede0 Auto merge of #17154 - emilio:split, r=Manishearth
style: Split stylesheets.rs

This file has become quite bloated lately. This commit deletes that file in
favor of a set of submodules.

The only noticeable change apart from code move, is converting deep_clone_foo
methods into a trait.

It also unifies logic related to different style rules in the same place.

There's some missing work, specially related to font-face and counter-style, but
I think this is worth landing in the meantime.

<!-- 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/17154)
<!-- Reviewable:end -->
2017-06-04 14:26:30 -07:00
bors-servo
2dd67a9497 Auto merge of #17142 - kenan-rhoton:LRUCacheArrayVecDeque, r=emilio
Move LRUCache to ArrayDeque crate

We move LRUCache from using VecDeque to ArrayDeque to avoid using heap allocations.

This relies on the fix in goandylok/arraydeque#4.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because the use cases are the same, only minimal implementation changes have been made

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

I additionally ran test-unit, because I'm paranoid.

<!-- 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/17142)
<!-- Reviewable:end -->
2017-06-04 13:29:24 -07:00
Emilio Cobos Álvarez
58fd80e282
style: Split stylesheets.rs
This file has become quite bloated lately. This commit deletes that file in
favor of a set of submodules.

The only noticeable change apart from code move, is converting deep_clone_foo
methods into a trait.

It also unifies logic related to different style rules in the same place.

There's some missing work, specially related to font-face and counter-style, but
I think this is worth landing in the meantime.
2017-06-04 21:50:09 +02:00
bors-servo
942fce3a0b Auto merge of #17152 - servo:derive-all-the-things, r=emilio
Derive the most trivial ToCss implementations 🌋

<!-- 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/17152)
<!-- Reviewable:end -->
2017-06-04 10:02:28 -07:00
bors-servo
7176e3ae9e Auto merge of #17153 - Manishearth:stylo-vp-disable, r=emilio
stylo: disable @viewport

Firefox doesn't support @viewport, we shouldn't either.

r=emilio https://bugzilla.mozilla.org/show_bug.cgi?id=1347410

<!-- 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/17153)
<!-- Reviewable:end -->
2017-06-04 08:56:26 -07:00
Manish Goregaokar
cdc230e4d3 stylo: disable @viewport
Firefox doesn't support @viewport, we shouldn't either.
2017-06-04 08:54:48 -07:00
Anthony Ramine
c4f1d647a0 Derive the most trivial ToCss implementations 🌋
For now, all variants get serialised as the space-separated serialisations
of their fields. Unit variants are not supported.
2017-06-04 16:17:56 +02:00
bors-servo
6d6f03974d Auto merge of #17151 - heycam:rem-recascade, r=emilio
style: Recascade the document when rem units are used and the root font-size changes.

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

Reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1367592.

---
<!-- 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/17151)
<!-- Reviewable:end -->
2017-06-03 19:04:45 -07:00
Cameron McCormack
19b61dfc08 style: Recascade the document when rem units are used and the root font-size changes. 2017-06-04 10:03:11 +08:00
Kenan Rhoton
8aeb512670 Adapt LRUCache to use ArrayDeque crate instead of VecDeque 2017-06-03 20:59:01 +02:00
bors-servo
7b61d55421 Auto merge of #17147 - emilio:media-query-caching, r=heycam
Bug 1357461 - stylo: Cache media query results and only flush and restyle if they changed.

<!-- 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/17147)
<!-- Reviewable:end -->
2017-06-03 08:11:23 -07:00
Emilio Cobos Álvarez
dd3bf6f952
Ensure the default computed values are up-to-date before evaluating media queries.
Zoom changes can change the meaning of ems, so we can't re-evaluate media
queries with the old values, because otherwise we may miss a restyle.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1357461
MozReview-Commit-ID: HQInvR7RPqR
2017-06-03 14:44:12 +02:00
Emilio Cobos Álvarez
5c66d3c77a
Cache effective media query results.
This patch also makes RulesIterator not iterate over rules for which we don't
process nested rules.

There's nothing depending on this behavior right now afaik, and this will make
us duplicate less code in following patches.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1357461
MozReview-Commit-ID: CaMFQtAVnJF
2017-06-03 14:43:44 +02:00
Anthony Ramine
56c961af5a Revert "Update Rust nightly to 1.19.0-nightly (6165203c4 2017-06-03)"
This reverts commit f081380dc0.
2017-06-03 14:37:17 +02:00
Anthony Ramine
befb017f7f Revert "Update Rust stable to 1.17.0"
This reverts commit 8a9d9ab2f9.
2017-06-03 14:37:10 +02:00
Emilio Cobos Álvarez
b5232c940d
style: Move the stylesheet invalidation code to another submodule.
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1357461
MozReview-Commit-ID: DIzZXoHycZs
2017-06-03 14:18:56 +02:00
Anthony Ramine
8a9d9ab2f9 Update Rust stable to 1.17.0 2017-06-03 13:36:00 +02:00
Anthony Ramine
f081380dc0 Update Rust nightly to 1.19.0-nightly (6165203c4 2017-06-03) 2017-06-03 13:35:55 +02:00
bors-servo
985050d364 Auto merge of #17145 - Manishearth:bump, r=mbrubeck
Bump cssparser

<!-- 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/17145)
<!-- Reviewable:end -->
2017-06-02 17:46:35 -07:00
Manish Goregaokar
41f1c3463e Bump cssparser to 0.13.7 2017-06-02 17:43:56 -07:00
bors-servo
eac4f407e2 Auto merge of #15354 - cynicaldevil:manual-redirect, r=jdm
Redirect document loads manually

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

r? @jdm

I ran some tests at random from the `navigating-across-documents` folder, and they are passing.

<!-- 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/15354)
<!-- Reviewable:end -->
2017-06-02 14:49:21 -07:00
bors-servo
54448305de Auto merge of #17144 - jryans:link-pres-hints, r=Manishearth
Stylo: Support link preshints on <body>

https://bugzilla.mozilla.org/show_bug.cgi?id=1367923
2017-06-02 13:08:04 -07:00
J. Ryan Stinnett
b03867da5d Update bindings 2017-06-02 14:39:13 -05:00
J. Ryan Stinnett
56b44d2709 Pull decls from Gecko for link preshints
Based on a link's active state and the visited handling mode, pull in link,
vlink, and alink preshint declaration blocks from Gecko as needed.

MozReview-Commit-ID: A6udMYbzQnK
2017-06-02 14:34:39 -05:00
Imanol Fernandez
19fbec9d54 Ged rid of libfontconfig in Android. Query available fonts from Android system font configuration files. 2017-06-02 18:40:08 +02:00
bors-servo
fa158a78b6 Auto merge of #17139 - emilio:parsing-simplify, r=nox
style: Simplify a bit the parsing code.

I plan to simplify it further, but this is worth landing on its own.

<!-- 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/17139)
<!-- Reviewable:end -->
2017-06-02 05:38:48 -07:00
Emilio Cobos Álvarez
bbd85ccbda
style: Simplify the namespace setup for stylesheet parsing. 2017-06-02 14:38:05 +02:00
Emilio Cobos Álvarez
26ef0f6178
style: Simplify some attr() parsing code. 2017-06-02 12:51:33 +02:00