Commit graph

496 commits

Author SHA1 Message Date
Manish Goregaokar
5f69a9e66a Expose webxr registry to window 2019-07-10 23:12:34 -07:00
Fernando Jiménez Moreno
cd17b6ca66 Fix typos, warnings and other nits 2019-07-04 10:26:48 +02:00
Fernando Jiménez Moreno
7d589ed4f5 Media crate 2019-07-04 10:25:49 +02:00
Víctor Manuel Jáquez Leal
9f4f9dc750 Add media (WindowGLContext) module in canvas_trait
This module adds a structure (WindowGLContext) which holds the
OpenGL parameters that are going to be used by servo-media player
to render video frames using OpenGL.

In order to fill this structure, three new methods were added to
WindowMethods trait. In this patch only the Glutin-based
implementation provides a simple boilerplate.

The WindowGLContext is created in the entry point of libservo, when
the application window is created, and later passed to the
constellation, the pipeline and to the window element in dom, thus
htmlmediaelement has a mean to obtain these parameters via its
window.
2019-07-04 10:24:01 +02:00
Alan Jeffrey
9eb75d4ea6 Use webxr IPC to get a WebXR device registry to each script thread 2019-07-03 08:53:40 -05:00
Kamil Niski
adb402487e Create a helper API for entering a DOM object's compartment
Revert some unnecessary changes

Fix fmt errors
2019-06-29 19:23:17 +02:00
oneturkmen
42569280e2 Script: removed a few opts::get() 2019-06-26 22:23:07 -06:00
bors-servo
57205318c5
Auto merge of #23587 - jdm:smup67, r=asajeffrey
Upgrade to SpiderMonkey 67

<!-- 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/23587)
<!-- Reviewable:end -->
2019-06-26 18:51:14 -04:00
Josh Matthews
63714c90fb Upgrade to Spidermonkey 67. 2019-06-26 18:10:46 -04:00
bors-servo
2cbd177082
Auto merge of #23581 - georgeroman:implement_get_page_source_wd_command, r=jdm
Implement GetPageSource WebDriver command

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

---
<!-- 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

<!-- 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/23581)
<!-- Reviewable:end -->
2019-06-22 19:11:59 -04:00
Simon Sapin
1d38bc0419 Fix some new warnings 2019-06-22 14:59:09 +02:00
George Roman
13d908ab15 Implement GetPageSource WebDriver command 2019-06-17 13:06:29 +03:00
Josh Matthews
b1510d9ad5 Upgrade headers, headers-core, and hyper_serde. 2019-06-13 11:08:16 -04:00
bors-servo
b3eed5b5bd
Auto merge of #23544 - georgeroman:fix_borrow_mut_error_in_webdriver, r=asajeffrey
Fix already borrowed error in webdriver

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

---
<!-- 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 #23535

<!-- 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/23544)
<!-- Reviewable:end -->
2019-06-10 14:26:17 -04:00
George Roman
1dda774518 Fix already borrowed error in webdriver 2019-06-10 17:49:46 +03:00
Robert Snakard
35bca991ad Implement WheelEvent Interface
Note: The WheelEvent interface supports rotation in all 3 spatial
dimensions. This implementation only supports two due to limitations
in the Glutin compositor.

The wheelevent interface is a dom interface that triggers for any
attached device that can rotate in one or more spatial dimensions.
Traditionally this is the mouse wheel though other devices could be
used as well. E.g. the trackball on a trackball mouse.
2019-06-09 13:25:01 -04:00
est31
8b6ed3d182 Remove unused code from script* crates 2019-06-02 07:12:26 +02:00
bors-servo
7e766e9189
Auto merge of #23171 - hundredeir:find_elem_elems, r=jdm
add webdriver command "Find elements from Element"

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- 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/23171)
<!-- Reviewable:end -->
2019-05-19 15:25:07 -04:00
George Roman
be3cb00c77 Implement MouseEvent buttons attribute 2019-05-16 10:59:20 +03:00
Josh Matthews
4328713f71 Update to SpiderMonkey 66. 2019-05-10 22:43:43 -04:00
Fernando Jiménez Moreno
8eba587547 Merge Node::shadow_including_inclusive_ancestors into inclusive_ancestors 2019-04-26 11:42:38 +02:00
bors-servo
b73956cc37
Auto merge of #23090 - miller-time:nav-fetch-referrer, r=gterzian
Add referrer to navigation fetch request

<!-- Please describe your changes on the following line: -->
Implement step 13 of [following hyperlinks](https://html.spec.whatwg.org/#following-hyperlinks-2) and step 14.3 of [window open](https://html.spec.whatwg.org/#window-open-steps), as well as other referrer- and fetch-related updates.

---
<!-- 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 #22890 (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/23090)
<!-- Reviewable:end -->
2019-04-25 20:21:23 -04:00
bors-servo
4e12deb7b6
Auto merge of #23115 - pylbrecht:measure.blocked.layout.queries, r=jdm
measure blocked layout queries

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

---
<!-- 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 #19797

<!-- Either: -->
- [ ] 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/23115)
<!-- Reviewable:end -->
2019-04-22 10:52:49 -04:00
Russell Cousineau
2440e0f98a set referrer in window.load_url
- this conforms to follow-hyperlinks spec step 13
- this conforms to window-open spec step 14.3
- replace uses of `referrer_url` with `referrer`
- in Request class, change "no-referrer" to ""
- set websocket fetch referrer to "no-referrer"
2019-04-19 16:50:38 -07:00
aditj
64961cc9c1 Add webdriver deletecookies function 2019-04-19 13:15:50 +05:30
pylbrecht
4fd9fea7a6 fixup! Measure layout queries blocked by ongoing layout 2019-04-17 17:23:17 +02:00
Philipp Albrecht
858011c513 Measure layout queries blocked by ongoing layout 2019-04-13 07:42:07 +02:00
Lucas Fantacuci
6b2be9b31d Implementing the builder pattern for RequestInit 2019-04-10 14:01:30 -03:00
hundredeir
a00b5b2053 Formatted code 2019-04-07 14:31:59 +05:30
hundredeir
816e599db3 Add webdriver command Find elements from element 2019-04-06 23:36:40 +05:30
bors-servo
e7b65c42c4
Auto merge of #23143 - CYBAI:remove-compound-microtasks, r=jdm
Remove compound microtasks

We handled compound microtasks as microtasks so, basically, we only need
to remove the naming of `compound`.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23140
- [x] These changes do not require tests because the updated spec is more about editorial.

<!-- 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/23143)
<!-- Reviewable:end -->
2019-04-05 10:51:09 -04:00
Kamal Umudlu
a8995fbf1a Bug: #22853 - Make Window::set_fullscreen pass a non-None value when entering fullscreen is fixed and SetFullscreenState in exit_fullscreen changed to False
Added patch for bug:22853

Added implementation to exit from fullscreen mode by pressing ESC button

Added patch that supports to exit from fullscreen mode by pressing ESC

Deleted patch files

Added all requested changes on project

Removed the loop over self.pending_changes in switch_fullscreen_mode function

Bug #22853 - Make Window::set_fullscreen pass a non-None value when entering fullscreen is fixed and SetFullscreenState in exit_fullscreen changed to False

Added missing bracket in constellation.rs file to fix build issue

Bug: #22853 --> Make Window::set_fullscreen pass a non-None value when entering fullscreen is fixed and SetFullscreenState in exit_fullscreen changed to False
2019-04-01 18:29:02 -04:00
CYBAI
e88858388a Remove compound microtasks
We handled compound microtasks as microtasks so, basically, we only need
to remove the naming of `compound`.
2019-03-31 21:19:42 +09:00
elias
be82d7c905 ran ./mach fmt
- removed unused import in document_loader.rs
- limit unsafe block in mark_document_with_no_blocked_loads in script_thread.rs
- changed name of if let value to load in Drop for LoadBlocker in document_loader.rs
2019-03-14 14:10:29 -05:00
elias
c713febe7a let mark_document_with_no_blocked_loads() take a None value silently 2019-03-13 11:21:58 -05:00
bors-servo
9513544e91
Auto merge of #23008 - georgeroman:implement_webdriver_find_elem_from_elem, r=Manishearth
Implement WebDriver FindElementFromElement command

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

---
<!-- 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

<!-- 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/23008)
<!-- Reviewable:end -->
2019-03-11 20:47:27 -04:00
bors-servo
90e5f6264c
Auto merge of #23013 - servo:rm-rooted-reference, r=jdm
Simplify RootedReference and make it specifically about slices

It's now called `DomSlice<T>`.

<!-- 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/23013)
<!-- Reviewable:end -->
2019-03-11 14:32:13 -04:00
bors-servo
f2ea73f360
Auto merge of #22802 - gterzian:only_run_tasks_for_fully_active_docs, r=nox
In BC event-loop, only run tasks related to fully-active documents

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

---
<!-- 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 #22792 (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/22802)
<!-- Reviewable:end -->
2019-03-11 12:32:03 -04:00
Anthony Ramine
5fe5e5d6de Remove most RootedReference uses
We can replace all uses of RootedReference for Option<T> by Option::deref calls.
2019-03-10 17:51:35 +01:00
George Roman
46cd0d17ee Implement WebDriver FindElementFromElement command 2019-03-09 16:56:51 +02:00
Josh Matthews
edfd15c36f Ensure iframe's contentWindow is updated when traversing the session history. 2019-03-07 18:58:53 -05:00
Gregory Terzian
ecfb9c639a in BC event-loop, only run tasks related to fully-active documents 2019-03-06 14:18:18 +08:00
bors-servo
fb95f9df9c
Auto merge of #22353 - jdm:runtime-parent, r=nox
Update rust-mozjs

These changes adjust our uses of the rust-mozjs APIs to accommodate the changes in https://github.com/servo/rust-mozjs/pull/450.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22342.
- [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/22353)
<!-- Reviewable:end -->
2019-01-17 15:57:30 -05:00
Josh Matthews
367014a4ea Reintroduce parent runtimes for worker threads. 2019-01-15 14:00:13 -05:00
Anthony Ramine
e57d09abb8 Make Window::scroll_offsets store keys as OpaqueNode values
This is the type that is supposed to signal that we will never ever
try to get back a Node from it in an unsafe way, unlike
UntrustedNodeAddress.
2019-01-14 16:51:26 +01:00
Anthony Ramine
fc75719ff2 Remove BlockFlowDisplayListBuilding
Replaced by inherent methods on BlockFlow, the only implementor of that trait.
2019-01-14 10:37:41 +01:00
Anthony Ramine
17ee21bf9d Rename NewLayoutThreadInfo to LayoutThreadInit
Following the convention of our other init structs.
2019-01-14 10:26:25 +01:00
Josh Matthews
51ab14086c Synchronously update the pipeline of same-origin iframe elements as soon as the child document begins parsing. 2019-01-07 22:19:26 -05:00
Josh Matthews
45619db0ba Provide the source window as part of postMessage events. 2019-01-07 22:19:25 -05:00
bors-servo
c4a6dcfe4b
Auto merge of #22528 - Manishearth:webxr, r=jdm,MortimerGoro
Preliminary WebXR support

This implements just enough WebXR to display to 3DOF devices in
immersive mode only.

Couple missing things:

 - [ ] Handling reference spaces (even if just supporting eye-level spaces)
 - [x] Spec links
 - [ ] We enter immersive mode when baseLayer is set, but it seems like
we're supposed to do this when requestSession is called (https://github.com/immersive-web/webxr/issues/453)
 - [ ] VR/XR should block less (https://github.com/servo/servo/issues/22505)
 - [x] More pref-gating
 - [x] `views` is a method instead of an attribute because we don't support FrozenArray

<s>Once I add spec links and pref gating</s> this can be landed as-is for further experimentation.

r? @jdm @MortimerGoro

<!-- 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/22528)
<!-- Reviewable:end -->
2019-01-04 02:54:16 -05:00