Commit graph

828 commits

Author SHA1 Message Date
bors-servo
901fef5fa9
Auto merge of #24742 - servo:jdm-patch-34, r=asajeffrey
Reduce unnecesarily large borrow in script thread

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24730
- [x] There are tests for these changes
2019-11-16 18:32:27 -05:00
Simon Sapin
bea73951db Use #![register_tool] instead of #![register_attr]
CC https://github.com/rust-lang/rust/issues/66079
2019-11-15 17:24:42 +01:00
Josh Matthews
8846cda501 script: Reduce scope of borrows for history updates. 2019-11-14 14:11:53 -05:00
jaymodi98
bf69b6fea7 Implement srcdoc support for iframes. 2019-11-12 13:57:54 -05:00
Josh Matthews
91dfa354b1 Ensure layout/script always have a correct viewport size when a new pipeline is created. 2019-11-06 16:13:55 -05:00
Josh Matthews
2aa5ddf922 script: Ignore redundant resize notifications. 2019-11-06 16:13:55 -05:00
Gregory Terzian
2f8932a6a1 continue messageport, transferable, postmessage options 2019-10-19 14:28:18 +08:00
Keith Yeung
c3b17c1201 begin messageport, transferable objects, impl
Accept transfer argument for StructuredCloneData::write

Allow structured clone reads to return a boolean

Add Transferable trait

Add basic skeletons to MessagePort

Implement transfer and transfer-receiving steps on MessagePort

Use transfer and transfer_receive in StructuredClone callbacks

Implement MessageChannel

Freeze the array object for the MessageEvent ports attribute

Implement transfer argument on window.postMessage

Use ReentrantMutex instead for MessagePortInternal

Accept origin as a parameter in dispatch_jsval

Fix BorrowMut crash with pending_port_message

Detach port on closure and check for detached during transfer

Enable webmessaging tests

fix webidl

fix
2019-10-19 14:12:22 +08:00
Gregory Terzian
45ec250b0a improve spec compliance of discarding BCs
do not handle compositor input events when BC is being discarded

prevent firing of timers for discarded BCs

return null for opener is BC has been discarded

bundle discard BC steps into window method

return null in window.opener, if BC has already been discarded

move the window closed check pre-event to script-thread
2019-09-22 12:46:40 +08:00
Paul Rouget
ea7b581537 Do not allow XR session on non user-activated events 2019-09-20 07:52:26 +02:00
George Roman
32f7254883 Implement ElementClick wd command 2019-08-31 10:14:40 +03:00
George Roman
f064883e07 Implement pointerMove webdriver action 2019-08-22 10:11:13 +03:00
George Roman
d3696baf27 Implement TakeElementScreenshot WebDriver command 2019-08-20 00:52:46 +03:00
bors-servo
00a9f30773
Auto merge of #23951 - georgeroman:return_errorstatus_from_webdriverhandlers, r=jdm
Return ErrorStatus from webdriver_handlers

<!-- Please describe your changes on the following line: -->
With `webdriver 0.40`, `ErrorStatus` implements `Deserialize`. Now we can accommodate for multiple errors occuring in `webdriver_handlers`.

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

<!-- 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/23951)
<!-- Reviewable:end -->
2019-08-19 02:10:41 -04:00
George Roman
d7b9fede99 Return ErrorStatus from webdriver_handlers 2019-08-18 15:30:55 +03:00
Gregory Terzian
8482d2e781 restructure content process shutdown ack with threaded sender, without layout 2019-08-17 16:03:07 +02:00
Simon Sapin
9392180007 Update to url 2.0 2019-08-17 10:03:44 +02:00
marmeladema
6d444afd9e Use safe JSContext in MicrotaskQueue 2019-08-09 00:02:10 +01:00
Simon Sapin
c38c964f1b Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30) 2019-07-31 13:34:01 +02:00
Josh Matthews
bfd9bbe82a Use origin of final HTTP response as document origin. 2019-07-29 21:58:58 -04:00
Josh Matthews
a2ca3ddbd9 Remove extra webgl message pumping thread. 2019-07-25 23:07:23 -04:00
marmeladema
88cacfb009 Modify *::get_cx methods to return a safe JSContext instead of a raw one 2019-07-24 09:53:10 +01:00
bors-servo
7ffe65e672
Auto merge of #23745 - georgeroman:implement_get_element_property_wd_command, r=jdm
Implement GetElementProperty wd 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/23745)
<!-- Reviewable:end -->
2019-07-23 21:24:57 -04:00
Emilio Cobos Álvarez
3d57c22e9c Update euclid.
There are a few canvas2d-related dependencies that haven't updated, but they
only use euclid internally so that's not blocking landing the rest of the
changes.

Given the size of this patch, I think it's useful to get this landed as-is.
2019-07-23 23:09:55 +02:00
George Roman
e34a15c5ef Implement GetElementProperty WebDriver command 2019-07-23 23:19:08 +03:00
George Roman
0ec852eb41 Implement link and partial link text selectors for FindElement and related WebDriver commands 2019-07-23 09:55:47 +03:00
George Roman
bf6ea64e8c Implement tag name selector for FindElementsFromElement WebDriver command 2019-07-21 15:57:26 +03:00
George Roman
616a81fb27 Implement tag name selector for FindElementFromElement WebDriver command 2019-07-21 15:56:24 +03:00
George Roman
dec73e4cea Implement tag name selector for FindElements WebDriver command 2019-07-21 15:56:23 +03:00
George Roman
7d5b324bda Implement tag name selector for FindElement WebDriver command 2019-07-21 15:55:19 +03:00
bors-servo
2dfbbd0ca2
Auto merge of #23368 - gterzian:clean_up_navigation, r=asajeffrey
Clean-up navigation

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

1. Navigation as a result of following a hyperlink should be done in a task: https://html.spec.whatwg.org/multipage/links.html#following-hyperlinks:dom-manipulation-task-source
2. The javascript url navigation should also be done in a task: https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigating-across-documents:dom-manipulation-task-source
3. In `window.load_url`, it seems there is no need to send a message to the script-thread(the entirety of `load_url` should instead be done in a task when appropriate), so we can just do that last part "sync" by calling a method on the script, which will send a message to the constellation(for the parallel navigation steps), or queue task(for the JS navigation), as appropriate.
4. Separate the "normal" navigation flow from the handling of "navigate an iframe" message from constellation, since doing everything in one method as was previously done with `handle_navigate`, is confusing.

---
<!-- 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 #___ (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/23368)
<!-- Reviewable:end -->
2019-07-18 14:22:03 -04:00
Gregory Terzian
571beec179 clean-up navigation
security: check target and source origin before executing JS url

implement replacement-enabled flag as a HistoryEntryReplacement enum

add source origin string on loaddata

add LoadOrigin

iframe: remove optional load-data

auxiliaries: add load-data into info

constellation: remove url from Pipeline::new

check load origin: link to whatwg issue

switch loadorigin toplevel to constellation
2019-07-18 12:03:45 +08:00
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