Commit graph

25269 commits

Author SHA1 Message Date
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
bors-servo
ea20bd6f63 Auto merge of #16432 - bholley:faster_selector_flags, r=bholley
Coalesce duplicate selector flags and improve LRUCache.

https://bugzilla.mozilla.org/show_bug.cgi?id=1356148
2017-04-13 08:56:03 -05: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
bors-servo
f312891ace Auto merge of #16406 - Manishearth:stylo-hide-font-metrics, r=heycam
stylo: Disable font metrics

r=heycam https://bugzilla.mozilla.org/show_bug.cgi?id=1356105

<!-- 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/16406)
<!-- Reviewable:end -->
2017-04-13 01:09:49 -05: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
bors-servo
31ea4208cf Auto merge of #16396 - hiikezoe:animation-restyle-propagate-fix, r=heycam
Preserve restyle hints other than animation hints in propagate() duri…

…ng animation-only restyle.

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

This is PR of https://bugzilla.mozilla.org/show_bug.cgi?id=1354487

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

<!-- 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/16396)
<!-- Reviewable:end -->
2017-04-12 23:57:19 -05:00
bors-servo
9c0d8e44a0 Auto merge of #16258 - jdm:panic-at-the-ellipsis, r=pcwalton,stshine
Overwrite default RunInfo values with the first real ones encountered.

TextRunScanner::flush_clump_to_list compares the values in the RunInfo object against the ones determined from the current fragment, but these values can be arbitrary defaults that don't mean anything useful.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14783
- [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/16258)
<!-- Reviewable:end -->
2017-04-12 23:09:53 -05:00
bors-servo
2e82d98aff Auto merge of #16389 - aneeshusa:support-debian-for-mach-bootstrap, r=jdm
Allow bootstrapping on Debian

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

This is needed for servo/saltfs#631, since the Travis builders are detected as `'debian'` for some reason.

---
<!-- 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
- [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 the test will be in saltfs

<!-- 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/16389)
<!-- Reviewable:end -->
2017-04-12 22:22:33 -05:00
Hiroyuki Ikezoe
69efaa09c9 Preserve restyle hints other than animation hints in propagate() during animation-only restyle. 2017-04-13 11:57:53 +09:00
bors-servo
53c47acfc4 Auto merge of #16364 - emilio:dynamic-not, r=bholley
style: Fix dynamic changes of attributes when combined with :not.

This makes the dependency tracker properly recurse into simple selectors inside the current complex selector to find the appropriate dependencies.

We can't still remove the outer visitor because we need it for stuff like `:not(.foo + bar)`, but I plan to get rid of it in a followup as long as try comes back green.

<!-- 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/16364)
<!-- Reviewable:end -->
2017-04-12 21:39:15 -05:00
Emilio Cobos Álvarez
fcce61ee10
stylo: Fix restyle hints check.
It's clearly wrong to use intersects() there, since the coming check may be a
bigger hint.

MozReview-Commit-ID: 1YZ8OD0ajSz
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-13 09:37:02 +08:00
Emilio Cobos Álvarez
a0c2bdf775
style: Smoke-test the dependency tracking logic.
MozReview-Commit-ID: J5HWdS1H49s
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-13 09:37:01 +08:00
bors-servo
9d5dde2604 Auto merge of #16384 - canaltinova:shape-outside, r=Manishearth
stylo: Implement shape-outside property

shape-outside property implemented.
r=Manishearth in bugzilla

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

<!-- 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/16384)
<!-- Reviewable:end -->
2017-04-12 19:04:28 -05:00
Josh Matthews
a20d0bccef Overwrite default RunInfo values with the first real ones encountered. 2017-04-13 09:56:48 +10:00
Jonathan Turner
1e70d95724 Don't unwrap for unknown keys 2017-04-13 10:23:04 +12:00
Jonathan Turner
cf9b927461 Add back in last keydown fixes 2017-04-13 08:22:47 +12:00
Aneesh Agrawal
40c70bfb28 Allow bootstrapping on Debian 2017-04-12 15:36:06 -04:00
Dominik Boehi
ecab3cd796 Fix panic when font face name is not available 2017-04-12 20:36:27 +02:00
bors-servo
294f44eca0 Auto merge of #16382 - nox:calc-clamping, r=emilio
Don't reject out of bound calc() values at parsing-time

<!-- 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/16382)
<!-- Reviewable:end -->
2017-04-12 13:31:21 -05:00
bors-servo
eb058e20a9 Auto merge of #16370 - aneeshusa:enable-using-local-states-for-mach-bootstrap, r=jdm
Add env var for local saltfs root during bootstrap

<!-- Please describe your changes on the following line: -->
This enables using the environment variable `SERVO_SALTFS_ROOT` to use a local copy of the saltfs tree for `./mach bootstrap`. The immediate use case is to add a test for `./mach bootstrap` to saltfs itself, to ensure Salt changes or refactors don't break `./mach bootstrap`.

I tested this locally in an Ubuntu Trusty VM.

---
<!-- 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
- [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 the test will be added to saltfs

<!-- 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/16370)
<!-- Reviewable:end -->
2017-04-12 12:56:47 -05:00
bors-servo
43bd0cae0d Auto merge of #16360 - glennw:update-wr-borders, r=jdm
Update WR (gradients, batching, text run, border changes).

- Tidy and optimize the batching code.
- Support tiling / repeat for linear and radial gradients.
- Fix some edge cases of subpixel text AA.
- Add clip mask support to border shaders.
- Optimization to text run creation on CPU.
- Handle more box-shadow clipping cases.
- Fix a panic that could occur when window size is 0.
- Clip / scroll API improvements.

<!-- 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/16360)
<!-- Reviewable:end -->
2017-04-12 12:03:10 -05:00
Emilio Cobos Álvarez
9e33cd5643
style: Simplify dependency visitor, avoid tracking dependencies of nested complex selectors separately. 2017-04-13 01:01:00 +08:00
Emilio Cobos Álvarez
568fa4cc0d
style: Fix dynamic changes of attributes when combined with :not. 2017-04-13 01:00:59 +08:00
bors-servo
bc9d7863b6 Auto merge of #16348 - ferjm:issue-14824-unminify-js, r=jdm
Unminify JS and dump it to a file before executing it

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14824

<!-- 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/16348)
<!-- Reviewable:end -->
2017-04-12 11:11:23 -05:00
bors-servo
0912bd06d7 Auto merge of #16322 - tamamu:place-shorthand, r=upsuper
Implement alignment shorthand properties

<!-- Please describe your changes on the following line: -->
I implemented the shorthand properties, but it may includes some bugs.

Currently, `mach test-unit -p style` caught some errors (see #15954). I already tried `mach build-geckolib`, though there is no improvement. Please check my 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
- [x] These changes fix #15954

<!-- 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/16322)
<!-- Reviewable:end -->
2017-04-12 10:35:54 -05:00
bors-servo
bb66bf81d5 Auto merge of #16378 - emilio:media-fixes, r=upsuper
stylo: A bunch of media query fixes.

<!-- 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/16378)
<!-- Reviewable:end -->
2017-04-12 10:00:26 -05:00
Emilio Cobos Álvarez
733be9a679
stylo: Update bindings. 2017-04-12 22:27:47 +08:00
Emilio Cobos Álvarez
ac7bc414d9
Bug 1325878: Pass the MediaList down to Servo, making <style media> work. r=xidorn
MozReview-Commit-ID: BUCSQJs2CNI
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-12 22:27:45 +08:00
bors-servo
8298ee75c7 Auto merge of #16376 - Manishearth:stylo-mathml, r=emilio
stylo: Support mathml and background preshints

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

<!-- 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/16376)
<!-- Reviewable:end -->
2017-04-12 09:16:55 -05:00
Manish Goregaokar
df9cc1cf41 stylo: Support background presentation attribute 2017-04-12 22:16:23 +08:00
Manish Goregaokar
6e842c373c stylo: Support mathsize, width, and scriptminsize presentation attributes in MathML 2017-04-12 22:16:01 +08:00
Manish Goregaokar
1ea8175163 stylo: Support most MathML presentation attributes 2017-04-12 22:15:57 +08:00
Manish Goregaokar
2e22a006db stylo: Support -moz-script-size-multiplier, -moz-script-level, -moz-math-display 2017-04-12 22:15:49 +08:00