Commit graph

393 commits

Author SHA1 Message Date
bors-servo
9208b8e214 Auto merge of #11768 - achals:blob-string, r=Ms2ger
Update Blob::{new, new_inherited} to take Strings

<!-- 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 #11762.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because no logic changes, only interface 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11768)
<!-- Reviewable:end -->
2016-06-17 09:52:38 -05:00
Achal Shah
af325a9a3a Update Blob::{new, new_inherited} to take Strings 2016-06-17 07:43:11 -07:00
Alexandrov Sergey
520f90c2ee Remove unused XHR method 2016-06-17 10:11:44 +03:00
Manish Goregaokar
9deecd793c
Review fixes 2016-06-11 11:49:40 +05:30
Manish Goregaokar
fd6f9bd411 Test fixes; update for changes in spec 2016-06-10 20:55:25 +05:30
Manish Goregaokar
bf99e73cb0 Re-add support for fetching chunks (and thus xhr download progress) 2016-06-10 20:53:40 +05:30
Manish Goregaokar
6e29b872d7 Test fixes:
- Hack to stop hitting unreachable on referer
 - add fetch_done to make sync work
 - Make datauris work by setting the response URI, spec bug
 - Allow for empty bodies
 - Make request bodies work (pass to http, fix fencepost in iter count)
2016-06-10 20:53:36 +05:30
Manish Goregaokar
8bcf54deb5 Use RequestInit instead of LoadData. Make code look like the spec. 2016-06-10 20:53:28 +05:30
Manish Goregaokar
5e49873af7 Hook XHR up to fetch 2016-06-10 20:53:23 +05:30
Manish Goregaokar
d4f428ad95 Abstractify the Listener abstractions further 2016-06-10 20:53:19 +05:30
Ms2ger
80fc666734 Move trim_http_whitespace to net_traits. 2016-06-07 14:20:08 +02:00
bors-servo
530b5a649e Auto merge of #11468 - rebstar6:refPol4, r=nox
Implement meta referrer policy delivery (3)

<!-- 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 #10311 (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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11468)
<!-- Reviewable:end -->
2016-06-02 21:51:10 -05:00
Rebecca
687d0cd7c3 Add meta-referrer support for documents 2016-06-02 21:48:09 -04:00
bors-servo
2be5f72113 Auto merge of #11522 - nox:root-ref, r=jdm
Remove all uses of &Root<T>

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11522)
<!-- Reviewable:end -->
2016-06-01 07:36:47 -05:00
Zhen Zhang
43ad4ba585 Add file backend support for Blob and related
Changes include:
- Add BlobImpl to Blob, and related caching mechanism
- Expose ResourceThreads to document_loader, workerglobalscope, worker, and global
- Fix encode_multipart_form_data
- Other small fixes to accommodate the above changes
2016-06-01 09:47:07 +08:00
Anthony Ramine
b45f1918d1 Remove JS::from_rooted 2016-05-31 14:43:58 +02:00
bors-servo
2f9796fa69 Auto merge of #11329 - c-rhodes:11320, r=jdm
Report use statements that use {} with only one entry

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 --faster` does not report any errors
- [X ] These changes fix #11320  (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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11329)
<!-- Reviewable:end -->
2016-05-27 07:11:17 -05:00
Cullen Rhodes
40acd24e8f Report use statements that use {} with only one entry 2016-05-27 10:18:44 +01:00
Anthony Ramine
34dfc28e98 Move mozbrowser_enabled to util::prefs 2016-05-27 00:55:04 +02:00
Anthony Ramine
cdc7bca944 Move DOMString back to script
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +02:00
Rahul Sharma
3766cd1673 adding interface for custom responses 2016-05-20 12:11:56 +05:30
Zhen Zhang
a51db4cfa8 Implement trait-based ResourceThreads and clean up related naming issues
Changes include:

- Introduce an IpcSend trait to abstract over a collection of IpcSenders
- Implement ResourceThreads collection to abstract the resource-related
  sub threads across the component
- Rename original ResourceThread and ControlMsg into an unifed CoreResource__
  to accommodate above changes and avoid confusions
2016-05-20 08:00:16 +08:00
Per Lundberg
2f7ed1d73e Removed unused imports
This fixes #11185.
2016-05-15 22:24:26 +03:00
Zhen Zhang
f43009333f Rewrite Blob constructor interface 2016-05-10 20:19:10 +08:00
Keith Yeung
33acb1937c Remove extraneous script_chan parameter from Trusted::new 2016-04-28 10:52:44 +02:00
bors-servo
21c1773115 Auto merge of #10838 - bd339:iss9551, r=KiChjang
Implement step 3 according to spec

Goes towards fixing #9551

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10838)
<!-- Reviewable:end -->
2016-04-27 00:16:08 -07:00
bd339
ac88c5e16b Implement step 3 according to spec 2016-04-27 07:45:38 +02:00
Ramana Venkata
f56bd3a6f3 Allow setting withCredentials in synchronous XMLHttpRequest
closes #10839
2016-04-26 17:08:39 +05:30
Rebecca
526525b835 Add referrer policy pass-through and referrer header logic
add pass-through from doc to http-loader for referrer_policy, ref_URL
add logic for setting referer header
add script pass-through for referrer
add unit tests for setting referer header
2016-04-25 16:41:06 -04:00
Simon Sapin
7932ab6ac2 Upgrade to rust-url 1.0 and hyper 0.9 2016-04-23 20:27:58 +02:00
Ravi Shankar
5e6f32a59b Propagating the load errors from network loader 2016-04-20 12:38:35 -04:00
Josh Matthews
dd5e28e0e6 Do not support XHR.responseXML in worker globals. Fixes #8931. 2016-04-13 13:56:07 -04:00
bors-servo
07304235cc Auto merge of #10502 - KiChjang:fix-open-url-base, r=Ms2ger
Add API base url method to global objects

This adds an `api_base_url` function to global objects, which fixes `open-url-base.htm` under XMLHttpRequest.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10502)
<!-- Reviewable:end -->
2016-04-11 17:57:02 +05:30
Keith Yeung
c75079eff3 Add API base url method to global objects 2016-04-11 07:49:31 -04:00
Nazım Can Altınova
d49a84c762 Replaced SendParam with BodyInit 2016-04-10 01:02:04 +03:00
Rahul Sharma
2caa9a2a76 refactors entities from script_thread into script_runtime 2016-04-06 12:46:49 +05:30
Eitan Mosenkis
ae56187d48 Allow XHR to fetch about: and data: URLs.
This was intended to fix #8015 but the tests are all still failing as of
this commit.
2016-04-01 16:15:54 -10:00
Josh Matthews
2cfedc7288 Report errors from ScriptPort trait methods. 2016-03-31 17:14:23 +02:00
Paul Rouget
dd08e904eb Disable cross origin check for mozbrowser-enabled top level pipelines 2016-03-28 10:29:31 +02:00
Shing Lyu
f55b0765d1 Bug 8830 - Implemented XMLHttpRequest.responseURL 2016-03-22 13:56:31 +08:00
Ms2ger
b1cd28e9c6 Store the encoding in the Document rather than its name. 2016-03-18 16:22:52 +01:00
Arpad Borsos
c880c97b1b rename deprecated utf16_units to encode_utf16 2016-03-07 16:14:04 +01:00
Chandler Abraham
7c3a8d3f5b swap w3c spec link for whatwg, removed user-agent from disallowed headers 2016-02-26 11:04:34 -05:00
Chandler Abraham
c375ad5e95 disallow restricted XMLHttpRequest header prefixes 2016-02-26 11:04:33 -05:00
Tim Neumann
fac4c31b42 implement XHR::SetRequestHeader Step 3 2016-02-23 15:22:37 +01:00
Tim Neumann
746f7dd29e move method from ByteString to module where it was used 2016-02-23 15:21:35 +01:00
Tim Neumann
3af3926d63 remove rarely used is_token method from ByteString 2016-02-23 15:21:35 +01:00
Ms2ger
2547fcb1e9 Remove an unused import from xmlhttprequest. 2016-02-23 13:59:02 +01:00
benshu
f2d4a7bbca Clean up of script timer code.
The code was split into the following two abstractions.
 - OneshotTimers can be used to schedule arbitrary oneshot timers, such
   as XHR-Timeouts.
 - JsTimers (`setTimeout` and `setInterval`) which use OneshotTimers to
   schedule individual callbacks.

With this change the implementation (of JsTimers in particular) is in
much closer alignment with the specification.
2016-02-20 22:43:16 +01:00
bors-servo
94d28bfecf Auto merge of #9700 - servo:xhr-to-owned, r=KiChjang
Avoid some spurious string copies in XHR.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9700)
<!-- Reviewable:end -->
2016-02-19 22:23:35 +05:30