Commit graph

28547 commits

Author SHA1 Message Date
bors-servo
3629efba75 Auto merge of #17406 - Gankro:with_cap, r=jdm
use DisplayListBuilder::with_capacity

DO NOT MERGE until https://github.com/servo/webrender/pull/1399 has landed in Servo.

Previously webrender was reserving 1MB of space for each display list (empirically pages weighed between 100k and 10MB when I implemented this). This was problematic for gecko because they used webrender differently. This just brings Servo back to where it was.

<!-- 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/17406)
<!-- Reviewable:end -->
2017-07-24 09:02:50 -07:00
Alexis Beingessner
855b1fe6f1 use DisplayListBuilder::with_capacity 2017-07-24 11:47:38 -04:00
bors-servo
723b21b669 Auto merge of #17841 - ferjm:bug1380890.column, r=jdm
stylo: make GetRuleColumn report a 1-based value

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

- [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/17841)
<!-- Reviewable:end -->
2017-07-24 07:55:06 -07:00
Ehsan Akhgari
aeb2b8b098 stylo: Read mName as a raw nsIAtom* from NodeInfoInner. 2017-07-24 10:40:58 -04:00
Fernando Jiménez Moreno
5cabb0f86b stylo: make GetRuleColumn report a 1-based value 2017-07-24 15:28:02 +02:00
bors-servo
4f0821192c Auto merge of #17820 - servo:token-cache, r=emilio
Update cssparser to 0.18

Do not merge yet, depends on https://github.com/servo/rust-cssparser/pull/171.

<!-- 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/17820)
<!-- Reviewable:end -->
2017-07-24 06:27:00 -07:00
Cameron McCormack
6171b5c465 style: Don't clamp Opacity values when computing them for SMIL. 2017-07-24 20:47:34 +08:00
Cameron McCormack
c81d62d36f style: Record on a computed::Context whether we are computing a SMIL animated value. 2017-07-24 20:47:33 +08:00
bors-servo
9f412caab2 Auto merge of #17837 - emilio:assert-fix, r=hiikezoe
style: Avoid looking at descendant hints to check whether the element needs a restyle.

This makes us hit some assertions in Gecko.

<!-- 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/17837)
<!-- Reviewable:end -->
2017-07-24 04:49:08 -07:00
Emilio Cobos Álvarez
b4d26619d3
style: Improve the assertion message in restyle_kind(). 2017-07-24 12:13:19 +02:00
Emilio Cobos Álvarez
af2b429557
style: Avoid looking at descendant hints to check whether the element needs a restyle. 2017-07-24 12:12:08 +02:00
bors-servo
a56bd4663b Auto merge of #17835 - KiChjang:clearer-network-error, r=emilio
Make network error messages more specific

Instead of having a bogus "Network error" string, we extract the NetworkError struct from the Response and send it back to FetchResponseListener.

<!-- 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/17835)
<!-- Reviewable:end -->
2017-07-24 03:07:26 -07:00
Keith Yeung
19cf006d4f Make network error messages more specific 2017-07-24 02:52:10 -07:00
Simon Sapin
eb98ae6e04 Update cssparser to 0.18
https://github.com/servo/rust-cssparser/pull/171
2017-07-24 11:39:12 +02:00
bors-servo
30d6d6024b Auto merge of #17834 - emilio:animation-fc-crash, r=heycam
stylo: Fix the interaction of frame construction restyles with animation restyles.

Fixes bug 1383001.
2017-07-24 01:09:24 -07:00
Emilio Cobos Álvarez
6e3397b907
style: Remove outdated comments. 2017-07-24 10:07:39 +02:00
Emilio Cobos Álvarez
f2fe3facf3
style: Update has_current_styles_for_this_traversal to not look at animation hints in non-animation traversals.
MozReview-Commit-ID: 4bwwIGcoXqA
2017-07-24 10:05:48 +02:00
Emilio Cobos Álvarez
9d21f9e6ce
style: Remove (mostly) unused has_current_styles.
MozReview-Commit-ID: DV9HfvbUjBY
2017-07-24 10:05:37 +02:00
Emilio Cobos Álvarez
55d9151dd3
style: Minor reformatting.
MozReview-Commit-ID: KVCfX3LqccF
2017-07-24 10:05:26 +02:00
Emilio Cobos Álvarez
689ee54db3
stylo: Don't try to do an animation-only restyle if we're styling newly-inserted content.
It makes just no sense, and I'd rather not complicate the logic in the traversal
implementations, seems easy to just handle it here.

MozReview-Commit-ID: 3PnT2Jyta8g
2017-07-24 10:05:18 +02:00
Emilio Cobos Álvarez
9d0023873e
stylo: Improve the information the "styles not up-to-date" assertion gives back.
Always I end up debugging it I end up adding a bunch of printlns near it. This
should be clearer.

MozReview-Commit-ID: ITpfi9tXAw3
2017-07-24 10:05:10 +02:00
Emilio Cobos Álvarez
8f152563dd
stylo: Stop claiming to support unstyled children traversals for throttled animations.
The whole concept made me laugh a bit actually :)

MozReview-Commit-ID: 1KJrUYuaHxL
2017-07-24 10:04:55 +02:00
Brian Birtles
b34e331fa2 Only allow animation-timing-function in @keyframes
CSS animations used to erroneously indicate that 'animation-play-state'
is permitted in @keyframes. It is not and is non-sensical to allow it
there. This mistake was faithfully transferred into Servo code (although
we also make 'animation-timing-function' which is what the spec text
meant to say).

The spec has been updated[1] and so we should update the Servo code
accordingly.

[1] adeb3434c5
2017-07-24 14:40:31 +09:00
bors-servo
a47fde038e Auto merge of #17831 - birtles:property-priorities, r=heycam
Iterate through properties in priority order when computing keyframes

This is largely just a translation of Gecko's PropertyPriorityIterator[1] into rust with the exception that IDL sort order is only defined for shorthands since that's all we currently require.

[1] http://searchfox.org/mozilla-central/rev/3a3af33f513071ea829debdfbc628caebcdf6996/dom/animation/KeyframeUtils.cpp#151

---
<!-- 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 --stylo` does not report any errors
- [x] These changes fix (Gecko bug 1371493)[https://bugzilla.mozilla.org/show_bug.cgi?id=1371493].
- [x] There are tests for these changes OR

<!-- 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/17831)
<!-- Reviewable:end -->
2017-07-23 21:54:12 -07:00
Brian Birtles
8e7011da8a Iterate through properties in priority order when computing keyframes
This is largely just a translation of Gecko's
PropertyPriorityIterator[1] into rust with the exception that IDL sort
order is only defined for shorthands since that's all we currently
require.

[1] http://searchfox.org/mozilla-central/rev/3a3af33f513071ea829debdfbc628caebcdf6996/dom/animation/KeyframeUtils.cpp#151
2017-07-24 13:50:18 +09:00
bors-servo
46ffcbaf7b Auto merge of #17814 - glennw:update-wr-text-decorations, r=emilio
Update WR (switch to new text-decorations API in WR).

This only makes use of the "Solid" text decoration type, which
matches the existing support. WR now supports dotted, dashed
and wavy text decorations, but supporting those will need some
extra work in Servo to pass through the correct values.

<!-- 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/17814)
<!-- Reviewable:end -->
2017-07-23 20:04:38 -07:00
Glenn Watson
dc82366f72 Update WR (switch to new text-decorations API in WR).
This only makes use of the "Solid" text decoration type, which
matches the existing support. WR now supports dotted, dashed
and wavy text decorations, but supporting those will need some
extra work in Servo to pass through the correct values.
2017-07-24 13:02:21 +10:00
bors-servo
104c79dbf2 Auto merge of #17829 - emilio:visited-nit, r=Manishearth
style: Mention when visited styles may be disabled.

<!-- 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/17829)
<!-- Reviewable:end -->
2017-07-23 15:06:44 -07:00
Emilio Cobos Álvarez
533ea86bab
style: Mention when visited styles may be disabled. 2017-07-24 00:04:45 +02:00
bors-servo
2241d5879e Auto merge of #17828 - emilio:visited-now, r=Manishearth
stylo: Visited link fixes.

Straight from https://bugzilla.mozilla.org/show_bug.cgi?id=1383307

<!-- 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/17828)
<!-- Reviewable:end -->
2017-07-23 13:46:43 -07:00
Emilio Cobos Álvarez
0e855ea8e3
stylo: Set the relevant link visited bit from servo.
MozReview-Commit-ID: 3MCYLp7HaAs
2017-07-23 22:37:48 +02:00
Emilio Cobos Álvarez
9b2d96f7e7
stylo: Honor the relevant link visited pref.
MozReview-Commit-ID: D5NiEJUpONQ
2017-07-23 22:37:47 +02:00
Emilio Cobos Álvarez
04e855c38d
style: Fix relevant-link-visited logic in presence of nested links.
MozReview-Commit-ID: LIjpTAgrPBY
2017-07-23 22:12:47 +02:00
Emilio Cobos Álvarez
aea24fa81e
style: Update bindings. 2017-07-23 22:12:37 +02:00
bors-servo
548d65dc7a Auto merge of #17827 - cynicaldevil:fix-step-annotations, r=jdm
Update step annotations in script's prepare method

<!-- Please describe your changes on the following line: -->
The step annotations in the code were outdated, and did not match the spec: https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script

<!-- 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/17827)
<!-- Reviewable:end -->
2017-07-23 12:45:22 -07:00
Nikhil Shagrithaya
15ac245ae7 Update step annotations in script's prepare method 2017-07-24 00:20:07 +05:30
bors-servo
5b3bb04d4a Auto merge of #17826 - emilio:visited-not-yet, r=emilio
stylo: Remove the visited bit for now since it doesn't account for the pref.

I'll fix before landing the Gecko changes for bug 1383307, so this doesn't break
anything yet.
2017-07-23 05:53:47 -07:00
Emilio Cobos Álvarez
57a761f4ff
stylo: Remove the visited bit for now since it doesn't account for the pref.
I'll fix before landing the Gecko changes for bug 1383307, so this doesn't break
anything yet.
2017-07-23 14:51:39 +02:00
bors-servo
14b12eeb3b Auto merge of #17825 - emilio:is-visited, r=manishearth
style: Move the RELEVANT_LINK_VISITED flag to servo.

Bug: 1383307
Reviewed-by: Manishearth

<!-- 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/17825)
<!-- Reviewable:end -->
2017-07-23 04:15:39 -07:00
Emilio Cobos Álvarez
4e0492c5d1
style: Move the RELEVANT_LINK_VISITED flag to servo.
And kill one GetParentAllowServo call while at it, and some other dumbness...

Bug: 1383307
Reviewed-by: Manishearth
2017-07-23 05:22:18 +02:00
bors-servo
d0561e76df Auto merge of #17824 - emilio:debug-par-layout, r=stshine
layout: Make -Z show-parallel-layout show something useful again.

I broke this when we switched to rayon, but now rayon added support for getting the worker index there's no reason for not bringing it back to life.

<!-- 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/17824)
<!-- Reviewable:end -->
2017-07-22 17:50:21 -07:00
Emilio Cobos Álvarez
1c5d522742
layout: Make -Z show-parallel-layout show something useful again. 2017-07-23 01:47:47 +02:00
bors-servo
d8b3f9bc5c Auto merge of #17823 - servo:rustup, r=Manishearth
Upgrade to rustc 1.20.0-nightly (504328a31 2017-07-21)

and cargo 0.21.0-nightly (ffab51954 2017-07-18).

The latter adds support for the `[patch]` section of `Cargo.toml`:

http://doc.crates.io/manifest.html#the-patch-section
http://doc.crates.io/specifying-dependencies.html#overriding-dependencies

<!-- 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/17823)
<!-- Reviewable:end -->
2017-07-21 21:47:51 -07:00
Simon Sapin
9a186268bf Upgrade to rustc 1.20.0-nightly (504328a31 2017-07-21)
and cargo 0.21.0-nightly (ffab51954 2017-07-18).

The latter adds support for the `[patch]` section of `Cargo.toml`:

http://doc.crates.io/manifest.html#the-patch-section
http://doc.crates.io/specifying-dependencies.html#overriding-dependencies
2017-07-22 06:29:38 +02:00
bors-servo
e4ac067a9b Auto merge of #17819 - emilio:text-combined, r=xidorn
stylo: Set the NS_STYLE_IS_TEXT_COMBINED flag.

This should fix at least
layout/reftests/writing-mode/1135361-ruby-justify-1.html

<!-- 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/17819)
<!-- Reviewable:end -->
2017-07-21 17:30:05 -07:00
Emilio Cobos Álvarez
b576229567
stylo: Set the NS_STYLE_IS_TEXT_COMBINED flag.
This should fix at least
layout/reftests/writing-mode/1135361-ruby-justify-1.html
2017-07-22 02:29:36 +02:00
bors-servo
9b276565f8 Auto merge of #17822 - Manishearth:die-stylearc-die, r=bzbarsky
Remove last vestiges of stylearc

<!-- 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/17822)
<!-- Reviewable:end -->
2017-07-21 15:47:54 -07:00
Manish Goregaokar
01b1027365 Remove last vestiges of stylearc 2017-07-21 14:39:51 -07:00
bors-servo
76ad913870 Auto merge of #17634 - asajeffrey:canvas-image-css-style-value, r=jdm
Implement drawing an image from a CSS style value into a canvas

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

Implemented drawing a CSS style value into a canvas, which is needed for the Houdini CSS Paint API.

This PR is dependent on #17364.

---
<!-- 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 #17432.
- [X] These changes do not require tests because the existing CSS paint API wpt test cases test this behaviour.

<!-- 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/17634)
<!-- Reviewable:end -->
2017-07-21 14:39:47 -07:00
Alan Jeffrey
2318caf002 Implement drawing an image from a CSS style value into a canvas. 2017-07-21 16:39:11 -05:00