Commit graph

326 commits

Author SHA1 Message Date
Connor Brewster
e700006fb2 Handle exceptions during upgrades 2017-08-09 14:36:20 -06:00
Connor Brewster
e83a0045f9 Add upgrade reaction 2017-08-09 11:06:44 -06:00
Fernando Jiménez Moreno
892b30edca Implement basic Time To First Paint and First Contentful Paint PWMs 2017-07-20 15:41:21 +02:00
bors-servo
a6739cb17f Auto merge of #17761 - cbrewster:ce_reactions, r=jdm
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 -->
2017-07-18 12:37:46 -07:00
bors-servo
eb26194dd1 Auto merge of #17735 - ferjm:navigationstart, r=jdm
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 -->
2017-07-18 10:24:44 -07:00
Fernando Jiménez Moreno
db044bdbef Set navigation start value according to navigation timing spec 2017-07-18 17:42:14 +02:00
Connor Brewster
438191e0b2 Implement CEReactions codegen 2017-07-18 08:18:22 -06:00
bors-servo
7b134440fc Auto merge of #17614 - cbrewster:custom_element_reactions, r=jdm
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 -->
2017-07-17 22:58:53 -07:00
Connor Brewster
9b587a4f2d Invoke backup element queue via a microtask 2017-07-17 22:23:47 -06:00
Connor Brewster
4665991503 Support custom element callback reactions 2017-07-17 22:23:45 -06:00
bors-servo
2bb4f65100 Auto merge of #16508 - brainlessdeveloper:fetch-set-origin, r=asajeffrey
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 -->
2017-07-17 08:29:23 -07:00
Fausto Núñez Alberro
6032940fb8 Change RequestInit origin type to ImmutableOrigin 2017-07-16 21:44:33 +02:00
Alan Jeffrey
ef033b8362 Implemented paint worklet properties. 2017-07-11 17:28:56 -05:00
Imanol Fernandez
fe4ee6de2e WebVR 1.1 spec compatibility 2017-07-05 22:38:29 +02:00
Alan Jeffrey
328fb25a65 Implemented paint worklet rendering context. 2017-06-30 16:41:08 -05:00
Bastien Orivel
76d8573393 Bump serde to 1.0 2017-06-16 13:31:18 +02:00
bors-servo
0c53ba318a Auto merge of #17323 - ibmandura:issue16057, r=jdm
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 -->
2017-06-15 12:36:19 -07:00
budaim
11fb9db7bf Fixing issue #16057 2017-06-14 17:06:11 +02:00
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