Commit graph

16155 commits

Author SHA1 Message Date
Bobby Holley
f13ed246fd Use the bloom filter for child selectors.
This speeds up bloom-basic-ref.html by 4x on my machine.
2017-04-14 22:56:10 +08:00
bors-servo
f537fbd08f Auto merge of #16340 - brainlessdeveloper:fix-border-radius-serialization, r=Wafflespeanut
Fix -moz-outline-radius shorthand serialization

<!-- Please describe your changes on the following line: -->
These changes aim to solve #15169 correcting the `ToCss` implementation for `LonghandsToSerialize` for the `border-radius` shorthands. They also reduce redundant values like `1px 2px 1px 2px` to `1px 2px` to either sides of the slash.

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

<!-- Either: -->
- [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/16340)
<!-- Reviewable:end -->
2017-04-14 06:16:36 -05:00
Fausto Núñez Alberro
7bda39aa2e Fix serialization for -moz-outline-radius 2017-04-14 13:11:57 +02:00
bors-servo
5c56640508 Auto merge of #16454 - jryans:svg-parse-unitless, r=emilio
Stylo: SVG length parsing mode

Reviewed by @emilio in [bug 1329088](https://bugzilla.mozilla.org/show_bug.cgi?id=1329088).

r? @emilio

---
- [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/16454)
<!-- Reviewable:end -->
2017-04-14 04:49:29 -05:00
J. Ryan Stinnett
f6fe439d1e Update Stylo bindings 2017-04-14 17:22:17 +08:00
J. Ryan Stinnett
8144aa1163 Expose CSS length mode in Stylo glue
Add length mode args to Stylo glue functions so that Gecko can enable the
special SVG mode as needed.

MozReview-Commit-ID: 1luM13MFEXX
2017-04-14 17:22:16 +08:00
J. Ryan Stinnett
6069e44f02 SVG length parsing mode
SVG allows non-zero lengths to be accepted and assumes they are in px.  This
adds this length parsing mode to Servo.

MozReview-Commit-ID: Kxd3x64r9Ye
2017-04-14 17:22:16 +08:00
bors-servo
842ff5f978 Auto merge of #16440 - nox:webkit-gradients, r=emilio
Implement webkit-prefixed linear gradients

This is half of #15441.

<!-- 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/16440)
<!-- Reviewable:end -->
2017-04-14 04:13:21 -05:00
bors-servo
f7896fd80b Auto merge of #16435 - nox:parse-origin, r=emilio
Fix parsing of "center left" in parse_origin (fixes #15750)

<!-- 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/16435)
<!-- Reviewable:end -->
2017-04-14 03:16:51 -05:00
Anthony Ramine
ba3f18f485 Allow unitless zero when parsing gradients' center 2017-04-14 09:49:38 +02:00
bors-servo
1bf10a915c Auto merge of #16413 - heycam:all, r=emilio
implement the all shorthand

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

<!-- 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/16413)
<!-- Reviewable:end -->
2017-04-14 02:40:52 -05:00
Cameron McCormack
c488e7138b stylo: Update bindings. 2017-04-14 15:40:02 +08:00
Cameron McCormack
91e2119636 style: Support the all shorthand.
Fixes #15055.
2017-04-14 15:39:58 +08:00
Mantaroh Yoshinaga
799cbcb94c Make perspective origin animatable 2017-04-14 15:01:08 +09:00
bors-servo
ff568c0d1a Auto merge of #16398 - glennw:update-wr-elliptical-borders-aa, r=mrobinson
Update WR (new border code path).

This includes the new border code path for simple (solid) borders.
This gives much higher quality border rendering, including proper
support for elliptical border segments.

The quality on https://github.com/servo/servo is noticeably improved.

<!-- 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/16398)
<!-- Reviewable:end -->
2017-04-14 00:42:49 -05:00
Cameron McCormack
fb26ae7df5 stylo: Generate eCSSPropertyID_all as a const rather than an enum value. 2017-04-14 13:33:21 +08:00
Ravi Shankar
d0f537e325 Add parsing/serialization for grid-area 2017-04-14 09:51:24 +05:30
Ravi Shankar
0718eb3f44 Add parsing/serialization for grid-{row,column} 2017-04-14 09:51:05 +05:30
Emilio Cobos Álvarez
52ef1c9714
Bug 1356074: Implement keyword-valued media queries. r=heycam
MozReview-Commit-ID: 1oskYLM11us
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-14 12:09:07 +08:00
Emilio Cobos Álvarez
e32e7dd1c4
style: Remove useless deny(missing_docs).
MozReview-Commit-ID: FEvY3ZlJEnc
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-14 11:54:49 +08:00
bors-servo
605637fe1d Auto merge of #16365 - bradwerth:authoredStyle, r=heycam
Stylo: Add a bool property to PerDocumentStyleDataImpl, and pass the …

https://bugzilla.mozilla.org/show_bug.cgi?id=1341721
https://reviewboard.mozilla.org/r/121214/
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/16365)
<!-- Reviewable:end -->
2017-04-13 21:23:07 -05:00
bors-servo
8bd07ec586 Auto merge of #16421 - hiikezoe:font-variant-shorthand, r=heycam
Font variant shorthand

<!-- Please describe your changes on the following line: -->
This is a PR of https://bugzilla.mozilla.org/show_bug.cgi?id=1354876

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

<!-- Either: -->
- [X] These changes do not require tests because gecko has a bunch of test cases.

<!-- 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/16421)
<!-- Reviewable:end -->
2017-04-13 20:48:14 -05:00
Brad Werth
91a9fb06c7 Add an author_style_disabled flag to stylist.update, and associated structs.
MozReview-Commit-ID: FiXyEN4xVnU
2017-04-14 09:24:20 +08:00
bors-servo
94397ff0b4 Auto merge of #16394 - mckaymatt:line_num_offset__issue_15693, r=SimonSapin
Support line number offsets for inline stylesheets

<!-- Please describe your changes on the following line: -->
This allows accurate line numbers when reporting stylesheet errors.

@jdm This is going to require some effort to merge my changes with other recent changes to `ParserContext`. Because of that I would appreciate a quick sanity check before I put the time into performing the merge.
For example, should I store the `offset` as a u64, or should it be an Option?

---
<!-- 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 #15693 (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/16394)
<!-- Reviewable:end -->
2017-04-13 20:12:08 -05:00
Hiroyuki Ikezoe
60b160d867 Update bindings. 2017-04-14 08:50:17 +09:00
Hiroyuki Ikezoe
6ae5af17ce Make font-variant shorthand. 2017-04-14 08:50:16 +09:00
Hiroyuki Ikezoe
24919b3cf8 Implement font-variant shorthand. 2017-04-14 08:50:15 +09:00
Hiroyuki Ikezoe
1eb9a0865a Add font-variant-{alternates,east-asian,ligutures,numeric}. 2017-04-14 08:50:08 +09:00
mckaymatt
5d8cbd8e6a Support line number offsets for inline stylesheets 2017-04-13 19:36:49 -04:00
bors-servo
26c45275ff Auto merge of #16260 - MortimerGoro:gamepad, r=nox,larsbergstrom
Gamepad API implementation

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

Gamepad API implementation. Tested with HTC Vive and Daydream controllers ;)

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because : current gamepad tests are manual (https://github.com/w3c/web-platform-tests/tree/master/gamepad). There is a  open issue about the best way to test WebVR/Gamepad without real devices https://github.com/w3c/webvr/issues/187. We'll work on the testing suite & mock devices/data on a separate issue.

<!-- 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/16260)
<!-- Reviewable:end -->
2017-04-13 16:10:42 -05:00
Anthony Ramine
133b599a6f Implement webkit-prefixed linear gradients
This is half of https://github.com/servo/servo/issues/15441.
2017-04-13 18:57:48 +02:00
Anthony Ramine
e01529a647 Repeat less code in Gradient::parse_function 2017-04-13 18:57:47 +02:00
bors-servo
ebc61bb2c3 Auto merge of #16407 - jdm:style_panic, r=emilio
Allow loading multiple stylesheets for the same link element.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16399
- [x] There are tests for these changes

<!-- 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/16407)
<!-- Reviewable:end -->
2017-04-13 11:29:58 -05:00
Anthony Ramine
ff2cf2c62f Fix parsing of "center left" in parse_origin (fixes #15750) 2017-04-13 16:59:40 +02:00
Bobby Holley
297dc33a9f Store slow selector flags in a hashmap.
This reduces the flag setting overhead on a pessimal testcase from over a
second to ~20ms.
2017-04-13 21:52:47 +08:00
Bobby Holley
a32596131a Optimize LRUCache by using a VecDeque.
We also reverse the order, so that we don't need iter.rev().
2017-04-13 21:52:39 +08:00
bors-servo
a52d5fbced Auto merge of #16383 - Wafflespeanut:clean, r=emilio
Cleanup basic shape code

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

I began with isolating serialization stuff for `BorderRadius` to help #16340 and #16352, but ended up cleaning a lot of code in `basic_shape.rs` (it's just a cleanup, should be easy to review)

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

<!-- Either: -->
- [x] These changes do not require tests because it's a cleanup

<!-- 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/16383)
<!-- Reviewable:end -->
2017-04-13 05:32:30 -05:00
Ravi Shankar
76df67fc7b Add add_impls_for_keyword_enum macro for implementing necessary traits 2017-04-13 15:27:13 +05:30
bors-servo
3011f76139 Auto merge of #16424 - servo:assert-layout, r=bholley
style: relax assertions in dom::element when setting selector flags.

<!-- 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/16424)
<!-- Reviewable:end -->
2017-04-13 04:49:30 -05:00
Emilio Cobos Álvarez
39ab49823b
style: relax assertions in dom::element when setting selector flags.
Fixes #16409
2017-04-13 17:40:18 +08:00
bors-servo
54e691b2aa Auto merge of #16402 - heycam:csswide-keyword, r=emilio
style: Disallow all CSS-wide keywords in animation shorthand and counter-increment/counter-reset.

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

<!-- 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/16402)
<!-- Reviewable:end -->
2017-04-13 02:41:01 -05:00
bors-servo
b514168469 Auto merge of #16379 - bholley:quieter_stats, r=SimonSapin
Limit traversal statistics dumps to subtrees of 50 or more elements and add more values.

On Gecko, we get tons of console spam from 1-element traversals if we don't do this.

<!-- 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/16379)
<!-- Reviewable:end -->
2017-04-13 01:44:12 -05:00
Glenn Watson
2cdd82f78e Update WR (new border code path).
This includes the new border code path for simple (solid) borders.
This gives much higher quality border rendering, including proper
support for elliptical border segments.

The quality on https://github.com/servo/servo is noticeably improved.
2017-04-13 16:41:43 +10:00
Josh Matthews
3c3311b16a Allow loading multiple stylesheets for the same link element. 2017-04-13 16:02:17 +10:00
Manish Goregaokar
f506c6bcd1 stylo: Disable font metrics 2017-04-13 13:55:25 +08:00
Bobby Holley
687ea0ef9e Add more useful statistics to DUMP_STYLE_STATISTICS. 2017-04-13 13:43:05 +08:00
Bobby Holley
591733408d Limit traversal statistics dumps to subtrees of 50 or more elements.
On Gecko, we get tons of console spam from 1-element traversals if we
don't do this.
2017-04-13 13:41:52 +08:00
Ravi Shankar
6bd3469e28 Cleanup specified basic shape code 2017-04-13 11:03:40 +05:30
Ravi Shankar
26fda04888 Separate serialization function for BorderRadius 2017-04-13 11:03:39 +05:30
Cameron McCormack
95356c62d1 style: Disallow all CSS-wide keywords in animation shorthand and counter-increment/counter-reset.
Fixes #15054.
2017-04-13 13:20:15 +08:00