Commit graph

5778 commits

Author SHA1 Message Date
Anthony Ramine
bd9486bbe2 Clean up code for the media element load algorithm 2017-09-19 14:26:09 +02:00
Anthony Ramine
e8d7eaf8a3 Clean up code of the resource fetch algorithm 2017-09-19 14:26:07 +02:00
Anthony Ramine
5352697558 Clean up the resource selection algorithm a bit 2017-09-19 14:26:06 +02:00
Anthony Ramine
e4cd6be831 Clean up HTMLMediaElement::change_ready_state 2017-09-19 14:26:05 +02:00
bors-servo
23701f8659 Auto merge of #18533 - servo:TASKS, r=SimonSapin
Rename Runnable to Task and other 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/18533)
<!-- Reviewable:end -->
2017-09-18 14:42:50 -05:00
Anthony Ramine
a7655a3f84 Use task! to resolve promises 2017-09-18 10:49:36 +02:00
Anthony Ramine
851d40b204 Use task! to reject promises 2017-09-18 10:42:05 +02:00
Anthony Ramine
ad41ce7a6f Use task! to announce event source connections 2017-09-18 10:41:09 +02:00
Anthony Ramine
7a5d7e2e90 Use task! to fail event source connections 2017-09-18 10:22:18 +02:00
Anthony Ramine
9339eb7d68 Use task! to dispatch events from event sources 2017-09-18 10:17:05 +02:00
Anthony Ramine
445a93eb8b Use task! to reestablish the event source connection 2017-09-18 10:10:34 +02:00
Anthony Ramine
1fa0e21e4b Use task! to forward unhandled errors to worker objects 2017-09-18 09:59:18 +02:00
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