Commit graph

12928 commits

Author SHA1 Message Date
Fernando Jiménez Moreno
d919f55884 Update http_network_or_cache_fetch according to spec 2017-03-27 19:45:05 +02:00
bors-servo
d77fceaf24 Auto merge of #16145 - hiikezoe:animation-only-restyles, r=heycam
Animation only restyles

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

---
<!-- 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 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/16145)
<!-- Reviewable:end -->
2017-03-26 21:13:44 -07:00
bors-servo
c20bbb920c Auto merge of #16143 - emilio:lops, r=Manishearth
style: Be consistent with naming and serialization of "0" with LenghtOrPercentageOrNumber.

<!-- 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/16143)
<!-- Reviewable:end -->
2017-03-26 18:05:40 -07:00
bors-servo
447742b0a7 Auto merge of #16141 - emilio:keyword-from-ident, r=nox
style: Add <keyword>::from_ident helper to avoid tokenizing the same value multiple times.

We can use this to avoid tokenizing multiple times in some places, like #16127.

<!-- 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/16141)
<!-- Reviewable:end -->
2017-03-26 17:21:49 -07:00
bors-servo
7b64c3c419 Auto merge of #16142 - emilio:dumbness, r=canaltinova
style: Make PercentageOrNumber also reject negative percentages.

It always returns true, so this is just stupid.

<!-- 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/16142)
<!-- Reviewable:end -->
2017-03-26 16:42:48 -07:00
bors-servo
f4371dfa02 Auto merge of #16136 - streichgeorg:counter, r=emilio
to_css of counter-increment returns none when there are no properties.

<!-- Please describe your changes on the following line: -->
Changed to_css in style::properties::longhands::counter_increment returns "none" if there are no properties defined.

---
<!-- 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 #15977 (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/16136)
<!-- Reviewable:end -->
2017-03-26 14:56:23 -07:00
Hiroyuki Ikezoe
e4fe416c9d Process animation-only traversal.
All traversal processes are like this:

1. Traverse only elements that have this restyle hint (animation-only traversal)
   RESTYLE_CSS_ANIMATIONS is stripped off from restyle hints of the elements
2. Traverse all dirty elements (normal traversal)
3. Create a SequentialTask if we have updated CSS Animations properties in
   the normal traversal
4. Traverse elements that need to have updated animation style as a result of 3
   (second animation-only traversal)
2017-03-27 06:19:51 +09:00
Hiroyuki Ikezoe
be332fe5a4 Add flag that represents the traversal is only for animation-only restyle.
We will set the flag when the root node of the traversal has
has-animation-only-dirty-descendants flag or has animation restyle hints.
Also we will use this flag to detect whether we need to trigger CSS transitions
or not.
2017-03-27 06:19:51 +09:00
Hiroyuki Ikezoe
499d1c4117 Introduce TraversalFlags to represents target elements of the traversal we are about to do. 2017-03-27 06:19:51 +09:00
Hiroyuki Ikezoe
7c4f4d5be9 Introduce eRestyle_CSSAnimations.
RESTYLE_CSS_ANIMATIONS will be individually processed prior to other restyle
hints in a traversal.
2017-03-27 06:19:51 +09:00
Hiroyuki Ikezoe
6d5ee2e361 Introduce a closure to replace rule nodes.
We need a scope to restore rule_node_changed that were borrowed by the closure.
This closure function will be used for animation-only restyles as well.
2017-03-27 06:19:51 +09:00
Hiroyuki Ikezoe
661574f9df Add NODE_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO to represent that an element's descendant has animation. 2017-03-27 06:19:51 +09:00
Hiroyuki Ikezoe
da8387e1ac Update bindings. 2017-03-27 06:19:51 +09:00
bors-servo
3b79bc2582 Auto merge of #16113 - glennw:update-wr-opaque-opt, r=mrobinson
Update WR (opaque rect optimization, stacking context culling).

<!-- 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/16113)
<!-- Reviewable:end -->
2017-03-26 14:04:07 -07:00
Glenn Watson
3ca0f8a9ac Update WR (opaque rect optimization, stacking context culling).
Correct viewport test references

These references were using an incorrect value for the expected
container width. Now that WebRender is no longer clipping to stacking
context boundaries the rendered width is correct (100% of viewport
width = 240px).
2017-03-27 06:14:34 +10:00
streichgeorg
a700972cbb Issue #15977: Serialize counter-increment when there are no properties 2017-03-26 21:52:40 +02:00
bors-servo
d992442dc6 Auto merge of #16137 - nox:die-rustc-serialize-die, r=emilio
Replace use of rustc_serialize::base64 by base64

<!-- 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/16137)
<!-- Reviewable:end -->
2017-03-26 12:23:17 -07:00
bors-servo
7f2a4e01b1 Auto merge of #16139 - servo:rustup, r=emilio
Update rustc to 1.17.0-nightly (7dd4e2db7 2017-03-26)

<!-- 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/16139)
<!-- Reviewable:end -->
2017-03-26 11:36:51 -07:00
Emilio Cobos Álvarez
5ca16a844c
style: Be consistent with naming and serialization of "0" with LenghtOrPercentageOrNumber. 2017-03-26 20:10:50 +02:00
Emilio Cobos Álvarez
1ce9758f90
style: Simplify Number::parse_with_minimum. 2017-03-26 20:02:19 +02:00
Emilio Cobos Álvarez
372379428b
style: Make PercentageOrNumber also reject negative percentages. 2017-03-26 19:56:55 +02:00
bors-servo
1105100c3b Auto merge of #16131 - nox:tungstenite, r=jdm
Use NetworkConnector directly to account for replaced hosts

<!-- 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/16131)
<!-- Reviewable:end -->
2017-03-26 10:17:16 -07:00
Emilio Cobos Álvarez
a5436e9091
style: Add <keyword>::from_ident helper to avoid tokenizing the same value multiple times. 2017-03-26 18:12:02 +02:00
Anthony Ramine
8796a82b9f Put websocket_loader::init first in its module 2017-03-26 16:15:12 +02:00
Anthony Ramine
b096bf4806 Use Url::port instead of Url::port_or_known_default to set Host
AFAIK, if there is no explicit port in the request URL, there should be
no explicit port in the Host header.
2017-03-26 16:15:10 +02:00
Anthony Ramine
92c4a43946 Use NetworkConnector directly to account for replaced hosts
This let us remove a hack where we had to replace the host in the request URL.
2017-03-26 16:15:09 +02:00
Anthony Ramine
54d37d920c Remove some useless Option<T> wrappers from ServoUrl methods 2017-03-26 16:15:06 +02:00
Anthony Ramine
bc5c4fa892 Rework replace_hosts and host_replacement
They do less cloning now.
2017-03-26 16:14:22 +02:00
Anthony Ramine
c16234f7a7 Update rustc to 1.17.0-nightly (7dd4e2db7 2017-03-26) 2017-03-26 16:10:44 +02:00
Anthony Ramine
0ed4df28b5 Replace use of rustc_serialize::base64 by base64 2017-03-26 14:15:31 +02:00
bors-servo
fd8127b23b Auto merge of #15905 - mephisto41:add-border-gradient, r=emilio
Add gradient border support.

webrender add gradient border support in https://github.com/servo/webrender/pull/953. This pr add support in servo.

---
<!-- 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 should be covered by wpt

<!-- 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/15905)
<!-- Reviewable:end -->
2017-03-26 02:29:16 -07:00
Nazım Can Altınova
494238ab29
Add support for -moz-image-rect 2017-03-25 21:58:36 +03:00
Nazım Can Altınova
645971b387
Rename and move PercentageOrNumber to values 2017-03-25 21:58:32 +03:00
bors-servo
fe45283169 Auto merge of #16121 - froydnj:unused-property-mako-imports, r=cbrewster
remove unused `use` statements in mako helpers

These are no longer needed, according to `./mach build -d` and grep.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because compilation is sufficient

<!-- 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/16121)
<!-- Reviewable:end -->
2017-03-24 20:32:06 -07:00
bors-servo
1584bbd3ec Auto merge of #16122 - Manishearth:stylo-font-size, r=heycam
stylo: Handle font-size keywords correctly

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

<!-- 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/16122)
<!-- Reviewable:end -->
2017-03-24 12:30:10 -07:00
Boris Zbarsky
16252633bd Fix writing-mode display fixup to check the right condition.
It should be checking the value of the 'writing-mode' property, not the value of
the "writing mode" concept.  The latter is influenced by other properties like
'direction' and whatnot.  That was causing this code to convert inlines to
inline-blocks if they just had a different direction from their parent, which is
not correct
2017-03-24 14:21:51 -04:00
Manish Goregaokar
3139a90386 stylo: Special-case initial-computation of font-size
MozReview-Commit-ID: Ff6kt8RLChI
2017-03-24 11:10:35 -07:00
Manish Goregaokar
fddddc9711 stylo: Calculate font-size keywords based on base size
MozReview-Commit-ID: Ff6kt8RLChI
2017-03-24 10:54:06 -07:00
Manish Goregaokar
0aceddd47b stylo: Compute font-size between font-family and all late properties
MozReview-Commit-ID: Ff6kt8RLChI
2017-03-24 10:53:54 -07:00
bors-servo
6d9a552647 Auto merge of #16119 - BorisChiou:stylo/restylehint, r=upsuper
stylo: Bug 1349834 - Update RESTYLE_STYLE_ATTRIBUTE to sync Gecko change.

This is an interdependent patch for Bug 1349834. We remove eRestyle_SVGAttrAnimations from nsRestyleHint, so need to update the bindgen and the value of RESTYLE_STYLE_ATTRIBUTE.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1349834](https://bugzilla.mozilla.org/show_bug.cgi?id=1349834)
- [X] These changes do not require tests because we just remove an unused flag from 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/16119)
<!-- Reviewable:end -->
2017-03-24 09:20:54 -07:00
Nathan Froyd
5f49e38650 remove unused use statements in mako helpers
These are no longer needed, according to `./mach build -d` and grep.
2017-03-24 11:28:43 -04:00
bors-servo
0f2c71aa66 Auto merge of #16044 - bd339:iss15754, r=emilio
Make writing-mode affect computed display

<!-- Please describe your changes on the following line: -->
The first manual test-case in #15754 passes now, but the second test-case still renders "Text" horizontally, which is apparently because of servo's experimental support for writing-mode.

---
<!-- 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 #15754 (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/16044)
<!-- Reviewable:end -->
2017-03-24 08:05:36 -07:00
Boris Chiou
a03bde357c Bug 1349834 - Update RESTYLE_STYLE_ATTRIBUTE to sync Gecko change. 2017-03-24 22:36:09 +08:00
Anthony Ramine
28e4252a05 Remove some useless thread spawning in websocket_loader 2017-03-24 12:46:38 +01:00
Anthony Ramine
2b7fc15cdc Remove useless dependency on websocket from net_traits 2017-03-24 12:46:37 +01:00
Anthony Ramine
a6d22b1a35 Only pass the protocol in use in to establish a WS connection 2017-03-24 11:09:30 +01:00
bors-servo
189b0d9094 Auto merge of #16099 - nox:tungstenite, r=jdm
Properly follow the spec in WebSocket::Constructor

<!-- 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/16099)
<!-- Reviewable:end -->
2017-03-24 01:46:14 -07:00
Anthony Ramine
0bd54b904b Properly follow the spec in WebSocket::Constructor 2017-03-24 09:43:14 +01:00
bors-servo
30fc790df1 Auto merge of #16112 - bholley:mozappearance, r=Manishearth
Add 'appearance' property to Stylo (with '-webkit-appearance' alias) (take 2)

Replacement for #16110.

<!-- 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/16112)
<!-- Reviewable:end -->
2017-03-23 21:14:03 -07:00
Mats Palmgren
2d2b98917f Add 'appearance' property to Stylo (with '-webkit-appearance' alias) 2017-03-23 21:13:40 -07:00