Commit graph

25860 commits

Author SHA1 Message Date
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
Imanol Fernandez
0158b5b2af Implement Gamepad API 2017-04-12 15:43:14 +02:00
Emilio Cobos Álvarez
482740bb11
Bug 1325878: Rewrite insert_rule to avoid lock re-entrancy problems. r=xidorn
In particular, you can insertRule("@import url(\"already-loaded.css\");") and we
would try to clone the stylesheet, which without this change would borrow the
lock for reading.

MozReview-Commit-ID: 4jdNL5rngh7
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-12 21:24:53 +08:00
Emilio Cobos Álvarez
27ca9e0a46
Bug 1325878: Support deep-cloning of ServoMediaLists. r=xidorn
MozReview-Commit-ID: K7NFe1tKrAZ
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-12 21:24:52 +08:00
Emilio Cobos Álvarez
2999222436
Bug 1325878: Don't use nsMediaList for loading imports. r=xidorn
MozReview-Commit-ID: HR23bqZcmcA
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-12 21:24:51 +08:00
Emilio Cobos Álvarez
fbd4049e46
Bug 1325878: Create less hardcoded nsMediaList instances. r=xidorn
MozReview-Commit-ID: K6T3MM1ZrFb
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-12 21:24:25 +08:00
Emilio Cobos Álvarez
2483541fb9
Bug 1325878: Allow creating empty Servo MediaList. r=xidorn
MozReview-Commit-ID: H7owjPB8dRi
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-12 21:24:24 +08:00
bors-servo
4c851925fb Auto merge of #16198 - jonathandturner:fix_windows_gluten_keydown, r=jdm
Fix windows glutin keydown

<!-- Please describe your changes on the following line: -->
This fixes #12937 where keypresses arrive in a one-off fashion, effectively delaying each keystroke.  This PR is based heavily on @codec-abc's https://github.com/servo/servo/pull/16193 PR, with some further fixes and cleanup.  From the original PR comments:

> There are 2 types of events associated with keyboard: Key event (up or down) and Character Input.
>
> * A character is not necessary created one a key is pressed (like the home key).
> * A character may be created only using a combination of several key. For example, using a Qwerty International layout you have to type ` then e to get é. The first key press on ` will create no character.
> * In servo, we currently merge the 2 events together, meaning that we store a Character Input event in a field to fire a single event later on when we get a Key event.
>
> The order of events seems to be system dependent. For example, let's say that we type the A key on a Qwerty Layout. In Linux and MacOs we will get this:
>
> * Character Input for character A
> * Key down event with virtual key code of the key A
> * Key up event with virtual key code of the key A
>
> while in Windows we get:
>
> * Key down event with virtual key code of the key A
> * Character Input for character A
> * Key up event with virtual key code of the key A
>
> It seems that glutin make no attempt to reorder the event to make the order independent of the Operating System. I think it would be easier for Servo if it were handled by the library.

This fix is a stopgap for the current state of glutin.  We may want to look into a deeper fix in the future.  For now, this is hopefully adequate solution until a more permanent one can be found.

This is the last remaining issue for the Windows nightly blockers meta-issue https://github.com/servo/servo/issues/12125

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they are around Windows keyboard eventing.

<!-- 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/16198)
<!-- Reviewable:end -->
2017-04-12 08:09:50 -05:00
Nazım Can Altınova
d0619a7c5c
stylo: Implement shape-outside property 2017-04-12 16:06:03 +03:00
bors-servo
69eda6a60c Auto merge of #16063 - methyl:image-usemap-panics, r=nox
Avoid panics for empty or multibyte image usemap

<!-- Please describe your changes on the following line: -->
Some check were added to make sure we can call `split_at` with no risk of panics (when value is empty or the first char is multibyte).

---
<!-- 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 #15883 (github issue number if applicable).
- [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/16063)
<!-- Reviewable:end -->
2017-04-12 07:34:27 -05:00