Commit graph

165 commits

Author SHA1 Message Date
Simon Sapin
15f5299fe5 servo: Merge #9840 - Update to rust-url 1.0 (from servo:url-1.0); r=asajeffrey
**Do not merge yet:** rust-url 1.0 is not published yet and may still get breaking changes. The goal of this PR for now is to demonstrate API usage.

Depends on:

* <s>https://github.com/servo/rust-url/pull/176</s>
* <s>https://github.com/alexcrichton/cookie-rs/pull/42</s>
* <s>https://github.com/hyperium/hyper/pull/740</s>
* https://github.com/cyderize/rust-websocket/pull/70
* https://github.com/jgraham/webdriver-rust/pull/28

Source-Repo: https://github.com/servo/servo
Source-Revision: 84ab7e9fe8f4a6528995eff3eb6e814cb724c364
2016-04-23 11:28:31 -07:00
Josh Matthews
39037852d3 servo: Merge #9942 - Moving the error handling out of network loader (from jdm:load_error); r=ms2ger
Rebase of #8851. Fixes #8678. Fixes #9944.

Source-Repo: https://github.com/servo/servo
Source-Revision: f051028ee8cd93168b1abe3742929d43d19cb002
2016-04-20 21:50:22 +05:01
Josh Matthews
6f092d5e23 servo: Merge #10573 - Do not support XHR.responseXML in worker globals. Fixes #8931 (from jdm:xhrintermittent); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 4f6331953e3d6cdb40e2c96c9119a0a3298026c1
2016-04-14 01:42:26 +05:01
Keith Yeung
6a39329a74 servo: Merge #10502 - Add API base url method to global objects (from KiChjang:fix-open-url-base); r=Ms2ger
This adds an `api_base_url` function to global objects, which fixes `open-url-base.htm` under XMLHttpRequest.

Source-Repo: https://github.com/servo/servo
Source-Revision: 07304235cc88c3bb823e072e31da2dadcf0ed1be
2016-04-11 17:28:02 +05:01
Nazım Can Altınova
441269f554 servo: Merge #10503 - Replaced SendParam with BodyInit (from canaltinova:master); r=KiChjang
Replaced SendParam with BodyInit. Fixes #9433 .

Source-Repo: https://github.com/servo/servo
Source-Revision: e10ab5ae532037de37295680ce38eca27e2f5b95
2016-04-10 03:09:08 +05:01
Rahul Sharma
2c5ce6248a servo: Merge #10342 - Refactors some entities from script_thread into script_runtime (from creativcoder:script-runtime-module); r=Ms2ger
Fixes #10271.

Source-Repo: https://github.com/servo/servo
Source-Revision: 883cde424b61f4a06d52da5448da0095503b29b8
2016-04-06 12:52:21 +05:01
Dongie Agnir
ac85db0c46 servo: Merge #9972 - Xhr data (from dagnir:xhr-data); r=KiChjang
Builds on existing work by @emosenkis.  Fixes #8015.

Source-Repo: https://github.com/servo/servo
Source-Revision: d35ae3beb73158ec4c9ab20b3361e948379a4c90
2016-04-03 20:16:36 +05:01
Josh Matthews
fcfe4f1b87 servo: Merge #10312 - Report errors from ScriptPort trait methods (from servo:ScriptPort); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 6056b16a7714c42e4ff67d2bccb27650d549eae4
2016-04-02 00:35:31 +05:01
Paul Rouget
4565542db1 servo: Merge #10068 - Disable cross origin check for mozbrowser-enabled top level pipelines (from paulrouget:disableXOriginCheck); r=jdm
Closes https://github.com/servo/servo/issues/9582

Source-Repo: https://github.com/servo/servo
Source-Revision: 37799a40251ae4df695d2257f57063c37d739329
2016-03-28 19:19:53 +05:01
Shing Lyu
4c4f671610 servo: Merge #9518 - Implemented XMLHttpRequest.responseURL (from shinglyu:responseurl); r=jdm
Resolves #8830

Source-Repo: https://github.com/servo/servo
Source-Revision: 50193e9119c567c2c511a53749ff188b9c7ec49e
2016-03-22 23:43:57 +05:01
Ms2ger
fb70f27034 servo: Merge #10079 - Implement encoding determination for external scripts (from servo:script-encoding); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 8e95f54501efd74007bb19009b6d2b7522872d57
2016-03-20 05:59:25 +05:01
Arpad Borsos
f6a11faa18 servo: Merge #9896 - rename deprecated utf16_units to encode_utf16 (from Swatinem:rename_utf16); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: e8aeebbac5584e19e7ee23f187cdd6cf0da5ecb9
2016-03-08 06:03:43 +05:01
Chandler Abraham
d0a763a23f servo: Merge #9768 - disallow restricted XMLHttpRequest header prefixes (from jdm:add_disallowed_prefixes); r=jdm
Rebased from #9376.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4a7d234510d5a5f6b2b960a84f70a7260e1fc0a9
2016-02-27 21:40:46 +05:01
Tim Neumann
c5717cc528 servo: Merge #9598 - Implement XHR::SetRequestHeader Step 3 (from TimNN:xhr-header-step-3); r=Ms2ger
Closes #9548.

Alternative implementation of #9595.

cc @timvandermeij

I'm not sure if a utility method on `ByteString` is the best place for this functionality, maybe a free function in XHR module would be more suitable.

Also where would be the correct place to add a test for this functionality (if required)?

Source-Repo: https://github.com/servo/servo
Source-Revision: 433232a7fffc3bd6bb830b4e1580e24801618fc1
2016-02-23 20:39:43 +05:01
Ms2ger
476b941de8 servo: Merge #9727 - Remove an unused import from xmlhttprequest (from Ms2ger:xhr-import); r=KiChjang
Source-Repo: https://github.com/servo/servo
Source-Revision: 90c7b78b12c772e4019c9724e0037b813eb8a555
2016-02-23 18:00:59 +05:01
benshu
bf2e0302a8 servo: Merge #8603 - Timers clean up (from benschulz:timers-clean-up); r=jdm
This PR splits the `ActiveTimers` abstraction into

 - `OneshotTimers` for scheduling "arbitrary" oneshot timers, such as XHR timeouts, and
 - `JsTimers`, based on `OneshotTimers`, for scheduling JS timers (`setTimeout`/`setInterval`).

The result is mich cleaner and the timer initialization steps now closely resemble the specification.

**Notes**
 - The second and third commit are strictly renames and code rearrangements.
 - I'm not particularily happy with the `OneshotTimerCallback` enum and its circular dependency with `XHRTimeoutCallback`, but I couldn't come up with anything better.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8f278109ce84aa482ccc0d25938970435fb6e536
2016-02-21 21:14:28 +05:01
Ms2ger
579a0be96b servo: Merge #9700 - Avoid some spurious string copies in XHR (from servo:xhr-to-owned); r=KiChjang
Source-Repo: https://github.com/servo/servo
Source-Revision: 94d28bfecf127c9245103ed18b4a3e046795a1d7
2016-02-19 21:54:35 +05:01
Daniel Robertson
0fdace7f89 servo: Merge #9684 - Add methods to move ByteStrings underlying bytes (from danlrobertson:i9655); r=KiChjang
Add methods to move the underlying `Vec<u8>` for `ByteString`.

I saw this as at least two methods. One to "move and replace with and empty Vec<u8> (`bytes`), and one to take ownership of the whole object (`own_bytes`). I typically also don't like adding methods with out unit tests. If you think they're unnecessary, just let me know.

As always, please let me know if you have any comments, critiques, or nits!

Fixes #9655

Source-Repo: https://github.com/servo/servo
Source-Revision: aae6525f7d23e0a1b2af0e77e7c9a91402e1f9e7
2016-02-19 16:52:14 +05:01
liviuba
8eda9c2d34 servo: Merge #9610 - Bypass GetResponseXML to better match spec (from liviuba:Fix-9553); r=KiChjang
Resolves https://github.com/servo/servo/issues/9553

Source-Repo: https://github.com/servo/servo
Source-Revision: 361bb24a4904eb8045779b7f79859dbd4970d02e
2016-02-19 15:10:59 +05:01
Ms2ger
de2a28770a servo: Merge #9603 - Store a pointer to the browsing context in the Document (from Ms2ger:document-bc); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: ee158cc65f117f8fa10c4b706ff4009c579c7775
2016-02-19 12:20:35 +05:01
Keith Yeung
c9c77641b5 servo: Merge #9383 - Clean up XHR API (from KiChjang:xhr-cleanup); r=Ms2ger
I've also added annotations about the steps that we're performing within each method.

Source-Repo: https://github.com/servo/servo
Source-Revision: 96d185359d78e82d2f41a56a1793f7e657c2d103
2016-02-19 01:56:18 +05:01
Kamil Muszyński
2dd126be8c servo: Merge #9683 - Issue #9561 continued - renamed *_thread_source to *_task_source (from kmuszyn:9561-more-thread-source-renamings); r=jdm
components/script/dom/bindings/global.rs modified -> all *_thread_source occurrences renamed to *_task_source to comply with spec

Source-Repo: https://github.com/servo/servo
Source-Revision: 63dc161b773775c6755a604ec04b81c0bc479bf3
2016-02-18 04:30:32 +05:01
Daniel Robertson
ada569a940 servo: Merge #9625 - Implement step 9 of XHR Open method (from danlrobertson:i9547); r=KiChjang
Implement step 9 of the [XMLHttpRequest Open](https://xhr.spec.whatwg.org/#dom-xmlhttprequest-open) method. Thanks to @KiChjang for all the help!

As always, comments and critiques are welcomed!

Fix: #9547
Source-Repo: https://github.com/servo/servo
Source-Revision: c388c83dcdab0f4c7c8026a9ba1a123e0b59fad9
2016-02-17 02:22:44 +05:01
Keith Yeung
51c879946d servo: Merge #9621 - Cache XHR JSON responses (from KiChjang:xhr-response-json); r=Ms2ger
Fixes #3919.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5ee5ce07baa10906a357bfb24e4f0c164bd36e26
2016-02-15 21:23:49 +05:01
Daniel Robertson
a3b68f074f servo: Merge #9629 - Implement Blob response for XMLHttpRequest: #9623 (from danlrobertson:i9623); r=KiChjang
My first attempt at implementing the Blob response for XMLHttpRequest. The expected result for the response `tests/wpt/web-platform-test/HMLHttpRequest/response-blob-data.htm` is also changed to `PASS`. Please let me know if you see any areas in which I can improve this PR!

Fixes #9623

Source-Repo: https://github.com/servo/servo
Source-Revision: e8ae7e47731eb20ea36dbc55deda84b664c3aab4
2016-02-15 08:24:27 +05:01
Ms2ger
2adcfc3685 servo: Merge #9581 - Stop importing XMLHttpRequestResponseType variants (from Ms2ger:xhr-enum); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: b9ec889c44f29bffe4a914afe630835853babeaa
2016-02-09 14:19:58 +05:01
Alexander Lopatin
6da1d8c042 servo: Merge #9543 - Fix #9508: Beautify our union enums constructors (from alopatindev:enums_constructors_codingstyle_fix); r=KiChjang
Solves #9508
@jdm Please review. Thanks!

Source-Repo: https://github.com/servo/servo
Source-Revision: 28ecb0bba3fa395ed56bb2448a21e02c3ff88c8b
2016-02-07 05:30:57 +05:01
Tim van der Meij
adc1f28d0f servo: Merge #9562 - Make step 3 of XHR's SetResponseType method match the specification (from timvandermeij:setresponsetype-spec); r=KiChjang
Fixes #9552.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2f52a168caa28fcbdcd84e31f093a866ac12955e
2016-02-07 02:46:31 +05:01
Ms2ger
e773edc74b servo: Merge #9536 - Remove a dead_code annotation from a live method (from Ms2ger:dead); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: b3bbea8be81f949e2af6e31cf67bcaaaeb8bd84b
2016-02-05 09:33:25 +05:01
Anthony Ramine
08f5c3da70 servo: Merge #9532 - Say farewell to in-tree HeapSizeOf (from nox:dedup-heapsize); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 2a6707ce58df27d93e865bffb6b44d396b810c99
2016-02-05 03:11:36 +05:01
St.Spyder
4d1734e744 servo: Merge #9354 - Update XMLHTTPRequest FetchBodyInit and related Impl (#9291) (from stspyder:master); r=KiChjang
Fixes #9291.

Source-Repo: https://github.com/servo/servo
Source-Revision: 55d8228ed6910c72b663dfb4f2b7d140e28a8364
2016-01-18 03:50:59 +05:01
Keith Yeung
a3e0520252 servo: Merge #9294 - Change all DOMStrings to USV strings for XHR (from KiChjang:xhr-usvstring); r=nox
This is in compliance with the new spec [here](https://xhr.spec.whatwg.org/#xmlhttprequest).

Source-Repo: https://github.com/servo/servo
Source-Revision: 7ae16c7ea3934dcc7dbc90957aca415a22674fa8
2016-01-17 19:11:46 +05:01
Chad Kimes
9899b01934 servo: Merge #9255 - Remove global fields from DOM objects (from ckimes89:remove-globalfield); r=nox
Fixes #9227

Source-Repo: https://github.com/servo/servo
Source-Revision: 53c4a782a0906c487139d4b6f3c62d9eca3f9f17
2016-01-12 18:03:37 +05:01
rohan.prinja
d440ee6a41 servo: Merge #9201 - task -> thread (from ajnirp:8512-task-thread); r=jdm
for #8512

Source-Repo: https://github.com/servo/servo
Source-Revision: d3e2f94f2024f4735f836588ed11303a0abafdf8

--HG--
rename : servo/components/canvas/canvas_paint_task.rs => servo/components/canvas/canvas_paint_thread.rs
rename : servo/components/canvas/webgl_paint_task.rs => servo/components/canvas/webgl_paint_thread.rs
rename : servo/components/compositing/compositor_task.rs => servo/components/compositing/compositor_thread.rs
rename : servo/components/gfx/font_cache_task.rs => servo/components/gfx/font_cache_thread.rs
rename : servo/components/gfx/paint_task.rs => servo/components/gfx/paint_thread.rs
rename : servo/components/layout/layout_task.rs => servo/components/layout/layout_thread.rs
rename : servo/components/net/image_cache_task.rs => servo/components/net/image_cache_thread.rs
rename : servo/components/net/resource_task.rs => servo/components/net/resource_thread.rs
rename : servo/components/net/storage_task.rs => servo/components/net/storage_thread.rs
rename : servo/components/net_traits/image_cache_task.rs => servo/components/net_traits/image_cache_thread.rs
rename : servo/components/net_traits/storage_task.rs => servo/components/net_traits/storage_thread.rs
rename : servo/components/script/script_task.rs => servo/components/script/script_thread.rs
rename : servo/components/util/task.rs => servo/components/util/thread.rs
rename : servo/tests/unit/gfx/font_cache_task.rs => servo/tests/unit/gfx/font_cache_thread.rs
rename : servo/tests/unit/net/resource_task.rs => servo/tests/unit/net/resource_thread.rs
rename : servo/tests/unit/util/task.rs => servo/tests/unit/util/thread.rs
2016-01-10 15:20:04 +05:01
Johannes Linke
38405ee47e servo: Merge #9123 - Fix a bunch of clippy lints (from karyon:clippy_cleanup); r=Manishearth
This fixes about 130 clippy lints. Let me know if i should split up the commit.

I wasn't sure about some of the changes, especially map_or instead of map(...).unwrap_or(...) and if let instead of single arm match were not always a strict improvement in my opinion, but i'll leave that decision to the reviewer :)

There are about 150 lints left which i thought were clippy bugs or i didn't know how to fix.

cc @Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 9da739acefc7d1776bf727c8bf782eb79f241028
2016-01-03 08:47:34 +05:01
Josh Matthews
647c5be7dd servo: Merge #8190 - Implemementing context-based MIME type sniffing (from jdm:4138); r=eefriedman
This is a rebase of #7842 that also adds a test.
Fixes #4183.

@Yoric, how's this look to you?

Source-Repo: https://github.com/servo/servo
Source-Revision: af1690f3036bc329101bbd6f4e877672d58ca5e0
2015-12-31 20:44:10 +05:01
Mathieu Agopian
2ee894fb9d servo: Merge #9019 - Use Url.join instead of UrlParser.base_url(...).parse (#9002) (from magopian:9002-use-url.join); r=SimonSapin
Fix issue #9002

Source-Repo: https://github.com/servo/servo
Source-Revision: f9141ef2db693518fef676740f25abee3b938cac
2015-12-19 01:29:56 +05:01
Arthur Skobara
5eeb6aaa02 servo: Merge #8949 - Remove from Trusted::new an unnecessary argument (from askobara:refactoring-trusted-new); r=jdm
Fixes #8779

Source-Repo: https://github.com/servo/servo
Source-Revision: e493a0655e69c1472a53708d213fd102decc59cb
2015-12-13 03:24:40 +05:01
Ms2ger
5cc95f9ea6 servo: Merge #8946 - Remove unused imports (from Ms2ger:warnings); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 16de31c13ce1dd002bd25dfb5b51a2fd7079b14a
2015-12-12 12:18:39 +05:01
Corey Farwell
8c454ce7ad servo: Merge #8930 - Pass around event types as Atoms instead of Strings (from frewsxcv:event-type-atom); r=nox
`Event` internally stores the `type` as an `Atom`, and we're `String`s
everywhere, which can cause unnecessary allocations to occur since
they'll end up as `Atom`s anyways.

Source-Repo: https://github.com/servo/servo
Source-Revision: 99fd946130c9f06433b47c7f60241d5f7ad14a5b
2015-12-11 20:43:35 +05:01
Corey Farwell
4d1f25f2c5 servo: Merge #8926 - Prefer 'if let' over 'map() with side effects' (from frewsxcv:no-map); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 0abddae49d1fe0207469db6bfc84fe582b6ece9f
2015-12-11 06:24:36 +05:01
Tetsuharu OHZEKI
1541b677a4 servo: Merge #8922 - Fix warnings: Use Vec.extend_from_slice instead of Vec.push_all (from saneyuki:warning); r=mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: d01233a7b417c87b18d31f10709ed83141887b94
2015-12-11 04:28:58 +05:01
Jitendra Jain
4b4dc62d5a servo: Merge #8828 - M1503/M1504 : Support for missing XMLHttpRequestAPIs and Document response handling (from Ronak6892:docResp); r=eefriedman
Hi,
This is for NCSU Fall 15 project M1503 and M1504:
M1503: Integrate XML Parser (Step 3 of 4): Support for Document response handling and calling the appropriate parser.
M1504: Support for missing XMLHttpRequest APIs
https://github.com/servo/servo/wiki/Integrate-xml5ever
It includes changes to handle document response for XMLHttpRequest.
Kindly review.

Source-Repo: https://github.com/servo/servo
Source-Revision: bd8af8e2349c0cc379ba958ef322d41e1de1f668
2015-12-10 08:31:19 +05:01
Keith Yeung
59f2bc1dcd servo: Merge #8853 - Split fn script_chan into 5 different task channel fn (from KiChjang:generic-task-sources); r=jdm
Partial #7959.

Source-Repo: https://github.com/servo/servo
Source-Revision: ef000a458a52051b55b65e254ff9fe1a55835d04
2015-12-07 07:17:10 +05:01
Jigesh Mehta
f86eaa8884 servo: Merge #8812 - M1504: Implement basic support for withCredentials API (from jitendra29:support-withCredentials); r=jdm
The pull request includes the following task:

* Implemented basic network-level support by adding a member to LoadData that is used by http_loader.rs to conditionally exclude cookies from the HTTP request if the flag is false (default true)

Source-Repo: https://github.com/servo/servo
Source-Revision: 217a55a7854ec3a843bb94f50a8952c61d5fcc2a
2015-12-05 04:44:01 +05:01
Jitendra Jain
ee5807b6ad servo: Merge #8739 - M1504: Implement final charset support for text_response method (from jitendra29:finalMimeAndCharsetHelper); r=eefriedman
Following changes have been made:

* Added final_mime_type and final_charset helper methods to return the appropriate final mime/charset values
* Modified the text_response method to use the final_charset instead of directly using the response charset

Source-Repo: https://github.com/servo/servo
Source-Revision: 6ec454b7f5926d84099930292ebdcbc8f6d5e89c
2015-12-03 11:58:19 +05:01
Alan Jeffrey
f8093754b7 servo: Merge #8477 - Opaque DOMString (from asajeffrey:opaque-domstring); r=asajeffrey
This patch makes DOMString an opaque wrapper round String (currently it's a transparent wrapper).

The changes are:

* Replacing DOMString(foo) by DOMString::from(foo).
* Replacing foo.0 by String::from(foo).
* Adding functions clear, push_str and extend for in-place mutation of DOMStrings.
* Replacing DOMString by String in other threads (devtools, storage and filereader).
* Making DOMString implement !Send.
* Removing the pub attribute from the contents of DOMString.

This enables experimenting with other string representations in the DOM.

Source-Repo: https://github.com/servo/servo
Source-Revision: 62acdd303b78951885c2c90747b31f318907d6c9
2015-11-13 06:48:30 +05:01
Ms2ger
3890fca29d servo: Merge #8428 - Update js (from Ms2ger:conversions); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: b40882093a306032d38ad02e30f0095e0a49ec21
2015-11-13 00:44:52 +05:01
Ravi Shankar
5145b0d710 servo: Merge #7844 - Cancelable network requests! (from Wafflespeanut:requests); r=jdm
fixes #4974

Source-Repo: https://github.com/servo/servo
Source-Revision: 4848e37e2e0da2f83b1d7f0d231d59047012ff95
2015-11-12 18:30:58 +05:01
benshu
dd16b3c251 servo: Merge #8475 - Execute XHR timeout callbacks directly. (Fixes #8468.) (from benschulz:xhr-timeout-ordering2); r=jdm
This is a fix for #8468.

Currently XHR timeouts schedule themselves for execution via `CommonScriptMsg::RunnableMsg`s. This was necessary when these timeouts used a separate thread to schedule themselves. Now it's a potential race that should have been eliminated as part of #8168.

Source-Repo: https://github.com/servo/servo
Source-Revision: 49d48a8680003267f29ebf8cd47c244b07f4c4d2
2015-11-12 04:02:13 +05:01