Commit graph

5785 commits

Author SHA1 Message Date
Bobby Holley
48466bf876 Introduce an NthIndexCache type and pipe it from ThreadLocalStyleContext to MatchingContext.
Some future refactoring here to pass fewer things as parameters would be nice.
2017-09-20 23:22:38 -07:00
Alan Jeffrey
3d00b0e2ac Window should own Location, Document shouldn't 2017-09-20 14:20:04 -05:00
Anthony Ramine
6c9fb5ae7a Introduce TaskOnce
Having both TaskBox and TaskOnce allows us to remove the superfluous inner boxing
from CancellableTask<T>.
2017-09-20 10:37:09 +02:00
Anthony Ramine
52527d6f9d Rename Task to TaskBox 2017-09-20 10:07:29 +02:00
Anthony Ramine
f088b708c9 Make Task require Send 2017-09-20 09:40:53 +02:00
Anthony Ramine
0e2249f07f Clean up HTMLMediaElement::Play 2017-09-19 14:26:11 +02:00
Anthony Ramine
7e835c351e Handle invalid MIME types in HTMLMediaElement::CanPlayType 2017-09-19 14:26:10 +02:00
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