Commit graph

28547 commits

Author SHA1 Message Date
Simon Sapin
66c357feef Fix handling of all shorthand with var() functions 2017-07-13 16:23:14 +02:00
Simon Sapin
42813bc813 Move property value parsing from longhand/shorthand ID into separate methods. 2017-07-13 16:23:13 +02:00
Simon Sapin
54f1325a49 var() functions in longhands: use a single code path with IDs
… rather than generating similar code for every longhand property
2017-07-13 16:23:12 +02:00
Simon Sapin
252e52e24e var() functions in shorthands: use a single code path with IDs
… rather than generating similar code for each shorthand.
2017-07-13 16:23:11 +02:00
Simon Sapin
8a8614eccd CSS-wide keywords parsing in longhands: use a single code path with IDs
… rather than generating similar code for every longhand property.
2017-07-13 16:23:10 +02:00
Simon Sapin
a5b80e2d75 CSS-wide keywords parsing in shorthand: use a single code path with IDs
… rather than generating similar code for each shorthand.
2017-07-13 16:23:09 +02:00
Simon Sapin
3075746edd Property validity checks: generated tables rather than genrated code 2017-07-13 16:23:08 +02:00
Emilio Cobos Álvarez
f77bfedb9e
style: Don't early return before updating the root font-size.
We never use the reconstruct path for the root, but feels less handwavy.
2017-07-13 16:00:20 +02:00
Emilio Cobos Álvarez
62310d9bd5
style: Don't use the current element info for cached validation data.
We can take it straight from the validation target.
2017-07-13 15:36:59 +02:00
Emilio Cobos Álvarez
36310e3b66
style: Kill some style sharing code.
MozReview-Commit-ID: 42MyHx3QHuu
2017-07-13 15:32:20 +02:00
Simon Sapin
db1a3e54b0 Use heap API from std rather than the alloc crate 2017-07-13 15:26:40 +02:00
Anthony Ramine
612dbb868d Update to rustc 1.20.0-nightly (f85579d4a 2017-07-12) 2017-07-13 15:20:51 +02:00
bors-servo
347cbb0635 Auto merge of #17711 - ferjm:bug1367274.linear.gradient, r=xidorn
Implement serialization of linear-gradient the same ways as in Gecko

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

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

<!-- 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/17711)
<!-- Reviewable:end -->
2017-07-13 05:17:06 -07:00
Martin Robinson
39a98d4ff1 Fix the size and position of overflow:scroll clip
The clip for overflow:scroll clip was not including the space for
padding, which could lead to some content being clipped when it
shouldn't. This changes fixes that issue.

A test is skipped because this fix also stops hiding a failure due to
mispositioned text.

Fixes #16576.
2017-07-13 13:50:03 +02:00
bors-servo
9515abbca3 Auto merge of #17707 - emilio:invalidation-less-memory, r=heycam
stylo: Waste less memory in invalidation stuff and style rules.

This should help a lot with https://bugzilla.mozilla.org/show_bug.cgi?id=1380488.

<!-- 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/17707)
<!-- Reviewable:end -->
2017-07-13 04:15:15 -07:00
Fernando Jiménez Moreno
6ae4bf6ee8 Implement serialization of linear-gradient the same ways as in Gecko 2017-07-13 12:20:30 +02:00
bors-servo
9d74ae890b Auto merge of #17710 - emilio:revert-bloom-sharing, r=heycam
Revert "Auto merge of #17701 - bholley:reuse_allocations, r=emilio"

This reverts commit ebfc8f5858, reversing
changes made to 5585ff2c44.

Animation code can reenter and create a new TLS context from the traversal
SequentialTask, so this won't work as written, and it's making test fails.

<!-- 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/17710)
<!-- Reviewable:end -->
2017-07-13 01:26:34 -07:00
Emilio Cobos Álvarez
a34f288b98
Revert "Auto merge of #17701 - bholley:reuse_allocations, r=emilio"
This reverts commit ebfc8f5858, reversing
changes made to 5585ff2c44.

Animation code can reenter and create a new TLS context from the traversal
SequentialTask, so this won't work as written.
2017-07-13 09:58:08 +02:00
Paul Rouget
9ba1d32f9d always call new_pipeline() before add_pending_changes() 2017-07-13 09:52:02 +02:00
Emilio Cobos Álvarez
e3b5a1dcb0
style: Add a test for the size of a Dependency. 2017-07-13 09:36:25 +02:00
bors-servo
9451b41d33 Auto merge of #17702 - upsuper:python-addr-in-generated, r=emilio
Avoid random python address to be added to generated files

This would catch cases like #17691 and avoid regressing [bug 1380327](https://bugzilla.mozilla.org/show_bug.cgi?id=1380327) in this manner.

<!-- 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/17702)
<!-- Reviewable:end -->
2017-07-12 23:34:58 -07:00
bors-servo
173181a491 Auto merge of #17694 - glennw:webrender-update, r=glennw
Upgrade to the latest version of WebRender

<!-- 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/17694)
<!-- Reviewable:end -->
2017-07-12 21:52:27 -07:00
Emilio Cobos Álvarez
445b8fb3e8
style: Remove SelectorAndHashes. 2017-07-13 05:44:55 +02:00
Emilio Cobos Álvarez
dee4aea264
style: Remove hashes from style rules and dependencies.
Dependencies are very numerous, and now we shouldn't be getting so many of them.

Style rules just don't need them, so it's a waste of memory.
2017-07-13 05:44:53 +02:00
bors-servo
28abeab5a5 Auto merge of #17705 - emilio:neg-padding, r=bholley
style: Avoid parsing negative padding in the padding shorthand.

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

<!-- 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/17705)
<!-- Reviewable:end -->
2017-07-12 20:11:45 -07:00
Emilio Cobos Álvarez
1785fd66a4
style: Avoid parsing negative padding in the padding shorthand. 2017-07-13 04:58:21 +02:00
Paul Rouget
ff6dc856e6 remove no-op InitializeCompositing message 2017-07-13 04:30:08 +02:00
bors-servo
3e2f6dc870 Auto merge of #17693 - emilio:revert-rustup, r=nox
Revert "Auto merge of #17633 - servo:rustup, r=nox"

This reverts commit 327e72aa14, reversing
changes made to eec51cdd57.

This closes #17642.

<!-- 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/17693)
<!-- Reviewable:end -->
2017-07-12 19:04:21 -07:00
Emilio Cobos Álvarez
9394ea9644
style: Remove unneeded bounds in SelectorMap and related code.
MozReview-Commit-ID: CWwdVCwWijn
2017-07-13 03:34:33 +02:00
bors-servo
ebfc8f5858 Auto merge of #17701 - bholley:reuse_allocations, r=emilio
reuse the bloom filter and style sharing cache across traversals

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

<!-- 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/17701)
<!-- Reviewable:end -->
2017-07-12 16:48:19 -07:00
Bobby Holley
3bce0c7652 Stop using SendElement in StyleSharingCandiate.
MozReview-Commit-ID: AuNPDsq8bgk
2017-07-12 16:38:08 -07:00
Bobby Holley
ec6cca6d08 Reuse style sharing cache across traversals.
MozReview-Commit-ID: 9wCJtciqs6K
2017-07-12 16:38:07 -07:00
Bobby Holley
0614010552 Store the bloom filter in TLS and reuse it across traversals.
MozReview-Commit-ID: EbzDehr2Y2L
2017-07-12 16:38:06 -07:00
Bobby Holley
d1c31f7eaf Add owning_ref back as a style dep, and update parking_lot. 2017-07-12 16:37:50 -07:00
Xidorn Quan
455dffc919 Avoid random python address to be added to generated files 2017-07-13 09:06:35 +10:00
Martin Robinson
e58e8ab42e Upgrade to the latest version of WebRender 2017-07-13 07:44:08 +10:00
bors-servo
5585ff2c44 Auto merge of #17692 - canaltinova:grid-pls, r=wafflespeanut
stylo: Fix grid-template serialization in grid shorthand

Because of some unnecessary checks, it wasn't able to serialize the '40px / none' value properly before. That will fix one failure on `test_value_storage.html`

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- 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/17692)
<!-- Reviewable:end -->
2017-07-12 14:38:14 -07:00
Nazım Can Altınova
8f12485d4b stylo: Fix grid-template serialization in grid shorthand
Because of some unnecessary checks, it wasn't able to serialize the '40px / none' value properly before.
2017-07-12 14:06:04 -07:00
Emilio Cobos Álvarez
dc28d6244c
Revert "Auto merge of #17633 - servo:rustup, r=nox"
This reverts commit 327e72aa14, reversing
changes made to eec51cdd57.
2017-07-12 23:00:07 +02:00
bors-servo
55c3e6ed87 Auto merge of #17691 - emilio:nondeter, r=Manishearth
stylo: Fix causes of non-determinism in gecko_properties.rs.

We should sort out all the different ways we have to get sides and all those
nasty loops, eventually...

Bug: 1380327
Reviewed-By: Manishearth
MozReview-Commit-ID: 4lAPEGeZaik

<!-- 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/17691)
<!-- Reviewable:end -->
2017-07-12 13:10:12 -07:00
Emilio Cobos Álvarez
c591df7012
stylo: Fix causes of non-determinism in gecko_properties.rs.
We should sort out all the different ways we have to get sides and all those
nasty loops, eventually...

Bug: 1380327
Reviewed-By: Manishearth
MozReview-Commit-ID: 4lAPEGeZaik
2017-07-12 21:59:11 +02:00
bors-servo
4b6e79337e Auto merge of #17538 - jyc:selectorText, r=Manishearth
Implement CSSStyleRule.selectorText.

We parse when assigning using the namespaces of the stylesheet. It isn't
clear if the spec says to do that (Firefox doesn't support the setter at
all, Chrome does, Safari doesn't); the spec issue is here:
https://github.com/w3c/csswg-drafts/issues/1511

Also fix ToCss implementation of AttrSelectorOperator to not pad with
spaces, to conform with CSSOM. This means we have to update some unit
tests that expect operators with spaces around them in attribute
selectors to roundtrip.

See the "attribute selector" section of "Serializing Selectors" here:
https://drafts.csswg.org/cssom/#serializing-selectors

CSSStyleRule.selectorText is specified here:
https://drafts.csswg.org/cssom/#dom-cssstylerule-selectortext

<!-- 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 is part of a series to fix #17182

<!-- Either: -->
I am running this to identify what tests will fail; as the other PRs in the series are merged, I believe the tests that pass will change as well.

- [ ] 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/17538)
<!-- Reviewable:end -->
2017-07-12 11:08:35 -07:00
bors-servo
ee47fe1925 Auto merge of #17686 - paulrouget:rm_Title, r=jdm
remove the ability to request for the title

If we offer the ability to request info like these, we need to expose a lot of other getters, like url, loading state, favicon, …

It's up to the embedder to keep track of the state of a browser. So let's keep that consistent.

<!-- 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/17686)
<!-- Reviewable:end -->
2017-07-12 09:50:45 -07:00
bors-servo
482caa2b72 Auto merge of #17678 - asajeffrey:wpt-update-css-paint-api, r=jdm
Updated the copy of web-platform-tests/css-paint-api in /_mozilla/mozilla

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

Updated our local copy of the css-paint-api wpt test suite.

---
<!-- 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] 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/17678)
<!-- Reviewable:end -->
2017-07-12 08:15:05 -07:00
Alan Jeffrey
75819d533d Updated the copy of web-platform-tests/css-paint-api in /_mozilla/mozilla. 2017-07-12 09:58:58 -05:00
bors-servo
f9fad3d959 Auto merge of #17662 - servo:derive-all-the-things, r=emilio,SimonSapin
Improve derivation of ToCss again

<!-- 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/17662)
<!-- Reviewable:end -->
2017-07-12 04:56:31 -07:00
Anthony Ramine
d03bcfa8b3 Derive ToCss for TrackSize<L> 2017-07-12 12:36:20 +02:00
bors-servo
ce52c16a8f Auto merge of #17687 - upsuper:tree-pseudo, r=heycam
Support parsing ::-moz-tree-* pseudo-elements selector

This is the Servo side change of [bug 1348488](https://bugzilla.mozilla.org/show_bug.cgi?id=1348488).

<!-- 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/17687)
<!-- Reviewable:end -->
2017-07-12 03:35:37 -07:00
Xidorn Quan
97b2b95f99 Update generated files. 2017-07-12 20:33:15 +10:00
Xidorn Quan
441487cec2 Update test in selectors to match types for Gecko. 2017-07-12 20:33:13 +10:00