Commit graph

24502 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
c7ce2ff483
style: Make numbers keep track of whether they were specified as calc(). 2017-03-27 03:56:30 +02: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
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
bors-servo
c2d9f663af Auto merge of #16133 - canaltinova:image-rect, r=Manishearth
Add support for -moz-image-rect

Add support for -moz-image-rect
r=Manishearth

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

<!-- 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/16133)
<!-- Reviewable:end -->
2017-03-25 12:09:21 -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
bors-servo
d93151e8a3 Auto merge of #16123 - bzbarsky:writing-mode-confusion, r=emilio
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

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

---
<!-- 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 there are tons of tests on the Gecko side.

<!-- 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/16123)
<!-- Reviewable:end -->
2017-03-24 11:39:30 -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
bors-servo
686df84d77 Auto merge of #15871 - pcpeters:trial, r=jdm
update README

**NOTE: This PR is a fix to the README and did not update any code, so I haven't tested the changes.**

Hey @jdm, I used my time yesterday to set up Servo and get comfortable with git. I've made a minor change to the readme, just to help make the project more accessible to complete newcomers.

The line "./mach run [url]" can be confusing as there are many ways of thinking of a URL and some people don't think of including the protocol. Which is why I thought this was worth adding.

I also had trouble installing OpenSSL with the command provided. I had to disable the System Integrity protection on Mac OS and manually link the OpenSSL at reboot as brew force install didn’t work either. Can this also be noted?

<!-- 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/15871)
<!-- Reviewable:end -->
2017-03-24 07:24:43 -07:00
bors-servo
3f10d510bd Auto merge of #16116 - nox:tungstenite, r=Wafflespeanut
Remove some useless thread spawning in websocket_loader

<!-- 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/16116)
<!-- Reviewable:end -->
2017-03-24 04:48:07 -07: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
bors-servo
bfd2aab71e Auto merge of #16114 - nox:tungstenite, r=KiChjang
Only pass the protocol in use in to establish a WS connection

<!-- 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/16114)
<!-- Reviewable:end -->
2017-03-24 03:10:50 -07: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
bors-servo
089c71b587 Auto merge of #16111 - hiikezoe:after-change-style, r=emilio
Add functions for after-change style of CSS Transition

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

---
<!-- 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/16111)
<!-- Reviewable:end -->
2017-03-23 19:05:03 -07:00
Hiroyuki Ikezoe
6bbd8b09f4 Add a function to get after-change style for CSS Transition. 2017-03-24 10:39:50 +09:00
Hiroyuki Ikezoe
dde46c5c90 Make cascade_internal() reusable with rule nodes.
A new function, cascade_with_rules, takes StrongRuleNode
and computes cascading result values with the StrongRuleNode.
This new function will be used for getting after-change-style
for CSS Transitions.
2017-03-24 10:39:49 +09:00