Commit graph

10890 commits

Author SHA1 Message Date
bors-servo
9a7559fd82 Auto merge of #13802 - jeenalee:request-headers, r=jdm
Allow Request's Headers to be created with various objects

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

While Headers could be constructed correctly with an array or
object (open ended dictionary/MozMap), Request's Headers failed to be
created with non-Headers object (such as array or open ended
dictionary/MozMap).

Before, Request's Headers could be filled with only a Headers object in
Step 28. This has been expanded to accommodate array and open ended
dictionary.

Step 29 empties the Request's Headers list after it had been filled in
Step 28, thus resulting in an empty Headers object when it shouldn't
be. This step has been removed with a comment in this commit.

If a RequestInit Headers is _not_ given, but a RequestInfo Headers is
given, RequestInfo Headers should be used to construct Request
Headers. That step has been added after Step 31.

Corresponding wpt result is updated in this commit.
---

<!-- 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 #13758 (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/13802)

<!-- Reviewable:end -->
2016-11-09 15:04:10 -06:00
Nikhil Shagrithaya
4b2737606d implemented string-valued text-overflow 2016-11-10 00:00:21 +05:30
bors-servo
2601d8eb8b Auto merge of #14081 - anholt:webgl-readpix-negative-width, r=emilio
webgl: out-of-bounds readPixels() fixes

<!-- Please describe your changes on the following line: -->
Fix crashes in two WebGL readPixels() tests by adding framebuffer size validation.

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

<!-- 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/14081)
<!-- Reviewable:end -->
2016-11-09 10:03:42 -06:00
bors-servo
35f328d717 Auto merge of #14049 - Wafflespeanut:lon, r=SimonSapin
Add a generic type for sharing some CSS types

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

This would be useful for types such as `T(pub Option<U>)` or any type that's a mixture of two types (like `LengthOrFoo` for example). Well, it's a bit ugly, especially because we have to address the types as `Either::First` and `Either::Second` everywhere, but I don't have a brighter idea 😄

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

r? @SimonSapin (cc @Manishearth @emilio)

<!-- 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/14049)
<!-- Reviewable:end -->
2016-11-09 08:15:16 -06:00
bors-servo
99f1257210 Auto merge of #14145 - glennw:update-wr-remove-shaders, r=pcwalton
Update WR - stride support, remove deprecated / unused shaders.

<!-- 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/14145)
<!-- Reviewable:end -->
2016-11-09 04:50:45 -06:00
bors-servo
333c397f03 Auto merge of #14130 - stshine:construct-flexbox, r=pcwalton
layout: Mark flex items properly during construction

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

Set the flag of the fragment of children in a flex container according
to the direction of the container. The mark is done on the fragment
because flex item enstablish a stacking context when its z-index is
non-zero ,despite its `position' property.

Part of #14123.

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? @pcwalton

<!-- 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/14130)
<!-- Reviewable:end -->
2016-11-09 03:59:22 -06:00
bors-servo
28fbae17b7 Auto merge of #14132 - servo:debug-devtools, r=jdm
Derive Debug on devtools_traits types.

<!-- 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/14132)
<!-- Reviewable:end -->
2016-11-09 03:07:54 -06:00
Ravi Shankar
c4fc49c559 Make use of Either<A, B> for LengthOrNone 2016-11-09 13:04:26 +05:30
Ravi Shankar
5df250bc05 Add unit structs for representing keywords: auto, none, normal 2016-11-09 13:04:24 +05:30
Ravi Shankar
f36a573d2d Add an Either<A, B> type for sharing specified and computed CSS types 2016-11-09 13:04:17 +05:30
bors-servo
f1f97fb48e Auto merge of #14134 - frewsxcv:cargo-clippy, r=jdm
Fix `./mach clippy`.

Fixes https://github.com/servo/servo/issues/13117.

<!-- 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/14134)
<!-- Reviewable:end -->
2016-11-09 01:23:55 -06:00
bors-servo
3410242df8 Auto merge of #14133 - servo:debug-net-devtools, r=nox
Log debug messages when devtools is not notified about a HTTP request.

<!-- 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/14133)
<!-- Reviewable:end -->
2016-11-09 00:32:02 -06:00
bors-servo
9d1c1f434d Auto merge of #14138 - servo:fetch-context, r=KiChjang
Pass a borrowed fetch context to fetch().

<!-- 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/14138)
<!-- Reviewable:end -->
2016-11-08 23:40:38 -06:00
bors-servo
a203a26c12 Auto merge of #14137 - servo:debug-response, r=frewsxcv
Implement Debug for Response.

<!-- 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/14137)
<!-- Reviewable:end -->
2016-11-08 22:45:19 -06:00
Glenn Watson
1f00931045 Update WR - stride support, remove deprecated / unused shaders. 2016-11-09 13:35:14 +10:00
bors-servo
13009fe025 Auto merge of #14052 - asajeffrey:constellation-manages-script-thread-lifetime, r=jdm
Constellation manages script thread lifetime

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

Yet another step towards fixing #633...

At the moment, script threads are responsible for killing themselves when they have no more pipelines to manage. This is fine right now, because script threads have a root pipeline: once it is closed, everything is closed. It's not fine once we fix #633 because there's a race condition where the constellation could kill the last pipeline in a script thread, then open a new one in the same script thread.

We can't have the constellation block on the script thread, waiting to make sure a pipeline is created, since this could introduce deadlock. The easiest solution is to have the constellation manage the script thread lifetime: when the constellation discovers that a script thread is not managing any live pipelines, it closes the script thread, and updates its own state.

Most of the commits are from #14013, its just "Script thread lifetime is now managed by the constellation." (9ac6e4d2ba) that's new.

cc @jdm @ConnorGBrewster

---
<!-- 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 do not require tests because refactoring

<!-- 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/14052)
<!-- Reviewable:end -->
2016-11-08 20:09:21 -06:00
Alan Jeffrey
0e7ffafbe1 Script thread lifetime is now managed by the constellation. 2016-11-09 01:29:25 +00:00
Pu Xingyu
7f721e1f2c layout: Mark flex items properly during construction
Set the flag of the fragment of children in a flex container according
to the direction of the container. The mark is done on the fragment
because flex item enstablish a stacking context when its z-index is
non-zero ,despite its `position' property.
2016-11-09 08:24:12 +08:00
Ms2ger
8ab6f74592 Derive Debug on devtools_traits types. 2016-11-09 00:02:00 +01:00
bors-servo
5173a65521 Auto merge of #14119 - servo:jdm-patch-1, r=mbrubeck
Address common source of shutdown panics

Remove easy sources of intermittent failures during test shutdown. Might help #14118 and #14117.

<!-- 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/14119)
<!-- Reviewable:end -->
2016-11-08 12:23:56 -06:00
bors-servo
d1b7f19410 Auto merge of #14013 - asajeffrey:script-thread-no-root-document, r=jdm
Script thread with no root document

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

This PR removes the single root document from the script thread, and replaces it by a lookup table from `PipelineId`s to `Document`s. This is needed if we're going to share script threads, as per #633.

The last commit is the one that matters, the ones before are #13646.

cc @jdm @Ms2ger @ConnorGBrewster
---
<!-- 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 do not require tests because refactoring

<!-- 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/14013)
<!-- Reviewable:end -->
2016-11-08 11:31:33 -06:00
Raphael Nestler
3cc9f46ce5 Set redirect_mode in Request::from_init() 2016-11-08 18:20:47 +01:00
Raphael Nestler
d25b720c06 Add redirect_mode to RequestInit 2016-11-08 18:20:34 +01:00
Ms2ger
234b47e33e Pass a borrowed fetch context to fetch().
This will allow inspecting its state after fetching in unit tests.
2016-11-08 18:01:23 +01:00
Ms2ger
45153f61b6 Implement Debug for Response. 2016-11-08 18:00:24 +01:00
Alan Jeffrey
90e9c910f4 Replace script thread root browsing context by a collection of documents. 2016-11-08 10:48:58 -06:00
bors-servo
2e2eab069a Auto merge of #14125 - chenpighead:font-size-adjust#13875, r=Manishearth
#13875 - Implement parsing/serialization for font-size-adjust.

<!-- Please describe your changes on the following line: -->
 Implement parsing/serialization for font-size-adjust.
---
<!-- 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 #13875 (github issue number if applicable).

<!-- Either: -->
- [ ] 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/14125)
<!-- Reviewable:end -->
2016-11-08 10:39:32 -06:00
bors-servo
1153ca9841 Auto merge of #13909 - dati91:promise-queue, r=jdm
Webbluetooth Async behaviour

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

Note: depends on https://github.com/servo/servo/pull/13612

The current WBT communication is synchronous. With this, it should work properly (except the disconnect function, which will need some more work, because the current implementation differ from the spec).

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

<!-- 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/13909)

<!-- Reviewable:end -->
2016-11-08 09:05:12 -06:00
Corey Farwell
531289ebb7 Indicate items in doc comments as code-like. 2016-11-08 09:33:03 -05:00
Corey Farwell
04df787299 Fix ./mach clippy.
Fixes https://github.com/servo/servo/issues/13117.
2016-11-08 09:28:30 -05:00
bors-servo
8122d2c9da Auto merge of #14122 - glennw:update-wr-subpx, r=emilio
Update WR and shaders (initial subpixel AA work).

<!-- 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/14122)
<!-- Reviewable:end -->
2016-11-08 08:10:19 -06:00
Ms2ger
783f754d09 Log debug messages when devtools is not notified about a HTTP request. 2016-11-08 14:49:45 +01:00
Attila Dusnoki
e7e7c74c9e Webbluetooth Async behaviour 2016-11-08 13:27:56 +01:00
bors-servo
085c52dfbc Auto merge of #14129 - nox:anchor-origin, r=SimonSapin
Implement HTMLAnchorElement.origin

<!-- 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/14129)
<!-- Reviewable:end -->
2016-11-08 04:45:18 -06:00
Jeremy Chen
08c47c4091 #13875 - Implement parsing/serialization for font-size-adjust. 2016-11-08 17:54:03 +08:00
bors-servo
c4bd2027b7 Auto merge of #14111 - servo:pcwalton-turn-flexbox-on, r=emilio,jdm
style: Turn the CSS flexible box model on by default.

<!-- 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/14111)
<!-- Reviewable:end -->
2016-11-08 03:31:16 -06:00
Patrick Walton
05f738409e style: Turn the CSS flexible box model on by default.
See
https://groups.google.com/forum/#!topic/mozilla.dev.servo/MWBms2_BMJo
for discussion.
2016-11-08 10:13:48 +01:00
Anthony Ramine
d43d0fb18d Implement HTMLAnchorElement.origin 2016-11-08 09:54:46 +01:00
bors-servo
56b4065ee8 Auto merge of #14121 - upsuper:medialist, r=Wafflespeanut
Rename media_queries::MediaQueryList to MediaList

<!-- Please describe your changes on the following line: -->
`MediaList` is the name of the interface for "collection of media queries" used in [CSSOM spec](https://drafts.csswg.org/cssom/#the-medialist-interface), `MediaQueryList` happens to mean something different in [CSSOM View spec](https://drafts.csswg.org/cssom-view/#the-mediaquerylist-interface), which also leads to naming conflict in dom code. So I think it's better renaming it to `MediaList`.

---
<!-- 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
- [ ] 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/14121)
<!-- Reviewable:end -->
2016-11-08 01:46:40 -06:00
Glenn Watson
e9c6ee30a1 Update WR and shaders (initial subpixel AA work). 2016-11-08 16:46:25 +10:00
bors-servo
32a953f0ba Auto merge of #14106 - servo:deindent-http-network-fetch, r=nox
Deindent some of the code in http_network_fetch.

<!-- 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/14106)
<!-- Reviewable:end -->
2016-11-08 00:03:24 -06:00
Jeena Lee
bfd999f71e Fill r's headers with headers_copy when HeadersInit::Headers is given
Instead of filling request's headers whenever a `HeadersInit` is given, this
patch fills request's headers only when `HeadersInit` with a type of
`Headers` is given. Previously, the constructor tried to fill request's headers
with itself, causing Servo to crash.
2016-11-07 21:56:45 -08:00
bors-servo
4a7ea72429 Auto merge of #14114 - servo:fetch-unit-http, r=jdm
Start using fetch for the HTTP unit tests.

<!-- 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/14114)
<!-- Reviewable:end -->
2016-11-07 22:04:27 -06:00
Xidorn Quan
2733ec3bdc Rename media_queries::MediaQueryList to MediaList 2016-11-08 13:09:31 +11:00
bors-servo
ef5ca14283 Auto merge of #14084 - mrobinson:scroll_root_2, r=glennw
Don't promote all scrollable regions to stacking contexts

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

Don't promote all scrollable regions to stacking contexts

Instead annotate all flows with their owning ScrollRoots. When
processing the display list items into a flattened display list, we add
PushScrollRoot and PopScrollRoot to signal when scrolling regions start
and end. It is possible for content from different scrolling regions to
intersect and when they do, the stack of scrolling regions is
duplicated.  When these duplicated scrolling regions stacks reach
WebRender, it will scroll them in tandem.

The PushScrollRoot and PopScrollRoot items are currently represented as
StackingContexts in WebRender, but eventually these will be replaced
with special WebRender display items.

---
<!-- 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 #13529 and #13298. (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/14084)
<!-- Reviewable:end -->
2016-11-07 18:49:53 -06:00
bors-servo
d8ac5100e8 Auto merge of #14034 - bholley:more_concrete_types, r=emilio
incremental restyle: Use more concrete types in the style system

We need to hang both snapshots and restyle damage off of ElementData, and so we need them to be concrete to avoid infecting ElementData with the trait hierarchy.

<!-- 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/14034)
<!-- Reviewable:end -->
2016-11-07 16:31:10 -06:00
Josh Matthews
7ad9baca4e Silently ignore errors sending memory profiling data. 2016-11-07 15:34:16 -05:00
Josh Matthews
fd51bcb983 Silently ignore errors sending time profiling data. 2016-11-07 15:33:30 -05:00
Bobby Holley
a2c7a9d0fb Stop using associated types for the concrete TRestyleDamage implementation.
MozReview-Commit-ID: LfaZFCVlIb1
2016-11-07 11:10:48 -08:00
bors-servo
04e2af0b22 Auto merge of #14110 - servo:ejpbruel-ws, r=metajack
Replace rust-websocket with ws-rs in the debugger server.

<!-- 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/14110)
<!-- Reviewable:end -->
2016-11-07 12:47:58 -06:00