Commit graph

281 commits

Author SHA1 Message Date
Connor Brewster
bfd7b950ad Add ImmutableOrigin to allow for serializing origins 2017-02-22 11:11:59 -06:00
Alan Jeffrey
e8d765557f Allow browsing contexts to resolve to cross-origin windows. 2017-02-16 16:45:29 -06:00
karan sharma
abcd8133de Remove usage of unwrap in handle_exit_pipeline_msg() 2017-02-13 15:55:37 +05:30
Josh Matthews
60d1717eca Remove incorrect uses of asynchronous tasks from ServiceWorker job queue. 2017-02-01 12:54:33 -05:00
Josh Matthews
b5d2bd757b Perform a microtask checkpoint after executing classic scripts and callbacks. 2017-02-01 12:54:33 -05:00
Josh Matthews
32d4f84a30 Generalize promise job queue into solitary microtask queue. 2017-02-01 12:54:33 -05:00
bors-servo
cc2011c050 Auto merge of #15264 - servo:content-type, r=nox
Always set the Document::contentType attribute in ScriptThread::load().

<!-- 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/15264)
<!-- Reviewable:end -->
2017-01-30 05:33:14 -08:00
Ms2ger
69e3173047 Always set the Document::contentType attribute in ScriptThread::load().
There's no good reason to limit this to a few particular content types.
2017-01-30 12:43:49 +01:00
Alan Jeffrey
403499a9d5 Allow windows to share browsing contexts. 2017-01-28 21:57:03 -06:00
Alan Jeffrey
ca9cee084e Fix document.write check for activity. 2017-01-27 17:25:40 -06:00
Alan Jeffrey
a43c842099 The constellation notifies the script thread about documents becoming inactive, active and fully active. 2017-01-27 12:39:43 -06:00
bors-servo
ba7696ebc6 Auto merge of #15220 - nox:kill-parser-pipeline, r=SimonSapin,jdm
Kill ServoParser::pipeline

<!-- 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/15220)
<!-- Reviewable:end -->
2017-01-27 04:19:24 -08:00
Anthony Ramine
d8238646a0 Kill ServoParser::pipeline 2017-01-27 12:12:21 +01:00
bors-servo
cfba589e64 Auto merge of #15242 - servo:refpol, r=nox
Simplify handling of the referrer policy header in ScriptThread::load().

<!-- 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/15242)
<!-- Reviewable:end -->
2017-01-27 02:27:38 -08:00
bors-servo
5af74c38fc Auto merge of #15238 - servo:clip_rect, r=emilio
Remove unused InProgressLoad::clip_rect.

<!-- 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/15238)
<!-- Reviewable:end -->
2017-01-27 01:31:47 -08:00
bors-servo
88cd8a3cf0 Auto merge of #15179 - servo:alter_resource_utilization, r=nox
Refactor away ScriptThread::alter_resource_utilization().

It's used in two places, one of which already has access to the Window.

<!-- 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/15179)
<!-- Reviewable:end -->
2017-01-26 08:30:56 -08:00
Ms2ger
a689cf1d34 Refactor away ScriptThread::alter_resource_utilization().
It's used in two places, one of which already has access to the Window.
2017-01-26 16:57:00 +01:00
Ms2ger
5b97632132 Simplify handling of the referrer policy header in ScriptThread::load(). 2017-01-26 14:37:11 +01:00
Ms2ger
b9e7aae9a2 Remove unused InProgressLoad::clip_rect. 2017-01-26 12:35:37 +01:00
Anthony Ramine
f1738ee266 Revert "Auto merge of #15136 - nox:mitochondria-finally-makes-it-into-the-tree, r=jdm"
This reverts commit ca6376a714, reversing
changes made to bb24fd3177.
2017-01-24 11:50:43 +01:00
bors-servo
ca6376a714 Auto merge of #15136 - nox:mitochondria-finally-makes-it-into-the-tree, r=jdm
Use mitochondria::OnceCell to store ScriptThread in TLS

<!-- 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/15136)
<!-- Reviewable:end -->
2017-01-23 03:17:33 -08:00
Anthony Ramine
2002de441f Use mitochondria::OnceCell to store ScriptThread in TLS 2017-01-23 12:16:13 +01:00
Anthony Ramine
707f8f881e Make TransitionEvent::new take a &Window 2017-01-21 14:32:34 +01:00
Anthony Ramine
0f244d6948 Mark the page source as loaded only after parsing is done 2017-01-19 16:17:14 +01:00
Anthony Ramine
70ed3e7006 Remove ScriptThread::parsing_complete 2017-01-17 14:24:37 +01:00
bors-servo
2fb9a345d6 Auto merge of #15016 - prampey:doc-deactivate, r=cbrewster
Documents now fully deactivate when a freeze message is sent

<!-- Please describe your changes on the following line: -->
Documents now fully deactivate when a freeze message is sent

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because minimal 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/15016)
<!-- Reviewable:end -->
2017-01-13 14:15:44 -08:00
Prudhvi Rampey
584f72d63b Documents now fully deactivate when a freeze message is sent 2017-01-14 01:12:21 +05:30
Alan Jeffrey
611f3b38a1 Remove reflow status from browsing context. 2017-01-12 15:06:31 -06:00
Imanol Fernandez
c5705bff50 WebVR API Implementation, r=larsbergstrom 2017-01-09 12:44:39 +01:00
Alan Jeffrey
7c2de62124 Implement browsing context discarding. 2017-01-05 21:12:57 +00:00
Alan Jeffrey
78c87ea8d7 Implement discarding Document objects to reclaim space. 2017-01-04 11:29:31 +00:00
bors-servo
885d152e92 Auto merge of #14647 - servo:current-global, r=jdm
Support the 'current' global object.

<!-- 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/14647)
<!-- Reviewable:end -->
2016-12-29 01:38:19 -08:00
Emilio Cobos Álvarez
eaf69c29ec
script: Simplify ScriptMemoryFailsafe::drop. 2016-12-25 19:18:29 +01:00
Emilio Cobos Álvarez
755697d6bb
script: Use more idiomatic code for resize handling.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2016-12-25 19:18:24 +01:00
Ms2ger
ec5d08c887 Pass the Document's origin to its constructor.
CC #10963.
2016-12-23 11:15:46 +01:00
Josh Matthews
8ca387c0e0 Warn when a timer event is processed for a discarded document. 2016-12-22 18:56:06 -05:00
bors-servo
0c56499bdc Auto merge of #14589 - servo:harden-script, r=jdm+Ms2ger
Reduce calls into arbitrary code with the ScriptThread::documents borrow held.

<!-- 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/14589)
<!-- Reviewable:end -->
2016-12-16 08:53:27 -08:00
Josh Matthews
14d8ae2478 Add a tidy check for problematic match cases in script_thread.rs 2016-12-16 11:52:45 -05:00
Alan Jeffrey
9be4fd56ce Removed util. 2016-12-14 18:04:37 -06:00
Ms2ger
a74cbbeb1a Reduce calls into arbitrary code with the ScriptThread::documents borrow held. 2016-12-14 18:05:30 +01:00
Anthony Ramine
1327ebd52f Remove HeapGCValue
It could be used to have mutable JSVal fields without GC barriers.
With the removal of that trait, MutHeap and MutNullableHeap can respectively
be replaced by MutJS and MutNullableJS.
2016-12-12 10:47:54 -10:00
Jansen Jan
55f0e56224 Add support for fullscreen #10102 2016-12-09 11:45:50 +01:00
Corey Farwell
449f6337d4 Rename Reflectable to DomObject.
Fixes https://github.com/servo/servo/issues/8473.
2016-12-08 08:50:35 -10:00
Anthony Ramine
c1bdd3d5ce Properly mark application/xhtml+xml documents as XML
For this to work, we must remove the unimplemented!() call
in Element::parse_fragment because all the tests rely on
setting innerHTML.
2016-12-01 11:55:16 +01:00
Ms2ger
b86965f394 Implement synchronous about:blank loading.
Based on initial work by jdm in <https://github.com/servo/servo/pull/8600>.
2016-11-30 11:26:35 +01:00
Ms2ger
14459e2211 Store the layout-to-constellation sender in the script thread.
This will allow the script thread to spawn layout threads independently.
2016-11-30 01:24:46 +01:00
Alan Jeffrey
fb6cefcb78 When a script thread looks for a current layout thread, it should look in the incomplete loads. 2016-11-23 08:32:53 -06:00
Alan Jeffrey
7ae19c07f0 Share script threads per-tab and per-eTLD+1. 2016-11-22 15:02:00 -06:00
bors-servo
bbc821607a Auto merge of #14173 - asajeffrey:script-thread-stores-top-level-frame-id, r=paulrouget
Report panics using the top-level frame id rather than the pipeline id

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

At the moment, we report panics from script and layout using the root pipeline id. Once we are sharing more script threads, there won't be a root pipeline id any more. The plan is only to share script threads in the same tab, so there will be a top-level frame id that all the pipelines have in common. This PR reports panics using that top-level frame id.

This mostly makes a difference to the browser API: rather than targeting a `mozbrowsererror` event at the root iframe of the script thread that panicked, it targets it at the containing mozbrowser iframe.

---
<!-- 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 we don't test crash reporting

<!-- 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/14173)
<!-- Reviewable:end -->
2016-11-21 15:51:59 -06:00
Rahul Sharma
114c491111 Initial work on job queues for service workers 2016-11-22 01:29:37 +05:30