Commit graph

906 commits

Author SHA1 Message Date
Simon Sapin
1f7ebfc8a2 Make mach test-unit not recompile components after mach build
Previously, the `tests` feature flag of the `embedder_traits` crate
caused it and every crate recursively depending on it to be built twice.

This feature flag was used to provide a specific set of "resources"
when running tests. Instead, this commits overrides the `main()` function
of the test harness to change resources at runtime before running any test.

This is done by adding a dependency that has `name = "test"` in its
`[lib]` section of `Cargo.toml`. This overrides the crate found by
`extern crate test;` in code generated by `rustc --test`.
2018-10-07 13:27:23 +02:00
bors-servo
ed86bc7ec6
Auto merge of #21688 - paulrouget:rm-clipboard, r=jdm
Let the clipboard crate handle the lack of clipboard support

---
<!-- 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/21688)
<!-- Reviewable:end -->
2018-09-13 03:08:53 -04:00
Paul Rouget
ec6cc56299 Let the clipboard crate handle the lack of clipboard support 2018-09-12 11:24:55 +02:00
Simon Sapin
2a996fbc8f Replace mpsc with crossbeam/servo channel, update ipc-channel
Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
2018-09-12 13:33:32 +08:00
kingdido999
e4cd04399e Format component compositing #21373 2018-08-31 08:19:22 +08:00
Gregory Terzian
e784f5a9f7 Refactor embedder NewBrowser flow 2018-08-11 01:13:11 +02:00
Paul Rouget
0d9161dd7b WR update 2018-08-06 07:22:24 +02:00
Anthony Ramine
20714bd08c Update to gleam 0.6 2018-07-18 18:31:51 +02:00
Bastien Orivel
9e446971a8 Update euclid to 0.18 2018-07-18 09:27:24 +02:00
Bastien Orivel
6354cd9a5e WIP: Dedupe dependencies 2018-07-16 08:59:15 +10:00
Simon Sapin
e39f741321 Remove components/nonzero, use std::num::NonZero instead 2018-06-16 00:14:41 +02:00
Gregory Terzian
2753e5efab improve spec compliance of window.close 2018-06-04 15:02:23 +08:00
Matt Brubeck
baf7dbf064 Basic pinch zoom handling 2018-05-24 14:42:46 -07:00
Gregory Terzian
d438240772 move msg to embedder_traits, use in script, handle send error in embedder 2018-05-23 21:45:57 +08:00
bors-servo
0a0f0d1c41
Auto merge of #20766 - mrobinson:fix-scrolling-issue, r=gw3583
Generate a frame when a transaction scrolls

This no longer happens automatically in WebRender, so we must do it
manually.

Fixes #20762.

<!-- 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 #20762.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because Servo does not currently test scrolling in a reliable way.

<!-- 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/20766)
<!-- Reviewable:end -->
2018-05-17 13:27:28 -04:00
bors-servo
d1f4fcfc51
Auto merge of #20750 - kwonoj:fix-wr-path, r=paulrouget
fix(capture_webrender): try fallback capture dir

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

This PR try to update behavior of webrender capture to have fallback dir - first it try to create under current working dir, if fails go back to $TMPDIR. I was debating between TMP vs $home, bit hesitate to create some folder under user's home dir directly so choose TMP instead. Can be easily changed, or add few more if needed.

---
<!-- 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 #20746 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
- locally verified on mac os

<!-- 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/20750)
<!-- Reviewable:end -->
2018-05-16 16:41:59 -04:00
Martin Robinson
dc1914ba3d Generate a frame when a transaction scrolls
This no longer happens automatically in WebRender, so we must do it
manually.

Fixes #20762.
2018-05-09 14:09:33 +02:00
Anthony Ramine
0f91712800 Update to gleam 0.5 2018-05-05 13:08:36 +02:00
OJ Kwon
1ec078a1e3
fix(capture_webrender): try fallback capture dir 2018-05-04 21:57:53 -07:00
OJ Kwon
9ff11b9af3
refactor(embedder): rename file select message 2018-04-27 12:23:26 -07:00
OJ Kwon
52b9e4f0ab
refactor(constellation): replace constellationmsg to filemanagermsg 2018-04-27 12:22:38 -07:00
OJ Kwon
2071245e5f
refactor(compositor): expose new embeddermsg 2018-04-27 12:21:17 -07:00
Bastien Orivel
8bd2e91cdc Update Webrender
Fixes #20609
2018-04-25 10:25:21 +02:00
Fabrice Desré
42886613d3 Notify the embedder when it should display or hide an IME 2018-04-21 19:46:42 -07:00
bors-servo
89bf7c2a92
Auto merge of #20658 - kvark:deglify, r=emilio
Make gleam optional for compositor, switch various names from glutin to winit

<!-- Please describe your changes on the following line: -->
The PR goes an extra step towards discriminating GL to a level of an optional dependency. This would ease up the transition to gfx-hal when the time calls for it, and upstreams some of the patches we've been using locally, cleans up some of the old cruft along the way.

---
<!-- 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 build-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #20612

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____ it's just refactoring

<!-- 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/20658)
<!-- Reviewable:end -->
2018-04-19 16:18:14 -04:00
Dzmitry Malyshau
7fa295d8e6 Make gleam optional for compositor, switch various names from glutin to winit 2018-04-18 22:40:47 -04:00
OJ Kwon
c2161da3ca
feat(browser): implement device select dialog 2018-04-18 11:39:32 -07:00
Matt McCoy
36c0e387dd Implement gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE) 2018-04-17 20:44:35 -04:00
Simon Sapin
52dceb3d5f Use new std::num::NonZero* types instead of deprecated core::nonzero::NonZero 2018-04-09 21:43:26 +02:00
Bastien Orivel
0918ac8cc7 Bump env_logger to 0.5 and log to 0.4 in every servo crate 2018-03-28 19:50:58 +02:00
Anthony Ramine
d6ebbd3e17 Implement gl.getParameter(gl.ALIASED_POINT_SIZE_RANGE) 2018-03-24 16:36:19 +01:00
bors-servo
91398cf559
Auto merge of #20320 - kwonoj:feat-wr-revision, r=jdm
feat(capture_webrender): write webrender revision into text

<!-- Please describe your changes on the following line: -->
Relates to https://github.com/servo/servo/pull/20315#issuecomment-373819735.

This PR try to generate `wr.txt` when trigger webrender capture. By reading gecko's implementation at [here](3b8e63c66a/gfx/doc/README.webrender (L53)), it seems gecko's build script generates txt file for containing revision of webrender and read it each time trigger capturing.

In this PR tries to similar in cruxwise with small differences:
- `cargo build` reads `cargo.lock`, export it into `${OUT_DIR}/`, included via macro in build time.
- when capturing triggered, those revision will be written as `wr.txt`.

Probably point of discussion & need to be updated in PR if necessary:
~- Is it acceptable `mach` generates module file on build bootstrapping? Should there be other recommendation?~ Now cargo build takes care of generation.

---
<!-- 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 #20295 (github issue number if applicable).

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

- This PR manually verified on local mac OS machine.

<!-- 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/20320)
<!-- Reviewable:end -->
2018-03-23 02:30:49 -04:00
OJ Kwon
5f6977306c
style(capture_webrender): use eprintln for error output 2018-03-22 23:20:27 -07:00
OJ Kwon
b957f6aad7
refactor(build): generate revision into out_dir 2018-03-22 23:20:26 -07:00
OJ Kwon
f9230975f5
refactor(build): generate revision via build.rs 2018-03-22 23:20:25 -07:00
Paul Rouget
1cdba8843d split window code and browser code in two different files 2018-03-22 08:07:32 +01:00
Paul Rouget
5e33dcd29d forward EmbedderMsg to embedder 2018-03-22 07:56:51 +01:00
Paul Rouget
10abe03948 Reduce the number of calls to the embedder by grouping the screen and window coordinates into one structure 2018-03-22 07:56:50 +01:00
Bastien Orivel
570d865065 Bump ipc-channel and bincode
This required bumping uuid too which unfortunately duplicated rand.
2018-03-21 13:05:47 +01:00
OJ Kwon
0671fcb5c7
feat(capture_webrender): write webrender revision into text 2018-03-19 15:47:22 -07:00
bors-servo
fc90e613d8
Auto merge of #20071 - paulrouget:typedsize, r=glennw
Use typed coordinates more

Requires https://github.com/servo/servo/pull/19895

We use Size2D and Point2D across compositing, constellation and script, loosing the type of pixels we use (DevicePixel, DeviceIndepententPixel or CSSPixel) along the way, which might lead to bugs like `window.outerHeight` not taking into account the page zoom (using DeviceIndepententPixel instead of CSSPixel).

This should make the situation a bit better.

---
<!-- 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
- [x] These changes do not require tests because we can't zoom in a test

<!-- 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/20071)
<!-- Reviewable:end -->
2018-03-16 17:18:24 -04:00
OJ Kwon
7b0beedf3d
feat(windowevent): expose CaptureWebRender event 2018-03-16 10:19:23 -07:00
OJ Kwon
b943a711f5
build(cargo): enable webrender capture feature 2018-03-16 09:59:57 -07:00
Paul Rouget
fef0506269 remove WindowMethods::size() 2018-03-16 14:58:17 +08:00
Paul Rouget
e25dd45139 alias some euclid types 2018-03-16 14:34:29 +08:00
Paul Rouget
ac4614d6ce Use typed coordinates.
We use Size2D and Point2D across compositing, constellation and script,
losing the type of pixels we use (DevicePixel, DeviceIndepententPixel
or CSSPixel) along the way, which might lead to bugs like
window.outerHeight not taking into account the page zoom (using
DeviceIndepententPixel instead of CSSPixel).
2018-03-16 14:34:29 +08:00
Paul Rouget
88bf133d2a Send window size even when there is not top level browsing context yet 2018-03-09 09:29:13 +08:00
Bastien Orivel
9ca18b510f Update image to 0.18 2018-02-28 16:25:35 +01:00
Bastien Orivel
c28dcbc3e5 Bump euclid to 0.17 2018-02-28 09:46:59 +01:00
Paul Rouget
ee25413c0f report panic to embedder 2018-02-13 09:40:08 +01:00