Commit graph

508 commits

Author SHA1 Message Date
Nicolas Silva
8617320500 Bump euclid to 0.14. 2017-06-14 16:00:59 +02:00
Alan Jeffrey
a47e94c8f6 Added Debug implementations. 2017-06-13 10:46:59 -05:00
Nikhil Shagrithaya
541baafe1c Redirect document loads manually 2017-05-31 17:28:53 +05:30
Alan Jeffrey
79743b5358 Webdriver uses browsing context ids rather than pipeline ids. 2017-05-25 17:14:28 -05:00
Alan Jeffrey
42577365b7 Added a TopLevelBrowsingContextId type. 2017-05-22 09:27:07 -05:00
bors-servo
f05491166f Auto merge of #16861 - gterzian:use_microtask_to_await_stable_state, r=jdm
Use microtasks to await a stable state.

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

@jdm @KiChjang First pass at using microtasks to await a stable state. I ran into all sorts of problems to get it to compile, I think it's mainly related to the fact that the microtasks are stored in a `Vec`, which meant the `Runnalbe.handler(self: Box<Self>)` couldn't be called while iterating over the Vec... It compiles now although I haven't run any tests. I'm assuming I'm missing something fundamental and was hoping my changes would highlight the problems I run into, and you had a better idea of how to implement this... Perhaps we shouldn't pass a `Runnable` to `await_stable_state` at all?

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #15375 (github issue number if applicable).

<!-- Either: -->
- [ ] 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/16861)
<!-- Reviewable:end -->
2017-05-19 20:09:54 -05:00
Gregory Terzian
a8390aea24 use microtasks to await a stable state 2017-05-19 17:29:16 +08:00
Alan Jeffrey
af8436c9be Implemented Houdini worklets. 2017-05-17 09:01:05 -05:00
bors-servo
5da0aa9f11 Auto merge of #16883 - jdm:mutationobserver, r=jdm
Mutation Observer API

Rebased from #16668.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix (partially) #6633
- [X] There are tests for these changes

<!-- 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/16883)
<!-- Reviewable:end -->
2017-05-17 01:21:40 -05:00
Alan Jeffrey
607e011b05 Renamed constellation::Frame to constellation::BrowsingContext. 2017-05-15 21:03:11 -05:00
Sumit
3ca89204ff Mutation Observer API 2017-05-15 18:15:38 -04:00
Josh Matthews
b0bf2b4bad Make methods storing layout-originating nodes unsafe. 2017-05-15 14:12:08 -04:00
Josh Matthews
dabebdfbf5 Root nodes for the duration of their CSS transitions.
This ensures that we can pass a node address as part of the asynchronous
transition end notification, making it safe to fire the corresponding
DOM event on the node from the script thread. Without explicitly rooting
this node when the transition starts, we risk the node being GCed before
the transition is complete.
2017-05-15 14:07:41 -04:00
bors-servo
34d0e59849 Auto merge of #16845 - asajeffrey:script-rename-browsing-contexts, r=jdm
Renamed BrowsingContext to WindowProxy in script.

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

Renamed `script::dom::BrowsingContext` to `script::dom::WindowProxy`.

The browsing context is mostly maintained in the constellation, not in script. It would be nice to rename `constellation::Frame` to `constellation::BrowsingContext`, but that will be very confusing if there are two `BrowsingContext` types.

---
<!-- 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 renamings aren't externally visible

<!-- 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/16845)
<!-- Reviewable:end -->
2017-05-13 07:09:29 -05:00
Alan Jeffrey
43ca260689 Renamed BrowsingContext to WindowProxy in script. 2017-05-12 15:02:35 -05:00
Connor Brewster
d004db95cf Make non-initial about:blank loads asynchronous
Don't update iframe pipeline until load completes

To preserve the previous functionality of delaying load events when a
new navigation is triggered, pending pipeline id represents the
current pending load. The load event is only fired if the load message's
pipeline id matches the pending pipeline id.

Track frame size on Frame instead of Pipeline

Disabled matchMedia test

Track creator pipeline id
2017-05-12 11:53:43 -06:00
ddh
2c6bd51bef added origin to globalscope 2017-04-24 13:15:42 +01:00
Imanol Fernandez
0158b5b2af Implement Gamepad API 2017-04-12 15:43:14 +02:00
Sumit
107ac9ab56 Implement basic interface for MutationObserver and MutationRecord. 2017-04-05 01:52:38 -04:00
Fernando Jiménez Moreno
fb878f33d1 Terminate timer scheduler thread during shutdown 2017-03-30 14:27:40 +02:00
Fernando Jiménez Moreno
72d7ee613b Make image cache per-document rather than global 2017-03-27 19:54:13 +02:00
Alan Jeffrey
6bcb5f68be Implement dissimilar-origin window.parent and window.top. 2017-03-17 10:53:20 -05:00
Alan Jeffrey
f9c5d0c117 Implement dissimilar-origin postMessage. 2017-03-15 14:57:25 -05:00
Alan Jeffrey
5348b63e38 Implement setter for document.domain 2017-03-15 10:34:23 -05:00
Alan Jeffrey
1f61a549a3 Added some same-origin-domain checks. 2017-03-14 14:36:03 -05:00
Josh Matthews
dc5335a21e Move checks for document completion to the end of the event loop.
This better reflects the text of the specification - rather than
queuing a task to dispatch the load evnet as soon as the document
loader is unblocked, we want to "spin the event loop until there
is nothing that delays the load event in the Document." Spinning
the event loop is a concept that requires running tasks
completely, hence we check the condition before returning to the
start of the event loop.
2017-03-07 14:02:42 +05:30
Josh Matthews
c890c9143c Make script thread initiate requests for images needed by layout.
In support of this goal, the layout thread collects information about
CSS images that are missing image data and hands it off to the script
thread after layout completes. The script thread stores a list of
nodes that will need to be reflowed after the associated network
request is complete. The script thread ensures that the nodes are
not GCed while a request is ongoing, which the layout thread is
incapable of guaranteeing.

The image cache's API has also been redesigned in support of this
work. No network requests are made by the new image cache, since it
does not possess the document-specific information necessary to
initiate them. Instead, there is now a single, synchronous
query operation that optionally reserves a slot when a cache
entry for a URL cannot be found. This reserved slot is then
the responsibility of the queryer to populate with the contents
of the network response for the URL once it is complete. Any
subsequent queries for the same URL will be informed that the
response is pending until that occurs.

The changes to layout also remove the synchronous image loading
code path, which means that reftests now test the same code
that non-test binaries execute. The decision to take a screenshot
now considers whether there are any outstanding image
requests for layout in order to avoid intermittent failures in
reftests that use CSS images.
2017-02-22 14:19:35 -05:00
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