Commit graph

12512 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
32bf8093cc
Bug 1340334: Allow sibling hints in StoredRestyleHint, and handle them correctly. r=bholley
MozReview-Commit-ID: H6NuKsfjEdj
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-03-02 03:05:56 +01:00
Anthony Ramine
f8467a26c4 Kill serde_codegen 💣 2017-02-28 19:31:25 +01:00
Simon Sapin
288ef97055 Update cssparser for https://github.com/servo/rust-cssparser/pull/123 2017-02-28 17:16:36 +01:00
bors-servo
7ee6294922 Auto merge of #15761 - upsuper:shorthand, r=Manishearth
Have shorthand parsing functions not return Option for their longhands

<!-- 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/15761)
<!-- Reviewable:end -->
2017-02-27 23:08:33 -08:00
Xidorn Quan
e850d9572a Don't serialize currentcolor for border shorthand 2017-02-28 17:17:54 +11:00
bors-servo
b8b23fda5f Auto merge of #15760 - glennw:update-wr-deps, r=jdm
Update WR (mostly dep updates, clip-scroll 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/15760)
<!-- Reviewable:end -->
2017-02-27 20:40:00 -08:00
Xidorn Quan
f33b0b4ea3 Have shorthand parsing functions return values
Shorthands are responsible to set all its longhands to a proper value,
rather than returning None.

Fixes #15380.
2017-02-28 15:24:08 +11:00
Xidorn Quan
2e07ce7e84 Add get_initial_specified_value to many longhands 2017-02-28 15:20:34 +11:00
Glenn Watson
1601003fa0 Update WR (mostly dep updates, clip-scroll work). 2017-02-28 14:15:06 +10:00
Xidorn Quan
ce46e6d034 Remove raw_longhand helper function 2017-02-28 13:45:12 +11:00
Xidorn Quan
b24614f894 Resolve color:currentcolor during computing
The keyword value "currentcolor" should be preserved rather than being
replaced by the CSS-wide keyword "inherit" during parsing.
2017-02-28 13:44:50 +11:00
bors-servo
4b39431215 Auto merge of #15464 - KiChjang:pseudo-lang, r=emilio
Support lang pseudo class

Fixes #8219.

<!-- 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/15464)
<!-- Reviewable:end -->
2017-02-27 17:21:50 -08:00
Keith Yeung
7456bcf02b Support lang pseudo class 2017-02-27 17:21:20 -08:00
bors-servo
cecbc33c01 Auto merge of #15742 - emilio:stylo-orig-display, r=bzbarsky
stylo: Fix adjustment of the display property to save mOriginalDisplay properly.

r? @heycam

<!-- 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/15742)
<!-- Reviewable:end -->
2017-02-27 07:54:30 -08:00
Anthony Ramine
626e212fcb Update syn to 0.11
The last remnants of syn 0.10 are due to the WR stack still using
serde_codegen to build on stable, but that isn't actually used in
servo.
2017-02-27 14:46:50 +01:00
Anthony Ramine
7b334d84be Remove unused function match_ty_unwrap 2017-02-27 14:46:48 +01:00
bors-servo
b2539090fa Auto merge of #15613 - Varentsov:master, r=upsuper
fix {transform,perspective}-origin accepts (and ignores) anything for…

… their second part of value

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

<!-- Either: -->
- [X] There are tests for these changes OR

<!-- 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/15613)
<!-- Reviewable:end -->
2017-02-26 17:40:23 -08:00
bors-servo
3086b3d291 Auto merge of #15733 - absoludity:fix-background-serialization, r=upsuper
Background serialization of multiple values.

Similar to animation, the serialization of multiple backgrounds should
return the longhands serialization if there are an unequal number of
values for the required properties. This is part of #15398

<!-- 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: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/15733)
<!-- Reviewable:end -->
2017-02-26 16:54:11 -08:00
bors-servo
c025a794dd Auto merge of #15749 - glennw:update-wr-tiling, r=nox
Update WR (image tiling, inset box shadow fixes, new key api).

<!-- 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/15749)
<!-- Reviewable:end -->
2017-02-26 15:22:25 -08:00
Glenn Watson
64a9a45b2a Update WR (image tiling, inset box shadow fixes, new key api). 2017-02-27 08:54:28 +10:00
Simon Sapin
7c5ac06cd2 Merge pull request #15745 from servo/hoist
Cascade: skip duplicated properties before rather than after a virtual call
2017-02-26 23:09:44 +01:00
Simon Sapin
d007eef5c7 Remove some accessors for public fields.
(Maybe they date from this was a trait?)
2017-02-26 19:24:51 +01:00
Simon Sapin
e0c63efe01 Remove/don’t call no-op compute_font_hash method for stylo.
This removes a potentially-costly Arc::mut call.
2017-02-26 19:24:51 +01:00
Simon Sapin
4ad844f7bd Rename PropertyBitField to LonghandIdSet 2017-02-26 19:24:50 +01:00
Simon Sapin
c81ebca7df Move PropertyBitField out of its module 2017-02-26 19:02:55 +01:00
Simon Sapin
16a34ef6b6 Remove PropertyBitField::{get,set}_* methods 2017-02-26 19:02:54 +01:00
Simon Sapin
958c33a95f Remove unnecessary ref in some patterns 2017-02-26 19:02:54 +01:00
Simon Sapin
86562992da Cascade: skip duplicated properties before rather than after a virtual call. 2017-02-26 19:02:53 +01:00
Simon Sapin
0b4877590f Move deduplicate_property_declarations to PropertyDeclaration::deduplicate 2017-02-26 19:02:51 +01:00
Simon Sapin
066c5a01b2 Rewrite deduplicate_property_declarations to not require Mako. 2017-02-26 19:02:51 +01:00
Neck Varentsov
e165d1f885 fix {transform,perspective}-origin accepts (and ignores) anything for their second part of value 2017-02-26 20:54:14 +03:00
bors-servo
261df34ced Auto merge of #15649 - zimio:issue-15591-rewrite-ban-type-lint, r=Wafflespeanut
Rewrite the ban-type lint in Python

<!-- Please describe your changes on the following line: -->
Rewrite the ban-type lint in Python.

Question: Should the old ban-type lint written in rust be deleted?

---
<!-- 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 #15591

<!-- Either: -->
- [ x] There are tests for these changes

<!-- 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/15649)
<!-- Reviewable:end -->
2017-02-26 09:35:12 -08:00
Anthony Ramine
4eac29f100 Update ws to 0.6
This is exactly the same as 0.5.4, but without a semver violation.
2017-02-26 15:24:43 +01:00
Emilio Cobos Álvarez
f695789aaa
stylo: Fix adjustment of the display property to save mOriginalDisplay properly. 2017-02-26 13:23:18 +01:00
bors-servo
94e563e4d9 Auto merge of #15735 - servo:cssparserup, r=emilio
Update cssparser to 0.11

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

<s>Depends on https://github.com/servo/rust-cssparser/pull/122.</s>

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

<!-- 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/15735)
<!-- Reviewable:end -->
2017-02-26 02:19:32 -08:00
Simon Sapin
2f996e34f5 Use ascii_case_insensitive_phf_map! in PropertyId::parse 2017-02-26 11:10:33 +01:00
Simon Sapin
33ef6f78e5 Update to cssparser 0.11 2017-02-26 11:09:53 +01:00
Michael Nelson
f5af381f19 Fixes serialization of multiple transitions.
Similar to animations and backgrounds, multiple transitions should be
serialized as a list of shorthand values only if the number of values
for each longhand property is the same. Otherwise we default to the
longhand serialization. Fixes #15398
2017-02-26 20:48:18 +11:00
Simon Sapin
0f2d000a23 Borrow input to match_ignore_ascii_case!
In cssparser version 0.11, this macro will stop implicitly borrowing its
own input.
2017-02-26 10:40:09 +01:00
Simon Sapin
4fa3e8e82c Replace 1-variant match_ignore_ascii_case! with expect_ident_matching 2017-02-26 10:39:10 +01:00
Simon Sapin
ba6d791ff5 Define keyword values in ASCII lowercase
The match_ignore_ascii_case! macro does ASCII-case-insensitive matching.
In cssparser verion 0.11, it will require its patterns to be already
lower case.
2017-02-26 10:38:07 +01:00
Manish Goregaokar
3721b8b6a9 Disallow keyword values in min/max-size properties in the block direction 2017-02-25 23:26:21 -08:00
Michael Nelson
3a812b02a6 Background serialization of multiple values.
Similar to animation, the serialization of multiple backgrounds should
return the longhands serialization if there are an unequal number of
values for the required properties.
2017-02-26 07:37:06 +11:00
bors-servo
eb281531f8 Auto merge of #15730 - emilio:adjust-float, r=SimonSapin
style: Adjust float if the element is positioned per CSS 2.1 section 9.7

We've found crashes related to this in Gecko.

r? @simonsapin or @heycam

<!-- 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/15730)
<!-- Reviewable:end -->
2017-02-25 12:23:36 -08:00
Emilio Cobos Álvarez
6875c65d37
Bug 1341083: Implement dynamic restyling for display: contents. r=heycam
MozReview-Commit-ID: KimTU2j4V4p
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-02-25 19:58:56 +01:00
Jefry Lagrange
ebcb15d6f2 Rewrite the ban-type lint in Python
Delete old rust ban lint and move tests to python tidy

Fix ban lint regex and fix test
2017-02-25 15:56:06 +01:00
bors-servo
26de7c6bc4 Auto merge of #14740 - glasserc:extremum-length, r=Manishearth
Add support for keyword values for min-width and max-width

This is a follow-up to #14432 which got closed and can no longer be re-opened.

This PR aims to add support for keyword-values max-content, min-content, fit-content, and fill-available to the properties that use them, namely min-width, min-height, max-width, and max-height.

It's still untested because I still haven't figured out how to do that. I guess I should write or find some web page that uses these properties.

Refs #13821.

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #13821  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/14740)
<!-- Reviewable:end -->
2017-02-24 14:08:58 -08:00
Nazım Can Altınova
d7c227f614
Fix parsing of ClipRect 2017-02-25 00:10:43 +03:00
Ethan Glasser-Camp
dd4f331603 Add support for MaxLength
This builds on the ExtremumLength type from the previous commit.
2017-02-24 15:44:49 -05:00
Emilio Cobos Álvarez
e67f5c7585
style: Adjust float if the element is positioned per CSS 2.1 section 9.7
We've found crashes related to this in Gecko.
2017-02-24 21:28:56 +01:00