Commit graph

25860 commits

Author SHA1 Message Date
bors-servo
bf7c044955 Auto merge of #16272 - nox:net, r=jdm
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/16272)
<!-- Reviewable:end -->
2017-04-05 09:27:55 -05:00
bors-servo
c12b17d276 Auto merge of #15904 - sendilkumarn:image-area, r=jdm
making image element areas good at finding areas

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

<!-- 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/15904)
<!-- Reviewable:end -->
2017-04-05 08:49:22 -05:00
bors-servo
c2f3cf0205 Auto merge of #16262 - jdm:connection-pool, r=nox
Enable HTTP connection pooling

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15694
- [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/16262)
<!-- Reviewable:end -->
2017-04-05 08:09:23 -05:00
Anthony Ramine
e6cc88e5a2 Kill some commented-out code 2017-04-05 15:01:31 +02:00
Anthony Ramine
5313e00e3a Pass the url by value to websocket_loader::main_fetch 2017-04-05 14:46:52 +02:00
Anthony Ramine
fb86bfebf4 Introduce HstsList::switch_known_hsts_host_domain_url_to_https 2017-04-05 14:42:59 +02:00
Anthony Ramine
170bcfc03e Kill hsts::secure_url 2017-04-05 14:42:49 +02:00
Anthony Ramine
d2dc425336 Add spec links to the Request fields 2017-04-05 14:26:49 +02:00
bors-servo
a55cb8425d Auto merge of #16269 - heycam:atom-already-addrefed, r=upsuper
Add an Atom::from_addrefed function.

<!-- 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/16269)
<!-- Reviewable:end -->
2017-04-05 05:10:07 -05:00
Cameron McCormack
581cefccfe stylo: Don't leak the nsIAtom we get back from Gecko_GetXMLLangValue. 2017-04-05 17:39:40 +08:00
Cameron McCormack
f3dcef8c81 style: Add an Atom::from_addrefed function. 2017-04-05 17:39:26 +08:00
bors-servo
42f58503c0 Auto merge of #16169 - servo:stylo-heapsize, r=emilio
Remove heapsize for Stylo

It doesn’t seem to be used, and is causing compilation trouble for Gecko: https://bugzilla.mozilla.org/show_bug.cgi?id=1350581

<!-- 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/16169)
<!-- Reviewable:end -->
2017-04-05 03:59:26 -05: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
bors-servo
21979bf715 Auto merge of #16266 - Manishearth:stylo-nshtmlss, r=heycam
stylo: Support all extra style rules from nsHTMLStyleSheet

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

<!-- 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/16266)
<!-- Reviewable:end -->
2017-04-04 23:56:00 -05: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
Pu Xingyu
95ce2ac878 Inherit 'text-overflow' and 'overflow' in text fragment
This is an implementation detail that is necessary for 'text-overflow'
to work properly.
2017-04-05 11:04:30 +08: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
bors-servo
a7e18560e5 Auto merge of #16263 - hiikezoe:handle-css-variables-in-animations, r=Manishearth
Make AnimationValue::from_declaration return computed CSS variable.

This is a PR of https://bugzilla.mozilla.org/show_bug.cgi?id=1326131

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.

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

<!-- 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/16263)
<!-- Reviewable:end -->
2017-04-04 19:26:02 -05: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
Josh Matthews
6079dd4de7 Enable HTTP connection pooling. Retry stale connections indicated by connection reset errors. 2017-04-04 19:40:46 -04: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
SendilKumar N
31dafcc5f3 making image element areas good at finding areas
linting errors

replaced with map

fixes comments

moving to document

added test cases

linting and updating manifest

changing test cases

linting fixes

manifest update

linting fixes

splitting the test cases into two
2017-04-04 23:11:44 +08: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
bors-servo
5ef8a0a2f7 Auto merge of #16253 - hiikezoe:baseline-fix, r=Manishearth
Fix handling of baseline

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

---
<!-- 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] There are tests for these changes
There are a bunch of css reftests, but I am not sure how servo handles them. Let's see what happens. I guess I need to modify some metadata.

<!-- 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/16253)
<!-- Reviewable:end -->
2017-04-03 23:32:13 -05: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