Anthony Ramine
c53d1e46b4
Clean up GlobalScope::report_an_error
2017-09-18 09:44:52 +02:00
Anthony Ramine
a6af86824b
Use task! for posting messages
2017-09-18 09:32:24 +02:00
Emilio Cobos Álvarez
90fb284720
script: Properly implement LegacyPlatformGetOwnProperty in WebIDL.
...
We were missing the "ignoreNamedProperties" bit, which my previous patch
uncovers.
2017-09-18 09:15:14 +02:00
Emilio Cobos Álvarez
6edefb829c
script: remove unused function.
2017-09-18 09:15:13 +02:00
Emilio Cobos Álvarez
f5d16fc069
script: Fix integer-JSID handling in named getters.
...
Fixes #10686
2017-09-18 09:15:13 +02:00
Anthony Ramine
c051fc1995
Use task! for raf events from VR
2017-09-18 02:47:28 +02:00
Anthony Ramine
76745699d2
Use task! to post worker messages
2017-09-18 02:47:26 +02:00
Anthony Ramine
56a546afcd
Use task! to send a storage notification
2017-09-18 02:47:24 +02:00
Anthony Ramine
915a4f8385
Use task! for the details notification steps
2017-09-18 02:47:23 +02:00
Anthony Ramine
b3e27509b7
Use task! for step 11.4 of updating the image data
2017-09-18 02:47:21 +02:00
Anthony Ramine
5b41e66f27
Use task! to process image responses
2017-09-18 02:47:18 +02:00
Anthony Ramine
3592108759
Use task! for form planned navigations.
2017-09-18 02:47:17 +02:00
Anthony Ramine
aa67ff30db
Use task! for step 5.3.7 of updating the image data
2017-09-18 02:47:15 +02:00
Anthony Ramine
407af95db5
Use task! for step 9 of updating the image data
2017-09-18 02:47:14 +02:00
Anthony Ramine
fba54c7735
Use task! to fire a progress event when updating the image data
2017-09-18 02:47:12 +02:00
Anthony Ramine
30a1d3f617
Use task! for the dedicated media source failure steps
2017-09-18 02:47:11 +02:00
Anthony Ramine
91c2865e36
Use task! for notifying about playing
2017-09-18 02:47:09 +02:00
Anthony Ramine
e9f6ea40c2
Use task! instead of DocumentProgressHandler
2017-09-18 02:47:07 +02:00
Anthony Ramine
5412767f46
Introduce a task! macro and use it for internal pause steps
2017-09-18 02:47:06 +02:00
Anthony Ramine
46628fba05
Move Task to its own module
2017-09-18 02:47:04 +02:00
Emilio Cobos Álvarez
2ac1327e4b
style: Make border-spacing serialization consistent, and move it to precomputed_type.
2017-09-17 21:33:17 +02:00
Emilio Cobos Álvarez
91f238f326
script: Properly throw when "this" is not an object in a generic call.
2017-09-17 18:42:27 +02:00
Emilio Cobos Álvarez
5281fc1a44
script: Add a comment about some conversion that looks fishy.
2017-09-17 18:42:24 +02:00
Emilio Cobos Álvarez
b29e56eefc
script: Fix code generation for named getters.
...
Fixes part of #18535
2017-09-17 18:42:23 +02:00
Anthony Ramine
8e78f18d2d
Introduce MainThreadScriptMsg::DispatchJobQueue
...
This removes the last remaining use of Task::run_with_script_thread
2017-09-17 10:46:00 +02:00
Anthony Ramine
f58207b851
Introduce MainThreadScriptMsg::RegisterPaintWorklet
...
This avoids the need for a generic task to send messages to the layout thread
through the main script thread.
2017-09-17 10:19:59 +02:00
Anthony Ramine
95dc54d216
Use normal tasks to reject and resolve promises
2017-09-17 01:34:07 +02:00
Anthony Ramine
4a39631eaf
Remove FileReadingRunnable
2017-09-16 15:43:31 +02:00
Anthony Ramine
56117d3185
Rename Runnable to Task
...
The changes are:
* `*Runnable` -> `*Task`;
* `RunnableMsg` -> `Task`;
* `RunnableWrapper` -> `TaskCanceller`;
* `MainThreadRunnable` -> `MainThreadTask`;
* `wrap_runnable` -> `wrap_task`;
* `get_runnable_wrapper` -> `task_canceller`;
* `handler` -> `run`;
* `main_thread_handler` -> `run_with_script_thread`.
2017-09-16 15:43:26 +02:00
Anthony Ramine
52a6f63608
Introduce MainThreadScriptMsg::MainThreadRunnable
...
This will allow us to separate the types for tasks that must run on the main
script thread and regular tasks.
2017-09-16 15:10:07 +02:00
Anthony Ramine
69275162b0
Clean up Storage::queue_storage_event
...
This moves the Runnable type directly in the method and makes it not use
main_thread_handler, which is unneeded here anyway.
2017-09-16 03:47:14 +02:00
bors-servo
7cc0af37cf
Auto merge of #18512 - tromey:preserve-style-sheet-source-url, r=SimonSapin
...
Preserve sourceURL comment on style sheets
In addition to the sourceMappingURL comment, there is a second special
comment, "sourceURL", that can be used to set the "display name" of a
style sheet for developer tools. This name is also used as the base
URL for the source-map URL resolution algorithm. sourceURL is
described here:
https://blog.getfirebug.com/2009/08/11/give-your-eval-a-name-with-sourceurl/
The devtools feature bug is here:
https://bugzilla.mozilla.org/show_bug.cgi?id=880831
This patch changes servo to preserve and expose this value for use in M-C.
---
<!-- 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: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- 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/18512 )
<!-- Reviewable:end -->
2017-09-15 08:07:49 -05:00
bors-servo
1b9a5ea719
Auto merge of #18504 - servo:media, r=emilio
...
Some minor HTMLMediaElement improvements
<!-- 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/18504 )
<!-- Reviewable:end -->
2017-09-14 20:51:51 -05:00
bors-servo
4268037424
Auto merge of #18503 - servo:globalism, r=emilio
...
Simplify WorkerGlobalScope::process_event
<!-- 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/18503 )
<!-- Reviewable:end -->
2017-09-14 18:17:55 -05:00
Tom Tromey
c48226ff6f
Preserve sourceURL comment on style sheets
...
In addition to the sourceMappingURL comment, there is a second special
comment, "sourceURL", that can be used to set the "display name" of a
style sheet for developer tools. This name is also used as the base
URL for the source-map URL resolution algorithm. sourceURL is
described here:
https://blog.getfirebug.com/2009/08/11/give-your-eval-a-name-with-sourceurl/
The devtools feature bug is here:
https://bugzilla.mozilla.org/show_bug.cgi?id=880831
This patch changes servo to preserve and expose this value for use in M-C.
2017-09-14 12:39:18 -06:00
Emilio Cobos Álvarez
0a9309aa96
style: Unify how servo and Gecko handle UA sheets.
2017-09-14 20:33:43 +02:00
Anthony Ramine
518e34e7c8
Use an enum for the ready state of media elements
2017-09-14 15:30:20 +02:00
Anthony Ramine
86b25cd6b5
Use an enum for the network state of media elements
2017-09-14 14:23:06 +02:00
Anthony Ramine
87bb5ba381
Fix some HTMLMediaElement spec links
2017-09-14 13:52:25 +02:00
Anthony Ramine
35d86afcc8
Simplify WorkerGlobalScope::process_event
...
This method does not need to dispatch to interfaces derived from
WorkerGlobalScope, given they end up doing exactly the same thing
in all workers.
2017-09-14 13:37:33 +02:00
bors-servo
bb2030a493
Auto merge of #18494 - frewsxcv:frewsxcv-size-hint, r=jdm
...
Implement `size_hint` for more iterators.
```
implement size hint for
more iterators because why
not we like fast things
```
<!-- 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/18494 )
<!-- Reviewable:end -->
2017-09-13 19:38:32 -05:00
Corey Farwell
9cd4535364
Implement size_hint
for more iterators.
...
```
implement size hint for
more iterators because why
not we like fast things
```
2017-09-13 20:29:27 -04:00
bors-servo
d461347adf
Auto merge of #18484 - emilio:per-origin-sheets, r=SimonSapin
...
style: Store stylesheets per origin
This is the first step that will allow us to cache UA sheets across documents.
<!-- 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/18484 )
<!-- Reviewable:end -->
2017-09-13 14:59:16 -05:00
Emilio Cobos Álvarez
82c58d0a05
script: Fix stylesheet adoption.
2017-09-13 17:11:24 +02:00
Emilio Cobos Álvarez
02d1264047
style: Store stylesheets per origin.
...
This will allow us to cache UA sheets across documents.
MozReview-Commit-ID: 5rYIKTmC6iw
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-13 16:01:35 +02:00
Anthony Ramine
24cf15a014
Store microtask queues in their global ( fixes #18467 )
2017-09-13 15:02:45 +02:00
Anthony Ramine
7481ce177f
Store a Rc<MicrotaskQueue> directly on Window
2017-09-13 14:27:45 +02:00
Anthony Ramine
7f9f95b7ce
Store microtask queues in Rc<T>
2017-09-13 14:27:42 +02:00
Anthony Ramine
65dfd6bf63
Clean up DissimilarOriginWindow::origin
...
It's not dead code, and it should use Castable instead of directly reaching
to the globascope field.
2017-09-13 14:27:36 +02:00
Anthony Ramine
1c46135c75
Reformat DissimilarOriginWindow::new
2017-09-13 10:53:05 +02:00