Commit graph

34802 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
74a9edfed3 dom: media: implement LayoutHTMLMediaElementHelpers trait for LayoutDom 2018-10-08 16:12:00 +02:00
Víctor Manuel Jáquez Leal
524750f41f dom: framerenderer: implement HTMLMediaFrameSource trait for MediaFrameRenderer 2018-10-08 16:12:00 +02:00
Víctor Manuel Jáquez Leal
623229dd8a layout: add HTMLMediaFrameSource trait and HTMLMediaData struct 2018-10-08 16:12:00 +02:00
Víctor Manuel Jáquez Leal
6e3c2fe41a dom: add mediaframewebrenderer 2018-10-08 16:11:59 +02:00
Víctor Manuel Jáquez Leal
781b3b712b Provide webrender_api::RenderApiSender to ScriptThread and DOM Window
This will allow the HTMLMediaElement later to get a handle to the
RenderApi for rendering video frames.

At a later time, all media handling should be moved to its own
thread/process that is communicated with via IPC. At that point this
can be removed again.

Original-patch-by: Sebastian Dröge <sebastian@centricular.com>
2018-10-08 16:11:59 +02:00
Víctor Manuel Jáquez Leal
77c7eda0bf HACK: don't call media_source_failure_steps when eos
Because gstreamer's appsrc queue might be big enough to swallow
the whole video holding the metadata extraction until EOS.
2018-10-08 16:11:59 +02:00
Víctor Manuel Jáquez Leal
ce76b5780a dom: htmlmediaelement: add initial player bits
Also removes the usage of audio-video-metadata crate (?)
2018-10-08 16:11:59 +02:00
Víctor Manuel Jáquez Leal
0ff9ecc18a add a fixme message of not implemented mode 2018-10-08 16:11:59 +02:00
Víctor Manuel Jáquez Leal
c8bc9c8740 htmlmediaelement: typo 2018-10-08 16:11:59 +02:00
Sebastian Kaspari
f8a84a763b
ServoView: Add default constructor.
Android's `View` has multiple constructors. Currently only `ServoView(Context, AttributeSet)` is available.
This constructor is usually used by Android when inflating a View from a layout XML file. However when
creating the `View` in code no `AttributeSet` is available.
2018-10-08 16:08:31 +02:00
bors-servo
eb13ddc00c
Auto merge of #21876 - jdm:maven, r=paulrouget
Support uploading maven artifacts.

This should make us upload the right files to for the maven generation to Just Work.

<!-- 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/21876)
<!-- Reviewable:end -->
2018-10-08 08:21:54 -04:00
Josh Matthews
991f1fb7fd Support uploading maven artifacts. 2018-10-08 07:49:33 -04:00
Anthony Ramine
05ef233097 Add a couple of bug links 2018-10-08 13:13:24 +02:00
Anthony Ramine
551c405b0f Avoid ctx.getImageData in canvas.toDataURL 2018-10-08 12:19:10 +02:00
Anthony Ramine
77c28bdfc9 Abstract some stuff common to ctx.getImageData and ctx.putImageData 2018-10-08 11:39:09 +02:00
Derek Guenther
496d26d2ee Add optional section for using lld-link on Windows 2018-10-07 22:56:10 -05:00
WPT Sync Bot
1c9e136e8e Update web-platform-tests to revision b0d2d2da21dfd03e86c5d710c926ae7df3b9f0d0 2018-10-07 22:54:00 -04:00
bors-servo
d048aa9c51
Auto merge of #21883 - servo-wpt-sync:wpt_update_06-10-2018, r=jdm
Sync WPT with upstream (06-10-2018)

Automated downstream sync of changes from upstream as of 06-10-2018.
[no-wpt-sync]

<!-- 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/21883)
<!-- Reviewable:end -->
2018-10-07 08:36:07 -04:00
bors-servo
87d32b31df
Auto merge of #21884 - servo:unit-rebuild, r=emilio
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`.

<!-- 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/21884)
<!-- Reviewable:end -->
2018-10-07 07:31:00 -04:00
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
WPT Sync Bot
db9cbb4b2e Update web-platform-tests to revision ba4ca501a5ebdee8cbfc006bf9e7e44231b188d1 2018-10-06 23:25:22 -04:00
Anthony Ramine
e62dbabb46 Handle some transparent black cases in ctx.getImageData 2018-10-07 02:52:06 +02:00
bors-servo
76ddbe4d7a
Auto merge of #21878 - servo-wpt-sync:wpt_update_05-10-2018, r=jdm
Sync WPT with upstream (05-10-2018)

Automated downstream sync of changes from upstream as of 05-10-2018.
[no-wpt-sync]

<!-- 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/21878)
<!-- Reviewable:end -->
2018-10-06 07:41:58 -04:00
Anthony Ramine
241dba064d Align ctx.createImageData and ctx.getImageData with the spec 2018-10-06 11:41:48 +02:00
Anthony Ramine
f13e35b2c5 Always make sure we get a surface in CanvasData::put_image_data 2018-10-06 10:53:10 +02:00
bors-servo
65710bee94
Auto merge of #21871 - paulrouget:servooptions, r=jdm
Make JNI code more robust and introduce antialiasing option

This throws exceptions in various places. Trying to reduce the amount of unwrap/expect.

---
<!-- 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 #21306 (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/21871)
<!-- Reviewable:end -->
2018-10-06 01:58:22 -04:00
Paul Rouget
5ddb8d577f Disable subpixel text antialiasing for ServoSurface 2018-10-06 07:57:07 +02:00
WPT Sync Bot
eda9b9b73a Update web-platform-tests to revision c2b30ef30749b6a8f2cc832761dfe011e63d5e94 2018-10-05 23:00:35 -04:00
Anthony Ramine
75e6f5dfaa Avoid copying pixels in ctx.putImageData sometimes 2018-10-06 02:59:25 +02:00
Anthony Ramine
19f40cdf0b Introduce ImageData::get_rect
We use that to send only the pixels that will be actually drawn to the
canvas thread in CanvasRenderingContext2d::PutImageData.

We also make the canvas thread byte swap and premultiply colours in-place.
2018-10-06 01:12:05 +02:00
Anthony Ramine
784fbb2bc1 Merge some byte swap/premultiply functions in their own crate 2018-10-06 01:11:55 +02:00
Anthony Ramine
a2e3dd4e86 Rename byte_swap_and_premultiply to byte_swap_colors_inplace
The function did not actually premultiply.
2018-10-06 00:05:04 +02:00
bors-servo
987e376ca7
Auto merge of #21868 - servo:webgl, r=jdm
Improve ctx.putImageData

<!-- 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/21868)
<!-- Reviewable:end -->
2018-10-05 11:09:46 -04:00
Anthony Ramine
82c7d71811 Improve gl.putImageData
This commit should allow us to send smaller blobs to the canvas thread,
I made it into its own commit just to try=wpt.
2018-10-05 17:07:58 +02:00
Anthony Ramine
3d910feb3a Align canvas.putImageData with spec
The arguments are supposed to be long values, not floats.
2018-10-05 17:07:56 +02:00
bors-servo
ba82eaa10e
Auto merge of #21872 - servo:rustup, r=nox
Upgrade to rustc 1.31.0-nightly (8c4ad4e9e 2018-10-04)

CC https://github.com/rust-lang/rust/issues/54846

<!-- 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/21872)
<!-- Reviewable:end -->
2018-10-05 09:16:34 -04:00
Simon Sapin
a846ed1654 Upgrade to rustc 1.31.0-nightly (8c4ad4e9e 2018-10-04)
CC https://github.com/rust-lang/rust/issues/54846
2018-10-05 15:06:29 +02:00
Paul Rouget
e0ce73abb2 Make JNI code more robust 2018-10-05 13:17:27 +02:00
Anthony Ramine
62ea3c093a Move canvas.putImageData checks to the DOM side 2018-10-05 00:35:39 +02:00
bors-servo
caa4d190af
Auto merge of #21867 - servo-wpt-sync:wpt_update_03-10-2018, r=jdm
Sync WPT with upstream (03-10-2018)

Automated downstream sync of changes from upstream as of 03-10-2018.
[no-wpt-sync]

<!-- 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/21867)
<!-- Reviewable:end -->
2018-10-04 03:15:13 -04:00
WPT Sync Bot
5e2118728a Update web-platform-tests to revision e29e596073468910d8655a8ec23262f17543e147 2018-10-03 23:02:48 -04:00
bors-servo
e56db1f322
Auto merge of #21865 - servo:influent, r=SimonSapin
Update the influent crate from 0.4.0 to 0.4.1

The tarball for 0.4.1 is 44 KB uncompressed and contains 18 files.

The tarball for 0.4.0 is 45 MB uncompressed and contains 22113 files, most of which appear to be the output of `cargo doc` that was accidentally included in a release.

CC https://github.com/servo/servo/pull/21863#issuecomment-426609991

<!-- 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/21865)
<!-- Reviewable:end -->
2018-10-03 10:40:27 -04:00
Simon Sapin
d2ee7663f3 Work around removal of remote files used by the build system
f5a8327415
2018-10-03 16:38:54 +02:00
Simon Sapin
8b43719baa Update the influent crate from 0.4.0 to 0.4.1
The tarball for 0.4.1 is 44 KB uncompressed and contains 18 files.

The tarball for 0.4.0 is 45 MB uncompressed and contains 22113 files,
most of which appear to be the output of `cargo doc` that was accidentally
included in a release.
2018-10-03 15:11:19 +02:00
bors-servo
74e7736720
Auto merge of #21850 - servo:webgl, r=jdm
Don't use an intermediate PNG buffer in HTMLCanvasElement::ToDataURL

<!-- 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/21850)
<!-- Reviewable:end -->
2018-10-03 06:00:50 -04:00
bors-servo
7fa2b2c879
Auto merge of #21842 - jdm:android-extra-frame, r=paulrouget
Fix flickering on Android

This is particularly noticeable in debug builds on WebGL pages, but also appears during startup when loading normal pages. requestRender() causes Android to swap buffers under the assumption that the buffer contains a fully rendered frame, but when calling it from `doFrame` there are no guarantees that Servo has finished compositing yet. This causes stale buffers to be composited instead, leading to flickering at startup when there is no content, or general jerkiness on pages using animation callbacks as previous frames replace current frames.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21796
- [x] These changes do not require tests because no android integration tests.

<!-- 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/21842)
<!-- Reviewable:end -->
2018-10-03 05:00:48 -04:00
Anthony Ramine
5efbeea61c Reindent the WebGL 2 case of canvas.toDataURL 2018-10-03 10:44:36 +02:00
Anthony Ramine
cfd446218b Slightly clean up the final URL creation in canvas.toDataURL 2018-10-03 10:43:41 +02:00
bors-servo
bbef671276
Auto merge of #21858 - servo-wpt-sync:wpt_update_02-10-2018, r=jdm
Sync WPT with upstream (02-10-2018)

Automated downstream sync of changes from upstream as of 02-10-2018.
[no-wpt-sync]

<!-- 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/21858)
<!-- Reviewable:end -->
2018-10-03 04:02:17 -04:00
WPT Sync Bot
2a8d9b6983 Update web-platform-tests to revision fec3928f355e049657d19780aa4b412d9d3a714b 2018-10-02 23:45:46 -04:00