Commit graph

3965 commits

Author SHA1 Message Date
Johann Hofmann
bad529a0f7
Expose Worker interfaces only to Worker
See #12415.
2016-07-19 12:43:16 +02:00
bors-servo
4b78b9adab Auto merge of #12416 - canaltinova:referrer, r=jdm
Implement Document.referrer

<!-- 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 #12389 (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/12416)
<!-- Reviewable:end -->
2016-07-14 11:55:44 -07:00
Nazım Can Altınova
d6c1f7b5e3 Implement Document.referrer 2016-07-14 21:35:39 +03:00
bors-servo
48a912f57e Auto merge of #12448 - jdm:file-reading-task-source-2, r=KiChjang
Implement file reading task source

Implement the task source API for the File Reader task source, enabling using task sources from non-main threads.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix (partially) #7959 (github issue number if applicable).
- [X] These changes do not require tests because they're refactoring existing code

<!-- 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/12448)
<!-- Reviewable:end -->
2016-07-14 10:55:17 -07:00
Keith Yeung
aa5f34fcd9 Implement file reading task source
And remove superfluous FileReaderEvent enum
2016-07-14 13:27:42 -04:00
Josh Matthews
2aef518ce6 Make task queue API usable from non-main threads. 2016-07-14 13:27:41 -04:00
Josh Matthews
0e4865ea1a Allow wrapping worker runnables in cancellable runnables. 2016-07-14 13:27:38 -04:00
bors-servo
86b2104f11 Auto merge of #12444 - servo:fetch-script, r=jdm
Improve the readability of the script fetching code.

<!-- 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/12444)
<!-- Reviewable:end -->
2016-07-14 06:39:37 -07:00
bors-servo
2cab846140 Auto merge of #12445 - szeged:pub-remove, r=jdm
Remove some unnecessary pub modifiers (#50)

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

Removed unnecessary pub modifiers from DOM class functions get_instance_id.

<!-- 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 there are no WebBluetooth test API implementation yet.

<!-- 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/12445)
<!-- Reviewable:end -->
2016-07-14 05:09:26 -07:00
Ms2ger
f696f311dc Remove TODO comment in ScriptContext::response_complete().
We already do what it suggests.
2016-07-14 14:07:43 +02:00
Ms2ger
7489f82a9b Handle script encoding more in line with the specification. 2016-07-14 13:56:21 +02:00
Ms2ger
20a8c97cf0 Extract some code into a new fetch_a_classic_script function. 2016-07-14 13:40:03 +02:00
Ms2ger
1feeff2972 Update step numbers in HTMLScriptElement::prepare(). 2016-07-14 13:34:19 +02:00
Ms2ger
f45b8bc53e Remove an unnecessary variable from HTMLScriptElement::prepare(). 2016-07-14 13:16:42 +02:00
zakorgy
aaf21dab4f Remove some unnecessary pub modifiers (#50) 2016-07-14 10:35:06 +02:00
Kuba Birecki
85f4da18a6 Inline DOM element creation into box expressions in components/script/dom/ 2016-07-14 08:44:22 +02:00
bors-servo
3011d4b450 Auto merge of #12404 - ConnorGBrewster:task_source_cleanup, r=asajeffrey
Clean up task sources and make all tasks cancellable

<!-- Please describe your changes on the following line: -->
This makes it so each task is a thin wrapper over a runnable and whenever a task is queued, it is automatically wrapped by the window's `runnable_wrapper`.

---
<!-- 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  #11703 (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/12404)
<!-- Reviewable:end -->
2016-07-13 10:18:15 -07:00
Connor Brewster
ad30275d04 Move boxing to runnable initialization 2016-07-13 11:10:23 -06:00
Connor Brewster
5f7324a9a5 Make all task source runnables cancellable
Implement all Runnable methods on CancellableRunnable to redirect to their inner runnable
2016-07-13 09:59:51 -06:00
bors-servo
902e6322e0 Auto merge of #12419 - GuillaumeGomez:try_from, r=Ms2ger
Replace AdjacentPosition::parse by TryFrom

Fixes #12387.

<!-- 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/12419)
<!-- Reviewable:end -->
2016-07-13 00:57:35 -07:00
bors-servo
5d98ee61bb Auto merge of #12418 - emilio:webidl-update, r=Ms2ger
WebIDL update

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

~~This should help #11203~~ (no, it doesn't, but still worth it).

r? @jdm

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

<!-- 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/12418)
<!-- Reviewable:end -->
2016-07-13 00:00:04 -07:00
bors-servo
665559556f Auto merge of #12406 - izgzhen:refactor-file, r=Manishearth
Refactor FileAPI implementation

Most are simple refactoring, cleanups and improvements, but still involving two slightly notable changes:

+ In `filemanager`, now we read the file content based on requested `RelativePos` by `seek` and `read_exact` (rather than `read_to_end` then do slicing). This strategy might be again adjusted in future performance tuning but certainly better than nothing.
+ Also, I cached more file meta-info in both sides and left a block of comment on `filemanager`'s file reading mentioning the snapshot-state problem (not solved now though).

r? @Manishearth

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

<!-- 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/12406)
<!-- Reviewable:end -->
2016-07-12 22:00:08 -07:00
Zhen Zhang
aea99e081b Refactor FileAPI implementation 2016-07-13 12:12:32 +08:00
bors-servo
3c3c32f95e Auto merge of #12365 - simartin:issue_12071, r=KiChjang
Issue #12071: Don't submit forms when typing Tab on an input.

<!-- Please describe your changes on the following line: -->
Fixes https://github.com/servo/servo/issues/12071
---
<!-- 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 #12071

<!-- 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/12365)
<!-- Reviewable:end -->
2016-07-12 16:27:36 -07:00
Simon Martin
ff4e07b6c4 Issue #12071: Don't submit forms when typing Tab on an input. 2016-07-12 23:50:00 +02:00
Guillaume Gomez
87800fa902 Replace AdjacentPosition::parse by TryFrom 2016-07-12 23:33:49 +02:00
Emilio Cobos Álvarez
39f7ce8fd4
webidl: Apply and update debug.patch, remove abstract.patch which was already upstream. 2016-07-12 14:07:03 -07:00
Emilio Cobos Álvarez
aa811be816
webidl: Update parser
Some patches failed to apply. I'll apply manually after this.
2016-07-12 13:58:26 -07:00
Emilio Cobos Álvarez
b5c9e8a58e
webidl: Update the update script now mxr is gone. 2016-07-12 13:57:42 -07:00
bors-servo
37dbb50208 Auto merge of #11978 - aravind-pg:new-referrer-pols, r=jdm
Add "origin" and "same-origin" referrer policies, replacing "origin-only".

<!-- 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 #11384
- [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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11978)
<!-- Reviewable:end -->
2016-07-12 13:44:33 -07:00
bors-servo
e2e7013e76 Auto merge of #12395 - jdm:nowrap, r=Ms2ger
Avoid calling JS_WrapValue for same-compartment DOM reflectors

This change shaves off 15-20ns per iteration of the node.firstChild getter test in tests/html/bindings_perf.html. Based on [similar Gecko code](http://searchfox.org/mozilla-central/rev/f43c9e0ffa92e72dbdbcbf57eecf04a43d46da63/dom/bindings/BindingUtils.h#781).

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix (partially) #12358

<!-- 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/12395)
<!-- Reviewable:end -->
2016-07-12 05:50:46 -07:00
Josh Matthews
fc3b785af1 Remove unused imports from codegen. 2016-07-12 08:22:51 -04:00
Josh Matthews
7539eb496b Avoid unnecessary JS_WrapValue calls for DOM reflectors. 2016-07-12 08:22:50 -04:00
Ms2ger
306f4232f0 Stop exposing DedicatedWorkerGlobalScope in windows. 2016-07-12 13:16:39 +02:00
Ms2ger
641dfa4948 Stop exposing DOMParser to workers. 2016-07-12 13:06:58 +02:00
Ms2ger
d678b20616 Implement the [Exposed] extended attribute on interfaces.
Fixes #2823.
2016-07-12 13:06:56 +02:00
Ms2ger
c064c4950d Make sure that Descriptor.isGlobal() returns a bool. 2016-07-12 13:06:55 +02:00
Ms2ger
4c31c8ac7b Simplify CGConstructorEnabled. 2016-07-12 13:06:54 +02:00
Ms2ger
28630f5487 Make DefineDOMInterface and ConstructorEnabled unsafe functions. 2016-07-12 13:06:53 +02:00
Ms2ger
e99054f731 Add support for unsafe Rust-ABI functions to CGAbstractMethod. 2016-07-12 13:06:52 +02:00
Ms2ger
1dcdc2859c Generate 'pub' before 'unsafe extern', if both are used. 2016-07-12 13:06:51 +02:00
Ms2ger
b5412f3840 Correct indentation in the DOMClass function. 2016-07-12 13:06:50 +02:00
Ms2ger
39113c670c Remove CheckAnyPermissions / CheckAllPermissions extended attributes. 2016-07-12 13:06:49 +02:00
Ms2ger
ed743bb50c Explicitly expose everything everywhere. 2016-07-12 13:06:48 +02:00
Ms2ger
7e7b97e869 Allow [Pref] annotations on worker-exposed interfaces.
Servo does not have the same main-thread limitation as Gecko here.
2016-07-12 13:06:47 +02:00
Connor Brewster
afc0ccb48d Add event runnables
Make tasks a wrapper over runnables
2016-07-11 22:21:45 -06:00
bors-servo
9e010a8aec Auto merge of #12383 - zeusintuivo:feature/11611, r=nox
Rename SharedKeyboardAndMouseEventInit to EventModifierInit

<!-- Please describe your changes on the following line: -->
- [X] renamed file SharedMouseAndKeyboardEventInit,
- [X] changed SharedKeyboardAndMouseEventInit to EventModifierInit.
- [X] Rebased mozilla/master into it.
- [x] Ran build and tidy test without errors

---
<!-- 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 #11611 (github issue number if applicable).

<!-- 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/12383)
<!-- Reviewable:end -->
2016-07-11 08:25:45 -07:00
zeusintuivo
d26bb29bb2 Rename SharedKeyboardAndMouseEventInit to EventModifierInit 2016-07-11 16:39:59 +02:00
bors-servo
42e90f7db9 Auto merge of #12378 - izgzhen:blob-url-revocation-fix, r=Manishearth
Add FileID validity setting/checking logic to Blob URL implementation

r? @Manishearth

---
<!-- 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: -->
- [ ] 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/12378)
<!-- Reviewable:end -->
2016-07-11 00:13:45 -07:00
bors-servo
2239e827bd Auto merge of #12376 - sappharx:master, r=ConnorGBrewster
add Runnable::name() implementation for PlannedNavigation #12333

<!-- Please describe your changes on the following line: -->
implements Runnable::name() for PlannedNavigation
---
<!-- 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 #12333 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because the issue stated no tests were needed

<!-- 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/12376)
<!-- Reviewable:end -->
2016-07-10 21:14:17 -07:00