Commit graph

13107 commits

Author SHA1 Message Date
Cameron McCormack
f3dcef8c81 style: Add an Atom::from_addrefed function. 2017-04-05 17:39:26 +08:00
bors-servo
1071c3339f Auto merge of #16126 - ferjm:issue-14520-block-media-csv, r=nox
Block scripts with text/csv, audio/*, video/* and image/* mime types

This patch implements step 12 of the Main Fetch section of the Fetch API standard. It blocks the load of scripts with `text/csv`, `audio/*`, `video/*` and `image/*` mime types.

Credit for the logic of `should_block_mime_type` function should go to the author of #14770.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14520
- [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/16126)
<!-- Reviewable:end -->
2017-04-05 02:34:27 -05:00
bors-servo
8e2a1477ae Auto merge of #16268 - jdm:tmp, r=jdm
Basic MutationObserver interface stubs

Rebase and squash of https://github.com/servo/servo/pull/16190.

<!-- 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/16268)
<!-- Reviewable:end -->
2017-04-05 01:56:16 -05:00
Sumit
107ac9ab56 Implement basic interface for MutationObserver and MutationRecord. 2017-04-05 01:52:38 -04:00
Manish Goregaokar
5d6bc8177e stylo: Add support for xml:lang
MozReview-Commit-ID: E0GpyPKES3k
2017-04-04 21:21:28 -07:00
Manish Goregaokar
8dea66e6f1
stylo: Add support for <math> default language
MozReview-Commit-ID: LhhSBzYjow5
2017-04-04 21:17:06 -07:00
Manish Goregaokar
1c23296d8a
stylo: Add support for <table> color quirk
MozReview-Commit-ID: 56IKARwfbhw
2017-04-04 21:17:04 -07:00
Manish Goregaokar
0392e58a2f
stylo: Add support for text-align match-parent and the <th> -moz-center-or-inherit behavior
MozReview-Commit-ID: GEDM7JfJB8A
2017-04-04 21:16:57 -07:00
bors-servo
6a67688924 Auto merge of #16264 - glennw:update-wr-borders-and-clips, r=Manishearth
Update WR (border fast paths, clip interfaces).

<!-- 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/16264)
<!-- Reviewable:end -->
2017-04-04 20:35:19 -05:00
Glenn Watson
2fceb6e009 Update WR (more border fast paths, clip interface changes). 2017-04-05 10:50:06 +10:00
Martin Robinson
39600f9f4e Update to support new clipping coordinates change 2017-04-05 10:45:31 +10:00
Hiroyuki Ikezoe
ec40d1db91 Make AnimationValue::from_declaration return computed CSS variable.
In Gecko, we resolve CSS variables when we generate keyframes for each
animations (i.e. when we create script animations, when we create/update CSS
animations). AnimationValue::from_declaration is only called in both cases.
2017-04-05 09:09:13 +09:00
bors-servo
8d8fea0b4b Auto merge of #16234 - mckaymatt:as_void_ptr_helper_method_15252, r=jdm
Add as_void_ptr helper method to &T

<!-- Please describe your changes on the following line: -->
r? @jdm
issue https://github.com/servo/servo/issues/15252
The primary goal of this PR is to add add a generic trait method that returns a void ptr.

In addition to that change, I made the casting explicit in `components/script/dom/bindings/callback.rs`  and `components/script/dom/promise.rs`. I did not use the new trait method because `AddRawValueRoot` is not looking for a `c_void`. It's looking for `std::os::raw::c_char`.
```rust
pub fn AddRawValueRoot(cx: *mut JSContext, vp: *mut Value,
                                          name: *const ::std::os::raw::c_char) -> bool;
```
So I replace the `as *const _ ` with a more specific cast.

---
<!-- 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 #15252

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because
 This seems like code cleanup. It shouldn't change 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/16234)
<!-- Reviewable:end -->
2017-04-04 18:12:31 -05:00
mckaymatt
63f9ad022f Add way to get c_void ptr or c_char from caller 2017-04-04 16:46:52 -04:00
bors-servo
8747c4e04c Auto merge of #16242 - pyfisch:transform-one, r=emilio
Implement serialization for transform functions.

Preserve more information from transform function parsing.
Preserve angle unit while parsing.
Simplify SpecifiedMatrix.
Use the write! macro for formatting with a helper called Css.
Implement ToCss for &T if T implements ToCss.
Add some tests and update others.

closes #15194

<!-- 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
- [x] These changes fix #15194 (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/16242)
<!-- Reviewable:end -->
2017-04-04 15:30:23 -05:00
bors-servo
41e712786e Auto merge of #16252 - glennw:update-wr-gra, r=emilio
Update WR (gradient features).

<!-- 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/16252)
<!-- Reviewable:end -->
2017-04-04 14:41:41 -05:00
Glenn Watson
aea7d46b91 Update WR (gradient features). 2017-04-05 05:40:29 +10:00
Pyfisch
480f59c880 Implement serialization for transform functions.
Preserve more information from transform function parsing.
Preserve angle unit while parsing.
Simplify SpecifiedMatrix.
Use the write! macro for formatting with a helper called Css.
Implement ToCss for &T if T implements ToCss.
Add some tests and update others.

closes #15194
2017-04-04 19:04:19 +02:00
bors-servo
5421d833de Auto merge of #16256 - nox:net, r=jdm
Another batch of net enhancements 🕶

<!-- 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/16256)
<!-- Reviewable:end -->
2017-04-04 06:25:33 -05:00
Anthony Ramine
a600a60a09 Use set_default_accept in websocket_loader 2017-04-04 13:17:19 +02:00
Anthony Ramine
901877da1a Introduce http_loader::set_default_accept 2017-04-04 13:17:18 +02:00
Anthony Ramine
4281205662 Update the steps in fetch_with_cors_cache 2017-04-04 13:17:17 +02:00
Anthony Ramine
053aaedb52 Properly set Accept-Language in websocket_loader 2017-04-04 12:53:08 +02:00
Anthony Ramine
fbd42bb4f8 Use cookie::from_cookie_string in websocket_loader 2017-04-04 12:50:25 +02:00
Hiroyuki Ikezoe
97e27ca3a7 Serialize baseline values correctly. 2017-04-04 11:10:48 +09:00
Hiroyuki Ikezoe
e37e170c50 Parse "first baseline" and "last baseline". 2017-04-04 11:10:23 +09:00
bors-servo
eee25e2313 Auto merge of #16250 - bholley:pseudo_repr, r=emilio
Don't use a HashMap for pseudo-element styles

Reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1335708

@bors-servo try

<!-- 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/16250)
<!-- Reviewable:end -->
2017-04-03 18:04:34 -05:00
bors-servo
806584da9a Auto merge of #16247 - servo:for_cssom, r=jdm
ParserContext::new_for_cssom is used for author origin, not user.

This probably doesn’t make any difference since the only thing we do with this origin is test whether it is user-agent (for internal properties), but this is more correct.

<!-- 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/16247)
<!-- Reviewable:end -->
2017-04-03 17:10:50 -05:00
Anthony Ramine
3485c8371e Pass http_state around in websocket_loader 2017-04-03 23:54:25 +02:00
Bobby Holley
3f0d022ba2 Use a more compact representation to store eager pseudo-elements.
This means that ElementStyles only need a single word to store eager pseudos.

MozReview-Commit-ID: 5bDXlDweN46
2017-04-03 14:34:23 -07:00
bors-servo
b6b6608ca3 Auto merge of #16246 - servo:revert-per-doc, r=jdm
Revert to per-process shared lock for author-origin stylesheets

Fixes https://github.com/servo/servo/issues/16097
Reopens https://github.com/servo/servo/issues/16027

<!-- 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/16246)
<!-- Reviewable:end -->
2017-04-03 16:16:07 -05:00
bors-servo
dc8ed0d740 Auto merge of #15562 - emilio:rule-mem-order, r=bholley
style: Tweak rule tree memory ordering.

I've commented on the ones that I think are the most tricky. Note that this code
is stress-tested in the style tests (tests/unit/style/rule_tree/bench.rs).

<!-- 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/15562)
<!-- Reviewable:end -->
2017-04-03 15:15:49 -05:00
Emilio Cobos Álvarez
1d94a68e54
style: Tweak rule tree memory ordering.
I've commented on the ones that I think are the most tricky. Note that this code
is stress-tested in the style tests (tests/unit/style/rule_tree/bench.rs).
2017-04-03 21:47:39 +02:00
Bobby Holley
1ff008caa3 Improve some ergonomics around pseudo-elements.
I think a lot of the current indirection predates the crate merge.

MozReview-Commit-ID: FM28dgZa5go
2017-04-03 12:35:14 -07:00
Simon Sapin
3ac0dd05cf ParserContext::new_for_cssom is used for author origin, not user.
This probably doesn’t make any difference since the only thing we do
with this origin is test whether it is user-agent (for internal properties),
but this is more correct.
2017-04-03 18:28:47 +02:00
Fernando Jiménez Moreno
29a56c4d1a Block scripts with text/csv, audio/*, video/* and image/* mime types 2017-04-03 18:25:15 +02:00
Simon Sapin
c8b5b4a9bb Revert to per-process shared lock for author-origin stylesheets
Fixes https://github.com/servo/servo/issues/16097
Reopens https://github.com/servo/servo/issues/16027
2017-04-03 18:08:20 +02:00
Anthony Ramine
1e91442d98 Don't share the SSL client between the private and public groups 2017-04-03 17:37:37 +02:00
bors-servo
c31ee6e300 Auto merge of #16214 - nox:net, r=emilio
Improve the net crate

<!-- 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/16214)
<!-- Reviewable:end -->
2017-04-03 07:47:38 -05:00
bors-servo
679b418937 Auto merge of #16241 - upsuper:bug1352763-bug1352025, r=Manishearth,emilio
Stop passing url as string into Servo side

This is the Servo side changes of [bug 1352763](https://bugzilla.mozilla.org/show_bug.cgi?id=1352763) and [bug 1352025](https://bugzilla.mozilla.org/show_bug.cgi?id=1352025) which have been reviewed on Bugzilla.
2017-04-03 07:05:42 -05:00
Xidorn Quan
35b638e50b Update binding files. 2017-04-03 22:02:58 +10:00
Xidorn Quan
3d483a986d Move DUMMY_URL_DATA to glue and use static to avoid shutdown leak. 2017-04-03 22:02:57 +10:00
Anthony Ramine
64ba597a3a Move Arc out of HttpState 2017-04-03 14:00:36 +02:00
Xidorn Quan
2628ebe612 Use final url for updating stylesheet from @import rule. 2017-04-03 21:57:17 +10:00
Xidorn Quan
37585309e9 Use a UrlExtraData type alias to unify url handling logic. 2017-04-03 21:57:16 +10:00
Xidorn Quan
a097a293b5 Pass CSS loader to Servo for insertRule. 2017-04-03 21:18:09 +10:00
Anthony Ramine
8683f4d43e Reuse HttpState in ResourceGroup 2017-04-03 12:47:35 +02:00
Anthony Ramine
016fee016b Move the HTTP connector to FetchContext 2017-04-03 12:47:33 +02:00
Anthony Ramine
7b16021a89 Make Response::url_list be a bare Vec<ServoUrl> 2017-04-03 12:47:28 +02:00
Anthony Ramine
28f1f669bc Update steps of main_fetch according to the Fetch spec 2017-04-03 12:39:13 +02:00