Commit graph

522 commits

Author SHA1 Message Date
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
1d38bc0419 Fix some new warnings 2019-06-22 14:59:09 +02:00
Michal Mieczkowski
9c74e4d9ce Code cleanup 2019-06-13 20:33:55 +02:00
Michal Mieczkowski
18434c9927 Remove clipboard handling from constellation, and remove ScriptMessage for getting/setting clipboard 2019-06-13 20:15:12 +02:00
bors-servo
525d515a89
Auto merge of #23507 - gterzian:introduce_browsing_context_groups, r=asajeffrey
Implement browsing context group and set

<!-- 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 #23307 (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/23507)
<!-- Reviewable:end -->
2019-06-07 02:27:37 -04:00
Gregory Terzian
8c28852e90 implement browsing context group and set 2019-06-07 13:26:45 +08:00
oneturkmen
cd153efb4a Constellation: removed almost all opts::get 2019-06-03 19:59:02 -06:00
George Roman
be3cb00c77 Implement MouseEvent buttons attribute 2019-05-16 10:59:20 +03:00
bors-servo
fdafc833ae
Auto merge of #23135 - maharsh312:master, r=jdm
Create CanvasRect for OffscreenCanvas

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

Created CanvasRect fot OffscreenCanvas and Updated Testcases

---
<!-- 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
- [ ] `./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/23135)
<!-- Reviewable:end -->
2019-05-13 16:19:57 -04:00
Maharsh
1de8ddd89c Changes for sender reciever 2019-05-09 21:54:48 -04:00
Paul Rouget
7858ede29f Update SetCursor behavior 2019-04-25 09:39:16 +02:00
Anthony Ramine
44163148c2 Make use of RefCell::try_borrow_unguarded 2019-04-12 19:02:07 +02:00
bors-servo
1e4b42a90b
Auto merge of #23191 - paulrouget:no_proxy_clone, r=ferjm
Remove useless embedder proxy clone

<!-- 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/23191)
<!-- Reviewable:end -->
2019-04-11 20:42:12 -04:00
Paul Rouget
906a33ad0f Remove useless embedder proxy clone 2019-04-11 08:43:12 +02:00
Lucas Fantacuci
6b2be9b31d Implementing the builder pattern for RequestInit 2019-04-10 14:01:30 -03: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
Gregory Terzian
0780298b80 bound sampler buffer 2019-03-31 20:14:46 +08:00
bors-servo
2e0191b839
Auto merge of #23080 - jdm:sampling-profiler, r=gterzian
Add a sampling profiler

This uses the code already built for the background hang monitor and adds the ability to repeatedly sample all monitored threads. This sampling allows us to generate profiles that we can translate into the format used by https://perf-html.io/, allowing us to benefit from modern Gecko performance tooling.

You can run Servo with `PROFILE_OUTPUT=foo.json` and `SAMPLING_RATE=50` (for example), otherwise these values will default to `samples.json` and 10ms, respectively. To activate the profiler, press cmd+p, and to stop profiling, press cmd+p again. This will the captured samples to be symbolicated, which will take a very long time, and eventually there will be a new JSON profile in the output location.

To create a profile for use by Gecko's tools, run `python etc/profilicate.py path/to/profile.json >gecko_profile.json`, and load `gecko_profile.json` in the https://perf-html.io/ to see something like [this](https://profiler.firefox.com/public/8137e2b11fbb92afb80090bc534fd83015c87ee6/calltree/?globalTrackOrder=0-1&thread=1&v=3);

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #13103
- [x] These changes do not require tests because way too many pieces to automate

<!-- 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/23080)
<!-- Reviewable:end -->
2019-03-26 16:36:19 -04:00
Josh Matthews
8b7244f0d1 Support multiprocess in sampling profiler. 2019-03-26 16:35:10 -04:00
Josh Matthews
90f67c11e5 Add a sampling profiler and a script to generate profiles for use with Gecko tooling. 2019-03-26 16:35:08 -04:00
Peter Hall
8bfd4dc1e2 #8539 Config preferences backend restructure 2019-03-20 15:01:26 +00:00
Aron Zwaan
39c652ed13 Remove SetVisible message from iframe 2019-03-12 11:26:41 +01:00
bors-servo
34a5a824b8
Auto merge of #23000 - jdm:invisible-webgl, r=nox
Make webgl behave better with session history

This prevents the compositor from animating pages that are not actually visible, so pages using webgl do not needlessly impact the performance of the rest of the browser. Additionally, this fixes a problem that was alluded to in [this code](b5228c098b/src/draw_buffer.rs (L282-L285)), causing Servo to delete arbitrary resources when a GC occurred in content that used three.js.

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22987 and fix #22977 and fix #20934 and fix #20953 and fix #20930 and fix #20950 and fix #20924
- [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/23000)
<!-- Reviewable:end -->
2019-03-08 10:46:52 -05:00
Josh Matthews
c2ce7d72a1 Make nested browsing context navigations check the loaded status of the active document of the nested browsing context. 2019-03-07 19:01:54 -05:00
Josh Matthews
edfd15c36f Ensure iframe's contentWindow is updated when traversing the session history. 2019-03-07 18:58:53 -05:00
Josh Matthews
0e30666d18 Mark pipelines not visible when updating the active pipeline for a browsing context. 2019-03-07 18:47:49 -05:00
Simon Sapin
4464354e2e Reformat 2019-02-26 08:18:33 +01:00
Piotr Szpetkowski
abd577bfd4
Update bool pattern matching into if-else 2019-01-30 20:54:12 +01:00
Emilio Cobos Álvarez
90c0ec0cf7 Fix servo build and rustfmt recent changes.
We need to introduce another Cursor enum that is specific to embedder_traits and
that layout converts to to avoid dependency hell.
2019-01-20 16:31:01 +01:00
Josh Matthews
49a100ca8b Suppress iframe size messages from layout that include unchanged sizes. 2019-01-14 18:17:45 -05:00
Josh Matthews
45619db0ba Provide the source window as part of postMessage events. 2019-01-07 22:19:25 -05:00
Simon Sapin
be69f9c3e6 Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
Gregory Terzian
eb82e781a3 implement windowproxy "delay-load-event-mode", and partially document "completely-loaded" 2018-12-23 17:39:13 +08:00
Gregory Terzian
483bf245df constellation: restructure navigation, remove sync comm 2018-12-23 13:33:30 +08:00
Josh Matthews
231a37be24 Initial window sizes are mandatory. 2018-12-14 13:12:46 -05:00
bors-servo
92962de76c
Auto merge of #22411 - jdm:fix-webdriver, r=SimonSapin
Make desktop webdriver WPT harness work

This change allows me to run `./mach test-wpt --product servodriver --no-pause-after-test tests/wpt/mozilla/tests/mozilla/DOMParser.html` successfully again.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22409
- [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/22411)
<!-- Reviewable:end -->
2018-12-11 13:03:52 -05:00
Shotaro Yamada
c44a2febe6 Remove redundant .clone()s 2018-12-11 10:43:51 +09:00
Josh Matthews
b62a1ca662 Delay setting the constellation's active browser id until the context exists. 2018-12-10 18:43:26 -05:00
Connor Brewster
aecb48d5d1 Cleanup constellation after nll 2018-12-06 11:59:09 -06:00
Gregory Terzian
4eb785cdc0 introduce a background-hang-monitor:
Mac-Os implementation of a thread sampler,
Linux and Windows skeleton implementations.
2018-11-26 14:15:33 +08:00
bors-servo
98527ddb8c
Auto merge of #22224 - pyfisch:composition-webdriver, r=nox
Forward WebDriver CompositionEvent

Dispatch composition events in JS.
Insert characters from composition events to text input.

CompositionEvents currently can only be
created by WebDriver and not by embedders.

<!-- 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
- [ ] 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/22224)
<!-- Reviewable:end -->
2018-11-20 03:32:25 -05:00
Pyfisch
b936fea79d Forward WebDriver CompositionEvent
Dispatch composition events in JS.
Insert characters from composition events to text input.

CompositionEvents currently can only be
created by WebDriver and not by embedders.
2018-11-19 22:07:05 +01:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Bastien Orivel
9a7eeb349a Update crossbeam-channel to 0.3 2018-11-18 19:33:19 +01:00
Simon Sapin
9f977c5287 Remove useless use crate_name; imports.
A `crate_name::foo` path always works in 2018
2018-11-08 09:29:52 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Pyfisch
cb07debcb6 Format remaining files 2018-11-06 22:30:31 +01:00