Commit graph

499 commits

Author SHA1 Message Date
Paul Rouget
016d9a62ab Do not wake up embedder on each animation tick 2019-12-16 16:50:36 +01:00
Josh Matthews
564c16d754 Use non-IPC webrender API over explicit IPC channels. 2019-11-27 20:47:53 -05:00
Zakor Gyula
12893aa010 Initial implementation of WebGPU API 2019-11-21 08:30:26 +01:00
Fernando Jiménez Moreno
07483f1d44 Switch play and pause buttons according to playback state 2019-11-20 13:34:29 +01:00
Fernando Jiménez Moreno
b048d7faf7 Fix media session action handling 2019-11-20 13:34:29 +01:00
Fernando Jiménez Moreno
68baabba63 Format code and fix rebase errors 2019-11-20 13:33:51 +01:00
Fernando Jiménez Moreno
85ec66b43e Move active media session logic to constellation 2019-11-20 13:33:51 +01:00
Fernando Jiménez Moreno
89d9e3ad78 Introduce embedder MediaSessionEvent and move active session to Servo 2019-11-20 13:33:15 +01:00
Fernando Jiménez Moreno
4d147d2c56 Register media instance with session and prepare communication with embedder 2019-11-20 13:33:14 +01:00
Fernando Jiménez Moreno
6233f78de4 MediaSessionAction message from embedder to script thread 2019-11-20 13:32:10 +01:00
bors-servo
0d2c2045cc
Auto merge of #24664 - gterzian:fix_port_transfer, r=jdm
Fix loophole in messageport transfer

<!-- 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 #24600 (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. -->
2019-11-18 11:35:25 -05:00
Gregory Terzian
a256f2fcce fix complete messageport transfer 2019-11-15 14:13:04 +08:00
Paul Rouget
42ee1a86f6 Properly set event.buttons value on mousemove 2019-11-11 16:00:44 +01:00
Simon Sapin
94b19beefb Fix some warnings new in Rust Nightly 2019-11-08 11:45:16 +01: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
7c365b0324 Centralize definitions of window sizes and DPI in compositor/constellation during startup. 2019-11-06 16:13:55 -05:00
Paul Rouget
56b3005721 Only updated history once 2019-11-05 12:05:50 +01:00
Patrick Walton
a358bca766 Use surfman for managing GL surfaces
Co-authored-by: Alan Jeffrey <ajeffrey@mozilla.com>
Co-authored-by: Zakor Gyula <gyula.zakor@h-lab.eu>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2019-11-01 08:47:11 -05:00
bors-servo
2ad6e94091
Auto merge of #24525 - glowe:issue-23009/separate_angle_and_disable_vsync, r=jdm
Issue 23009/separate angle and disable vsync

The `--angle` and `--disable-vsync` options were declared as global options, but only used in the Glutin embedding for desktop builds. Moving them to the Glutin embedding code makes them easier to update in the future.

I modified `opts::from_cmdline_args` to accept a `getopts::Options` (as prescribed in the issue) and augmented `opts::ArgumentParsingResult` to include an `opts::Matches` and `content-process` String when appropriate. I could use some feedback on this last bit. I could have changed the function to return `opts::Matches` and have the embedding code look for the presence of `content-process`, but I felt that the approach I went with was closer to the original design.

The other aspect I'm not sure about is moving `disable-vsync` from a global debug option to a plain embedder option. This changes the command line interface for glutin, which is maybe bad. However I wasn't sure whether it was worth preserving the original behavior given the complexity of injecting debug options into `opts::from_cmdline_args`.

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes partially fix #23009 – there are 2 more options to deal with, but I'm not sure if we should handle them yet.
- [x] These changes do not require tests because this is a refactoring and I'm hoping that the existing tests cover these changes.

r? @jdm
2019-10-26 14:58:54 -04:00
glowe
0ee300479e Extract device_pixels_per_px from global opts
This is also an embedder specific option, so removing it from the
global options makes sense.
2019-10-26 12:00:14 -04:00
Anthony Ramine
785a344e32 Update rand to 0.7 (fixes #24448) 2019-10-23 15:34:48 +02:00
bors-servo
61dc04a293
Auto merge of #24492 - gterzian:update_timer_scheduler, r=asajeffrey
Update timer scheduler to use crossbeam

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

It seems time to update the timer scheduler implementation to use crossbeam constructs.

---
<!-- 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. -->
2019-10-21 12:18:07 -04:00
Gregory Terzian
c893c8955d update timer scheduler to use crossbeam 2019-10-20 23:42:34 +08:00
Gregory Terzian
2f8932a6a1 continue messageport, transferable, postmessage options 2019-10-19 14:28:18 +08:00
Shotaro Yamada
b228d2700e Remove unused dependencies 2019-10-01 21:15:53 +09:00
bors-servo
9a4f90bf0c
Auto merge of #24058 - Eijebong:ipc-channel, r=jdm
Update ipc-channel and related dependencies

<!-- 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/24058)
<!-- Reviewable:end -->
2019-08-27 18:40:40 -04:00
Bastien Orivel
92161ecfbc Update ipc-channel and related dependencies 2019-08-27 23:44:04 +02:00
George Roman
f064883e07 Implement pointerMove webdriver action 2019-08-22 10:11:13 +03:00
Gregory Terzian
34008a317b introduce a pipeline namespace installer 2019-08-21 14:20:01 +02:00
George Roman
d3696baf27 Implement TakeElementScreenshot WebDriver command 2019-08-20 00:52:46 +03:00
bors-servo
3658a8cc59
Auto merge of #23988 - georgeroman:implement_pointer_up_and_down_actions, r=jdm
Implement pointerDown and pointerUp webdriver actions

<!-- 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/23988)
<!-- Reviewable:end -->
2019-08-18 12:17:24 -04:00
Gregory Terzian
8482d2e781 restructure content process shutdown ack with threaded sender, without layout 2019-08-17 16:03:07 +02:00
George Roman
225cecf661 Implement pointerDown and pointerUp webdriver actions 2019-08-16 22:08:11 +03:00
bors-servo
376847c415
Auto merge of #23805 - georgeroman:initial_actions_support_in_webdriver, r=jdm
Initial Actions support 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

<!-- 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/23805)
<!-- Reviewable:end -->
2019-08-15 19:26:53 -04:00
Bastien Orivel
c693ef7025 Update rand to 0.6
I changed the isaac random to always be the 32 bits one because the 64
bits version doesn't work with ReseedingRng as it requires the
generator's output to be u32 for some reasons.

The other main change is that the reseed method doesn't exist anymore
and now rand recreates a new generator when it needs to reseed so I had
to add a new method for when we don't want a generator to be reseeded.

Closes #23558
2019-08-11 20:50:22 +02:00
George Roman
75efb09147 Initial actions support in WebDriver 2019-08-10 23:18:03 +03:00
Josh Matthews
a2ca3ddbd9 Remove extra webgl message pumping thread. 2019-07-25 23:07:23 -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
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
Fernando Jiménez Moreno
208473cdbc Final tweaks: use expect and remove unnecessary crate attributes 2019-07-04 10:43:32 +02:00
Fernando Jiménez Moreno
7d589ed4f5 Media crate 2019-07-04 10:25:49 +02:00
Víctor Manuel Jáquez Leal
dd01728d53 Pass GLPlayerThreads to constellation
Create the thread only if the GL context is known.
2019-07-04 10:25:47 +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
bors-servo
e382266b22
Auto merge of #23564 - mmiecz:clipboard-refactoring, r=jdm
Clipboard refactoring

<!-- Please describe your changes on the following line: -->
This PR removes clipboard handling from the constellation. Instead, now embedder handles it.

---
<!-- 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 #23440 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it is enough to test manually in input box, if copying and pasting still works .

<!-- 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/23564)
<!-- Reviewable:end -->
2019-07-03 15:20:15 -04: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
Simon Sapin
1df2605292 Rename {azure,raqote}_backend feature flags to canvas2d-{azure,raqote} 2019-07-01 15:46:33 +02:00
Simon Sapin
eddfe3af83 impl Trait is stable 2019-07-01 14:54:47 +02:00
oneturkmen
42569280e2 Script: removed a few opts::get() 2019-06-26 22:23:07 -06:00
Simon Sapin
1d38bc0419 Fix some new warnings 2019-06-22 14:59:09 +02:00