Commit graph

16155 commits

Author SHA1 Message Date
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
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
Hiroyuki Ikezoe
aa6433b6d6 Add a function that returns new rules by removing transition and animation level rules.
This will be used for additive animations and SMIL.
2017-03-24 10:39:44 +09:00
Hiroyuki Ikezoe
959f1c8360 Add a function that returns new rules by removing transition level rule.
This will be used for after-change-style of CSS Transition.
2017-03-24 09:57:00 +09:00
Hiroyuki Ikezoe
4c4b01954c Drop mut from pseudo_style for the argument of cascade_internal. 2017-03-24 09:56:56 +09:00
bors-servo
636f8ceb50 Auto merge of #15972 - jryans:ps-contain, r=emilio
Parsing / serialization for CSS contain

Adds parsing / serialization for CSS contain to the style package.

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15955
- [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/15972)
<!-- Reviewable:end -->
2017-03-23 13:23:51 -07:00
bors-servo
f00f3fa81c Auto merge of #16104 - Wafflespeanut:box-shadow-serialization, r=Wafflespeanut
Properly serialize <box-shadow>

Rebase of #15703, fixes #15203

<!-- 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/16104)
<!-- Reviewable:end -->
2017-03-23 10:57:03 -07:00
Nikita-04
ce7d63bbd5 Properly serialize <box-shadow> 2017-03-23 23:26:18 +05:30
Bobby Holley
e485365288 Bug 1348606 - Use a threadsafe array for counters. r=xidorn
MozReview-Commit-ID: KgTgcD5mGqr
2017-03-23 09:35:12 -07:00
J. Ryan Stinnett
535959f2a5 Parsing / serialization for CSS contain 2017-03-23 11:29:12 -05:00
Anthony Ramine
bba0be13dd Make ServoUrl::as_url return a &Url 2017-03-23 15:37:32 +01:00
Anthony Ramine
fb2c9e7bf5 Introduce fetch::methods::should_be_blocked_due_to_bad_port 2017-03-23 14:48:23 +01:00
Anthony Ramine
9894dca86c Avoid a useless clone in WebSocket::Constructor 2017-03-23 14:17:17 +01:00
bors-servo
9d0b481789 Auto merge of #16094 - emilio:simplify-float-pos, r=heycam,upsuper
Bug 1349885: stylo: Simplify computation of float and position.

<!-- 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/16094)
<!-- Reviewable:end -->
2017-03-23 05:35:28 -07:00
Emilio Cobos Álvarez
c8e0542059
Bug 1349885: stylo: Simplify computation of float and position. r=heycam,xidorn
MozReview-Commit-ID: Hh6391DXV5o
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-03-23 11:47:10 +01:00
bors-servo
c99289a928 Auto merge of #16073 - glennw:update-wr-glfns, r=mrobinson
Update WR (gl trait, scroll roots)

<!-- 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/16073)
<!-- Reviewable:end -->
2017-03-23 03:43:49 -07:00
Emilio Cobos Álvarez
ab2956a815
Bug 1349553: Account for negations of state-dependent selectors.
MozReview-Commit-ID: VyHuxh9q5N
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-03-23 09:51:24 +01:00
Emilio Cobos Álvarez
2b99c76052
Bug 1349553: Add a bit of debugging information to the preprocess_children stage.
MozReview-Commit-ID: 7zv62MRX8dE
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-03-23 09:51:22 +01:00
Glenn Watson
fe75382bcb Update WR (gl/es runtime table, scroll roots). 2017-03-23 14:32:03 +10:00
bors-servo
d4d8293f22 Auto merge of #16092 - bholley:specified_urls, r=emilio
Handle URLs more efficiently in stylo

Approved in https://bugzilla.mozilla.org/show_bug.cgi?id=1347435

<!-- 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/16092)
<!-- Reviewable:end -->
2017-03-22 19:13:07 -07:00
Bobby Holley
63e8367eee Don't resolve URLs at parse time for Stylo.
It's a bit unfortunate the use separate implementations of SpecifiedUrl for Servo
and Gecko, but they're different enough at this point that I don't think it really
makes sense to try to share everything. Splitting them out has some nice
simplifications as well.

I recognize that there's still some potential correctness issues for Servo using
the resolved URI in various places where the original URI may be the right thing,
but I've got too much on my plate to look into that for now.

MozReview-Commit-ID: BeDu93TQ4Ow
2017-03-22 19:11:30 -07:00
Bobby Holley
16e04046b5 Use a wrapper class to maintain the mBinding invariant and stop resolving during the cascade. 2017-03-22 18:10:47 -07:00
Boris Zbarsky
5a5a6cd876 Implement :required/:optional support for stylo.
Servo side of https://bugzilla.mozilla.org/show_bug.cgi?id=1349659
2017-03-22 20:20:17 -04:00
bors-servo
e0f1855c10 Auto merge of #16088 - mbrubeck:always-be-updating, r=emilio
Update parking_lot_core and smallvec

- [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 they update third-party code only

<!-- 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/16088)
<!-- Reviewable:end -->
2017-03-22 16:21:28 -07:00
bors-servo
405ab82868 Auto merge of #16085 - bzbarsky:better-numbering-of-pseudoclasses, r=emilio
Use less fragile and more readable numbering for ElementState.

<!-- 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: -->
- [X] `./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 it's just cleanup preliminary to another change I'm working on.

<!-- 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/16085)
<!-- Reviewable:end -->
2017-03-22 15:41:37 -07:00
bors-servo
851cef4a2b Auto merge of #16083 - MortimerGoro:display_raf_check, r=emilio
Fix WebVR data race condition when calling GetFrameData outside of VRDisplay.requestAnimationFrame callback

<!-- Please describe your changes on the following line: -->
Fix WebVR data race condition when calling GetFrameData outside of VRDisplay.requestAnimationFrame callback. Fixes a possible deadlock during the interval when the requestAnimationFrame is moved from window to VRDisplay.

---
<!-- 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
- [ ] These changes fix #__ (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/16083)
<!-- Reviewable:end -->
2017-03-22 15:03:04 -07:00