Commit graph

413 commits

Author SHA1 Message Date
Ms2ger
ec5d08c887 Pass the Document's origin to its constructor.
CC #10963.
2016-12-23 11:15:46 +01:00
Alan Jeffrey
9be4fd56ce Removed util. 2016-12-14 18:04:37 -06:00
Anthony Ramine
1327ebd52f Remove HeapGCValue
It could be used to have mutable JSVal fields without GC barriers.
With the removal of that trait, MutHeap and MutNullableHeap can respectively
be replaced by MutJS and MutNullableJS.
2016-12-12 10:47:54 -10:00
Ms2ger
b8aab5d115 Remove some redundant code around XMLHttpRequest::document_response(). 2016-12-08 20:25:17 -10:00
Corey Farwell
449f6337d4 Rename Reflectable to DomObject.
Fixes https://github.com/servo/servo/issues/8473.
2016-12-08 08:50:35 -10:00
Ms2ger
61e8e2403a Remove a pointless match block in XMLHttpRequest::initiate_async_xhr. 2016-12-05 13:58:52 -10:00
Ms2ger
d6db049a7f Remove unused LoadData and LoadOrigin types. 2016-11-24 11:46:28 +01:00
bors-servo
ac6a2681ae Auto merge of #14274 - stshine:servo-url-index, r=emilio
Implement range index with the Position enum on ServoUrl

<!-- 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
- [ ] 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? @emilio

<!-- 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/14274)
<!-- Reviewable:end -->
2016-11-20 12:35:14 -06:00
Pu Xingyu
0818b44459 Implement range index with the Position enum on ServoUrl 2016-11-18 17:46:36 +08:00
Pu Xingyu
91f3d4f474 Remove redundant url clones
They are now redundant since now document.url() returns a struct rather
than a reference.
2016-11-18 12:39:22 +08:00
bors-servo
22aebdf5d4 Auto merge of #14246 - emilio:servo-url, r=SimonSapin
Urlmageddon

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

Still needs a bunch of code in net to be converted in order to get more
advantage of this for images and stuff, but meanwhile this should help quite a
bit with #13778.

Still wanted to get this in.

r? @SimonSapin

<!-- 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/14246)
<!-- Reviewable:end -->
2016-11-17 15:34:47 -06:00
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +01:00
bors-servo
f70fc6644d Auto merge of #14096 - fflorent:11485-make-dom-methods-taking-mut-JSContent-unsafe, r=nox
11485 make dom methods taking mut js content unsafe

This is a rebased version of PR #11595

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because: no code logic was changed

<!-- 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/14096)
<!-- Reviewable:end -->
2016-11-17 02:44:54 -06:00
Abelardo E. Mendoza
b372e7c98f script creates methods taking '*mut JSContext' unsafe
rebase + marked the necessary new code as unsafe
2016-11-14 11:06:17 +01:00
Anthony Ramine
15e8e92540 Reorganise ServoParser
Free-standing fonctions parse_html and friends are now static methods
on ServoParser, and the HTML and XML tokenizers have been moved to private
submodules.
2016-11-14 10:21:07 +01:00
Keith Yeung
72cb856e31 Properly implement TaskSource for NetworkingTaskSource 2016-11-11 14:50:42 -08:00
Corey Farwell
bf8752ac9e Update CORS naming from 'CORS' to 'Cors'.
As per:

https://aturon.github.io/style/naming/README.html#general-conventions-[rfc-#430]

Acronyms should be considered one word and not all caps.
2016-11-09 18:30:30 -05:00
Ms2ger
277c6d0154 Move ReferrerPolicy to net_traits. 2016-11-04 10:43:37 +01:00
Simon Sapin
53b638c0e2 Update to string-cache 0.3 2016-11-03 16:23:05 +01:00
Daan Sprenkels
66059904b7 Remove extra spaces in function calls and declarations 2016-10-31 18:11:37 +01:00
Ms2ger
6eaef7c18a Update the bug number for Blob-XHR-revoke.html. 2016-10-14 14:18:04 +02:00
Anthony Ramine
0b3ab875f4 Remove intrinsic Root::r() 2016-10-11 19:44:32 +02:00
Anthony Ramine
4b813e0bdc Merge script::parse and script::dom::servoparser 2016-10-11 16:42:01 +02:00
Anthony Ramine
d8e92bb271 Rename Reflectable::global_scope to global 2016-10-06 21:36:41 +02:00
Anthony Ramine
0a11c48e89 Make XMLHttpRequest::fetch take a &GlobalScope 2016-10-06 21:35:56 +02:00
Anthony Ramine
ca15dd5eea Introduce GlobalScope::process_event 2016-10-06 21:35:56 +02:00
Anthony Ramine
cdf3ef05e7 Introduce GlobalScope::new_script_pair 2016-10-06 21:35:55 +02:00
Anthony Ramine
991801488c Move timers to GlobalScope 2016-10-06 21:35:51 +02:00
Anthony Ramine
19108aa330 Pass a &GlobalScope to WebIDL static methods and constructors 2016-10-06 21:35:49 +02:00
Anthony Ramine
1fd470889d Introduce GlobalScope::networking_task_source 2016-10-06 21:35:49 +02:00
Anthony Ramine
71236e168a Introduce GlobalScope::core_resource_thread 2016-10-06 21:35:48 +02:00
Anthony Ramine
9183525192 Make XMLHttpRequest::new_doc use Reflectable::global_scope 2016-10-06 21:35:45 +02:00
Anthony Ramine
766010379e Introduce GlobalScope::as_window 2016-10-06 21:35:45 +02:00
Anthony Ramine
2f54022761 Remove some duplication in XMLHttpRequest methods 2016-10-06 21:35:44 +02:00
Anthony Ramine
f38159b7d3 Introduce GlobalScope::get_url 2016-10-06 21:35:44 +02:00
Anthony Ramine
3302a53d38 Introduce GlobalScope::api_base_url 2016-10-06 21:35:43 +02:00
Anthony Ramine
cb02d7911a Do not use GlobalRoot in dom::xmlhttprequest 2016-10-06 21:35:42 +02:00
Anthony Ramine
e036579ea0 Make XMLHttpRequest::new take a &GlobalScope 2016-10-06 21:35:41 +02:00
Anthony Ramine
896d8d4781 Make throw_dom_exception take a &GlobalScope 2016-10-06 21:35:39 +02:00
Anthony Ramine
ae6af5172b Introduce Reflectable::global_scope 2016-10-06 21:35:38 +02:00
Anthony Ramine
27f100b1d4 Introduce GlobalScope::pipeline_id 2016-10-06 20:59:13 +02:00
Anthony Ramine
fcb59d3057 Make reflect_dom_object take a &GlobalScope 2016-10-06 20:59:09 +02:00
bors-servo
d42235ee90 Auto merge of #13485 - mathieuh:xhr-event, r=jdm
Make readystatechange fire more often (fixes #13481)

<!-- 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 #13481 (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/13485)
<!-- Reviewable:end -->
2016-10-04 09:46:11 -05:00
Mathieu Hordesseaux
fe8749eae6 Make readystatechange fire more often (fixes#13481) 2016-10-03 16:32:12 +02:00
Jan Zerebecki
95a7482d26 Remove same-origin-data-url flag from fetch implementation
The spec removed it. Check the scheme instead, data is always same origin now,
except for workers.
This also updates the comments to make step numbers match the spec.
Closes #13362
2016-10-01 00:27:03 -07:00
Malisa Smith
a5e5cd0e9e impl Body mixin for dom::Response and dom::Request 2016-09-28 22:10:53 -07:00
Keith Yeung
07c9cfecec Add FetchMetadata and update corresponding methods 2016-09-21 14:26:03 -07:00
Keith Yeung
2bb95989c5 Implement default values for RequestInit 2016-09-21 11:50:53 -07:00
Keith Yeung
5729a4a3d4 Fix incorrect indentation 2016-09-21 11:50:52 -07:00
Nicolas
924136ee0c Fix most typoes for: "referer" -> "referrer" 2016-09-16 12:40:17 -04:00