aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename Task to TaskBoxAnthony Ramine2017-09-201-1/+1
|
* Move Task to its own moduleAnthony Ramine2017-09-181-59/+0
|
* Introduce MainThreadScriptMsg::DispatchJobQueueAnthony Ramine2017-09-171-23/+13
| | | | This removes the last remaining use of Task::run_with_script_thread
* Remove uses of AsyncJobHandler from script_threadAnthony Ramine2017-09-171-3/+3
|
* Introduce MainThreadScriptMsg::RegisterPaintWorkletAnthony Ramine2017-09-171-9/+43
| | | | | This avoids the need for a generic task to send messages to the layout thread through the main script thread.
* Rename Runnable to TaskAnthony Ramine2017-09-161-28/+33
| | | | | | | | | | | | 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`.
* Introduce MainThreadScriptMsg::MainThreadRunnableAnthony Ramine2017-09-161-5/+10
| | | | | This will allow us to separate the types for tasks that must run on the main script thread and regular tasks.
* Put the name of runnables in Debug for CommonScriptMsgAnthony Ramine2017-09-161-0/+7
|
* Store a Rc<MicrotaskQueue> directly on WindowAnthony Ramine2017-09-131-0/+1
|
* Store microtask queues in Rc<T>Anthony Ramine2017-09-131-2/+3
|
* Avoid a clone in ScriptThread::newAnthony Ramine2017-09-131-29/+31
|
* Auto merge of #17083 - danielj41:javascript-url-global-3, r=jdmbors-servo2017-09-091-44/+78
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "javascript:" urls: execute in correct global scope <!-- Please describe your changes on the following line: --> #### Summary This pull request makes `javascript:` urls execute in the correct global scope. #### Example ```html <script> var x = 4; </script> <!-- this branch: logs "4" --> <!-- master: undefined variable error --> <a href="javascript:console.log(x)">link</a> ``` #### Questions I'm new to servo and rust, so I'm unsure about these changes. In particular: * What's the appropriate place to evaluate the js? * I moved it to `handle_navigate`, but I'm not sure if this will catch all occurrences of `javascript:` urls. I also don't know if this will execute in the correct thread and the correct window. * What should I do with the result of the js evaluation? * I just ignored it. The previous behavior displayed it as the content of a new page load. --- <!-- 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 #15147, #16718 <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/17083) <!-- Reviewable:end -->
| * "javascript:" urls: remove unnecessary blockDaniel Johnson2017-09-071-32/+30
| | | | | | | | | | | | | | Remove this block and unindent the code one level. Doing this required cloning `load_data.url` so that we could later mutate `load_data.url` in the same block.
| * "javascript:" urls: evaluate in iframe src attributeDaniel Johnson2017-08-281-25/+23
| | | | | | | | | | | | | | | | - generalize the eval_js_url function so it can be called from multiple places. - call it in htmliframeelement. - if the js eval results in a non-string result, then it won't navigate to a new page, so don't block on the new page loading.
| * "javascript:" urls: clean up js evaluation codeDaniel Johnson2017-08-281-48/+50
| | | | | | | | | | | | - move it to its own function - move the `url = "about:blank" code into the same block - move the `use` statement to the top of the file
| * "javascript:" urls: clean up after aborting a page loadDaniel Johnson2017-08-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: After aborting on a 204 or 205 status code, you could no longer follow links on the page. Cause: `constellation.rs` ignores new LoadUrl requests since the aborted one is in its `pending_changes` list. Solution: Send a message to constellation that lets it clean up its `pending_changes` list.
| * "javascript:" urls: run in correct globalDaniel Johnson2017-08-221-44/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make some changes to javascript scheme url evaluation to bring it closer to https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigating-across-documents - Evaluate the js before the page load so that it happens in the correct `window` global. - If the result is not a string, the response should be a 204. This required saving some data in load_data, since it's not possible to modify the response at the point where we're evaluating the js.
* | Panic from the default impl of Runnable::handlerAnthony Ramine2017-09-081-1/+3
| | | | | | | | | | This will allow us to make sure that tasks using main_thread_handler don't actually get consumed through a call to the bare handler method.
* | Reformat some task-related functionsAnthony Ramine2017-09-081-10/+12
| |
* | Kill UserInteractionTaskAnthony Ramine2017-09-081-5/+1
| | | | | | | | Just use a bare Runnable value.
* | Kill DOMManipulationTaskAnthony Ramine2017-09-081-5/+1
| | | | | | | | Just use a bare Runnable value.
* | Kill Runnable::is_cancelled ⚔️Anthony Ramine2017-09-071-13/+19
| |
* | Make Performance Timeline API work in WorkersFernando Jiménez Moreno2017-09-051-10/+6
| |
* | move name implementation as default implementation to the trait and remove ↵toidiu2017-09-031-3/+1
| | | | | | | | overrides.
* | change function signature to get type name via intrinsicstoidiu2017-09-031-1/+2
| |
* | Add paint metrics to Performance Timeline APIFernando Jiménez Moreno2017-08-231-2/+20
|/
* Wait for actual paint before setting paint related metricsFernando Jiménez Moreno2017-08-221-1/+3
|
* Performance Timeline APIFernando Jiménez Moreno2017-08-171-1/+15
|
* Improve WebGL architecture.Imanol Fernandez2017-08-151-3/+9
|
* Auto merge of #17425 - paulrouget:attach-pipeline-2, r=asajeffreybors-servo2017-08-151-30/+35
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cleanup embedder/compositor/constellation/script messages Fix: #17226 #17200 #17201 This is work in progress. Some tests still fail. I'd like to get early feedback as it's a pretty large PR. There is nothing fundamentally new. Basically, I added TopLevelBrowsingContrextId to the relevant messages between the embedder, the compositor and the constellation, and enforced the PipelineId to be attached to each ScriptMsg (see #17201). I unaliased all the ScriptMsg. It was getting difficult to understand the nature of the message as ScriptMsg was used aliased CompositorMsg sometimes (CompositorMsg is an actually type of message already). I renamed constellation_chan to script_to_constellation_chan, again, for clarification. This cleanup code is necessary for #15934 and for tabs support. /cc @asajeffrey can I ask you to look at this? No need for a formal review, I need feedback at this stage. <!-- 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/17425) <!-- Reviewable:end -->
| * make use of ScriptToConstellationChanPaul Rouget2017-08-151-30/+35
| |
* | Handle exceptions during upgradesConnor Brewster2017-08-091-2/+4
| |
* | Add upgrade reactionConnor Brewster2017-08-091-2/+11
|/
* Implement basic Time To First Paint and First Contentful Paint PWMsFernando Jiménez Moreno2017-07-201-1/+5
|
* Auto merge of #17761 - cbrewster:ce_reactions, r=jdmbors-servo2017-07-181-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add [CEReactions] to webidls <!-- Please describe your changes on the following line: --> Relies on #17614 --- <!-- 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 _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/17761) <!-- Reviewable:end -->
| * Implement CEReactions codegenConnor Brewster2017-07-181-0/+18
| |
* | Auto merge of #17735 - ferjm:navigationstart, r=jdmbors-servo2017-07-181-3/+11
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | Set navigation start value according to navigation timing spec - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #17651 <!-- 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/17735) <!-- Reviewable:end -->
| * Set navigation start value according to navigation timing specFernando Jiménez Moreno2017-07-181-3/+11
| |
* | Auto merge of #17614 - cbrewster:custom_element_reactions, r=jdmbors-servo2017-07-171-0/+24
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement custom element reactions <!-- Please describe your changes on the following line: --> Initial work for implementing custom element reactions: https://html.spec.whatwg.org/multipage/custom-elements.html#custom-element-reactions --- <!-- 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 #17433 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/17614) <!-- Reviewable:end -->
| * Invoke backup element queue via a microtaskConnor Brewster2017-07-171-0/+9
| |
| * Support custom element callback reactionsConnor Brewster2017-07-171-0/+15
| |
* | Auto merge of #16508 - brainlessdeveloper:fetch-set-origin, r=asajeffreybors-servo2017-07-171-2/+8
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Properly set origin of fetch requests <!-- Please describe your changes on the following line: --> These changes aim to fix #15247 --- <!-- 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 #15247 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes - [x] These changes do not require tests because cors is already tested with different origins These changes require changes in tests, but I need help with that (see comments below). <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/16508) <!-- Reviewable:end -->
| * Change RequestInit origin type to ImmutableOriginFausto Núñez Alberro2017-07-161-2/+8
| |
* | Implemented paint worklet properties.Alan Jeffrey2017-07-111-3/+12
|/
* WebVR 1.1 spec compatibilityImanol Fernandez2017-07-051-1/+0
|
* Implemented paint worklet rendering context.Alan Jeffrey2017-06-301-0/+22
|
* Bump serde to 1.0Bastien Orivel2017-06-161-1/+1
|
* Auto merge of #17323 - ibmandura:issue16057, r=jdmbors-servo2017-06-151-0/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid panic when reloading a page with mouse event handlers This PR fixes issue #16057, by nullifying `topmost_mouse_over_target` inside of the `handle_exit_pipeline_msg` method, in case owner document is the same as the pipeline document that is being destroyed. - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors Testing was done manually, by running `./mach run (-r|-d) "http://localhost:8000/minimal.html" `, where `minimal.html` contains `<div onmouseover="location.reload()" onmouseout="this.clientLeft">hi there</div>`. r?@jdm <!-- 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/17323) <!-- Reviewable:end -->
| * Fixing issue #16057budaim2017-06-141-0/+7
| |
* | Bump euclid to 0.14.Nicolas Silva2017-06-141-5/+3
|/