Commit graph

3765 commits

Author SHA1 Message Date
Xidorn Quan
2bd1ff0450 Move ToCss impl for Shadow types to values mod. 2017-06-07 13:32:10 +10:00
Anthony Ramine
195e98e745 Use generics for scroll-snap-points-* 2017-06-06 19:27:43 +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
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
fa9d2cb036 Move stylearc into a separate crate.
MozReview-Commit-ID: C3btN8Jw9sJ
2017-06-05 19:44:04 -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
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
Boris Zbarsky
4c320a9c75 Allow inserting elements into the style sharing cache even when they are affected by id selectors. 2017-06-05 13:32:05 -04:00
Boris Zbarsky
ad1309552d Allow style sharing for elements with ids as long as the ID is not being used for styling. 2017-06-05 13:32:03 -04: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
Boris Zbarsky
98f95a32da Fix the handling of the Bloom filter in the style sharing cache. 2017-06-05 12:51:51 -04:00
Anthony Ramine
874885e235 Use generics for transition-timing-function 📈 2017-06-05 16:49:55 +02:00
KuoE0
00d3fc29bc Update generated files
MozReview-Commit-ID: 3bQbda2PJLX
2017-06-05 15:12:45 +08: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
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
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
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
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
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