Commit graph

23929 commits

Author SHA1 Message Date
bors-servo
271ff16028
Auto merge of #26398 - Eijebong:fast-path-set-inner-html, r=jdm
Add a fast path in Element::SetInnerHTML when the value is small and trivial text

Inspired from gecko which has a similar fast path. This makes innerHTML
more than 10 times faster for this case.

Fixes #25892
2020-05-04 12:43:49 -04:00
Bastien Orivel
1b2464b4b6 Add a fast path in Element::SetInnerHTML when the value is small and trivial text
Inspired from gecko which has a similar fast path. This makes innerHTML
more than 10 times faster for this case.

Fixes #25892
2020-05-04 18:11:49 +02:00
Shamir Khodzha
492faa3105 fixed channels indexing in progress callback in BaseAudioContext.DecodeAudioData
Gstreamer backend returns channel as single bit mask (ie 1, 2, 4, 8, 32 etc).
Progress callback was using this mask as plain channel index, thus storing decoded
audio in wrong channel.
2020-05-04 00:48:51 +03:00
bors-servo
73abf56e99
Auto merge of #26215 - dralley:fix-image-border, r=jdm
Fix combination of border and border-radius being drawn incorrectly

fixes #20922

Manual testcase in the attached issue

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #20922

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because ___
2020-05-02 10:24:16 -04:00
bors-servo
d08c4fff15
Auto merge of #26336 - szeged:mmatyas__webgl_fns_getparam4, r=jdm
Add support for WebGL2 MIN_PROGRAM_TEXEL_OFFSET

Improves the support of the WebGL2 `MIN_PROGRAM_TEXEL_OFFSET` property (ie. stores it as a signed integer) and adds support for querying it using GetParameter.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2

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

cc @jdm @zakorgy

Depends on #26333 because they touch the same test files.

---
<!-- 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] 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. -->
2020-05-01 13:30:05 -04:00
Martin Robinson
3903c1fb98 Add support for animationend event
This is triggered when an animation finishes. This is a high priority
because it allows us to start rooting nodes with animations in the
script thread.

This doesn't yet cause a lot of tests to pass because they rely on the
existence of `Document.getAnimations()` and the presence of
`animationstart` and animationiteration` events.
2020-05-01 15:29:57 +02:00
bors-servo
ed392ab3be
Auto merge of #26363 - mrobinson:animation-split-update-style, r=emilio
Split animation cancellation from update_style_for_animation

`update_style_for_animation` previously handled both canceling defunct
animations and also updating style to reflect current animation state.
This change splits those two concerns because we want to start handling
replaced or canceled animations and finished animations in two different
places.

This is a refactor, so ideally it shouldn't change any behavior.

<!-- 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
- [x] These changes do not require tests because they should not change behavior.

<!-- 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. -->
2020-04-30 16:24:50 -04:00
bors-servo
4bfe70c4ae
Auto merge of #26333 - szeged:mmatyas__webgl_fns_getparam3, r=jdm
Add support for even more WebGL2 GetParameter enums

Adds support for the following new WebGL2 GetParameter values:

- `PACK_ROW_LENGTH`
- `PACK_SKIP_PIXELS`
- `PACK_SKIP_ROWS`
- `RASTERIZER_DISCARD`
- `UNPACK_IMAGE_HEIGHT`
- `UNPACK_ROW_LENGTH`
- `UNPACK_SKIP_IMAGES`
- `UNPACK_SKIP_PIXELS`
- `UNPACK_SKIP_ROWS`

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2

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

Depends on #26265 because they touch the same test file.

cc @jdm @zakorgy

---
<!-- 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] 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. -->
2020-04-30 16:09:35 -04:00
bors-servo
39e4eb43c3
Auto merge of #26296 - ramyananth:master, r=jdm
Implementing createImageBitmap

<!-- Please describe your changes on the following line: -->
Implementing createImageBitmap method for canvas image source.

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

<!-- 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. -->
2020-04-30 12:05:21 -04:00
Martin Robinson
0ab4260d6b Split animation cancellation from update_style_for_animation
`update_style_for_animation` previously handled both canceling defunct
animations and also updating style to reflect current animation state.
This change splits those two concerns because we want to start handling
replaced or canceled animations and finished animations in two different
places.

This is a refactor, so ideally it shouldn't change any behavior.
2020-04-30 15:45:07 +02:00
Mátyás Mustoha
1431a389da Add support for WebGL2 MIN_PROGRAM_TEXEL_OFFSET
Improves the support of the WebGL2 `MIN_PROGRAM_TEXEL_OFFSET` property
(ie. stores it as a signed integer) and adds support for querying it
using GetParameter.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2
2020-04-30 10:11:11 +02:00
Mátyás Mustoha
ff33b88f72 Add support for even more WebGL2 GetParameter enums
Adds support for the following new WebGL2 GetParameter values:

- `PACK_ROW_LENGTH`
- `PACK_SKIP_PIXELS`
- `PACK_SKIP_ROWS`
- `RASTERIZER_DISCARD`
- `UNPACK_IMAGE_HEIGHT`
- `UNPACK_ROW_LENGTH`
- `UNPACK_SKIP_IMAGES`
- `UNPACK_SKIP_PIXELS`
- `UNPACK_SKIP_ROWS`

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2
2020-04-30 10:09:52 +02:00
Josh Matthews
0c87590071 Update test results for macOS. 2020-04-30 00:21:50 -04:00
Josh Matthews
9ce84d94de webgl: Return TEXTURE_IMMUTABLE_FORMAT as a boolean; don't panic on macOS for TEXTURE_IMMUTABLE_LEVELS. 2020-04-30 00:21:49 -04:00
Josh Matthews
3876d6dbdd webgl: Add missing RGB8 texture format combination. 2020-04-30 00:21:49 -04:00
Mátyás Mustoha
54b100b0f1 webgl: Fix tidy 2020-04-30 00:21:49 -04:00
Josh Matthews
29ab55d076 webgl: Fix support for float/half-float texture formats. 2020-04-30 00:21:49 -04:00
Mátyás Mustoha
8789a6a8d8 Add support for WebGL2 TexStorage2D
Adds initial support for the WebGL2 `TexStorage2D` call, adds
support for the related texture enums and enables some of the
texture tests.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.6
2020-04-30 00:21:48 -04:00
bors-servo
3bedd44026
Auto merge of #26354 - jdm:mmatyas__webgl_fns_getparam2, r=jdm
Add support for some more WebGL2 limit parameters

Adds support for the following new WebGL2 GetParameter values:

- `MAX_ELEMENT_INDEX`
- `MAX_ELEMENTS_INDICES`
- `MAX_ELEMENTS_VERTICES`
- `MAX_FRAGMENT_INPUT_COMPONENTS`
- `MAX_SAMPLES`
- `MAX_SERVER_WAIT_TIMEOUT`
- `MAX_TEXTURE_LOD_BIAS`
- `MAX_VARYING_COMPONENTS`
- `MAX_VERTEX_OUTPUT_COMPONENTS`

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2
2020-04-29 23:49:55 -04:00
bors-servo
343f249c1d
Auto merge of #26352 - asajeffrey:webxr-glwindow-red-cyan, r=Manishearth
Add a pref for webxr glwindow anaglyphic red-cyan stereo

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

Allows us to test out 3D content using old-skule glasses.

---
<!-- 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 do not require tests because it's back end work

<!-- 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. -->
2020-04-29 22:06:23 -04:00
JayalakshmiV
ef6f99d8f5 implemented CreateImageBitmap function for Canvas image source 2020-04-29 21:51:10 -04:00
Alan Jeffrey
d4f0dbce25 Add a pref for webxr glwindow anaglyphic red-cyan stereo 2020-04-29 17:23:48 -05:00
bors-servo
d1279ebdc6
Auto merge of #26331 - mrobinson:animation-update-on-restyle, r=jdm,emilio
Restyle should reflect animations and transitions

When doing a restyle, we should apply animations and transitions to the
new style so that it is reflected in `getComputedStyle()` and the new
style information properly cascades. This is the first part of properly
ticking animations and transitions.

This causes a couple new animations tests failures (along with many new
passes), but we currently don't have support for properly handling
animations after they have completed, so this isn't totally unexpected.

<!-- 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 #20116

<!-- 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. -->
2020-04-29 18:06:24 -04:00
Mátyás Mustoha
c5f0bff99e Add support for some more WebGL2 limit parameters
Adds support for the following new WebGL2 GetParameter values:

- `MAX_ELEMENT_INDEX`
- `MAX_ELEMENTS_INDICES`
- `MAX_ELEMENTS_VERTICES`
- `MAX_FRAGMENT_INPUT_COMPONENTS`
- `MAX_SAMPLES`
- `MAX_SERVER_WAIT_TIMEOUT`
- `MAX_TEXTURE_LOD_BIAS`
- `MAX_VARYING_COMPONENTS`
- `MAX_VERTEX_OUTPUT_COMPONENTS`

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2
2020-04-29 14:49:04 -04:00
Martin Robinson
5ca2e7ce91 Restyle should reflect animations and transitions
When doing a restyle, we should apply animations and transitions to the
new style so that it is reflected in `getComputedStyle()` and the new
style information properly cascades. This is the first part of properly
ticking animations and transitions.

This causes a couple new animations tests failures (along with many new
passes), but we currently don't have support for properly handling
animations after they have completed, so this isn't totally unexpected.
2020-04-29 15:31:31 +02:00
bors-servo
ba0df48d47
Auto merge of #26346 - jdm:console-caller, r=Manishearth
Improve devtools output for console APIs

These changes use the new API from https://github.com/servo/rust-mozjs/pull/508 to report meaningful filenames and line numbers for APIs that trigger devtools output. They also cause error messages originating from uncompiled event handlers to report a more relevant filename; this differs from Gecko's behaviour, but provides a more useful debugging experience in my opinion.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #9604 and fix #26344.
- [x] These changes do not require tests because devtools aren't tested.
2020-04-29 00:18:36 -04:00
Josh Matthews
ab7ade4efe Report real caller information for console APIs to devtools. 2020-04-28 21:32:41 -04:00
bors-servo
1aab10f20a
Auto merge of #26325 - jdm:devtools-nav, r=gterzian
Improve devtools experience when navigating

The primary motivation for this work was to fix #15425, and these changes make it possible to use the devtools to meaningfully inspect multiple pages when navigating between them. Navigating through session history is not yet supported.

These changes also include improvements to the dedicated worker support, which broke at some point. We now can observe console messages in workers.
2020-04-28 16:56:11 -04:00
Josh Matthews
02ce6188aa Update devtools page titles. 2020-04-28 15:40:38 -04:00
Josh Matthews
b53ce5c79a Ignore eager JS evaluation in devtools. 2020-04-28 15:40:02 -04:00
bors-servo
bb7a5b6dba
Auto merge of #26343 - atouchet:url, r=jdm
Update link

<!-- 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 #___ (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. -->
2020-04-28 14:37:42 -04:00
Josh Matthews
3dfec95268 Update browsing context title/url when navigating. 2020-04-28 12:23:34 -04:00
Alex Touchet
7ac6917ca6
Update link 2020-04-28 09:09:54 -07:00
bors-servo
ddd8e2aca2
Auto merge of #26339 - szeged:mmatyas__webgl_fns_getbufparam, r=jdm
Add support for WebGL2 buffer types in GetBufferParameter

This makes the new buffer types introduced in WebGL2 usable by the GetBufferParameter call.

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

cc @jdm @zakorgy

---
<!-- 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] 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. -->
2020-04-28 11:46:29 -04:00
Josh Matthews
b9bf9f873b Move some console-related message types into the console code. 2020-04-28 11:07:45 -04:00
Josh Matthews
565e9432c6 Support connecting to worker globals from remote devtools. 2020-04-28 11:07:45 -04:00
bors-servo
1f34c55c23
Auto merge of #26316 - Manishearth:hands, r=asajeffrey
Add experimental hand tracking support

Depends on https://github.com/servo/webxr/pull/162

Adds support for [the experimental hand tracking API](https://github.com/immersive-web/webxr-hands-input/blob/master/explainer.md) (with some tweaks made that I intend to upstream).

This needs https://github.com/servo/webxr/pull/163 to actually run on any backend, however that depends on some openxrs changes.

If folks want to try this out, patch in
https://github.com/servo/webxr/pull/163 and run https://manishearth.net/sand/three.js/examples/webxr_vr_paint.html . You also need to toggle the `dom.webxr.hand` pref.

<!-- 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
- [x] These changes do not require tests because this is an experimental API

<!-- 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. -->
2020-04-28 08:33:19 -04:00
Mátyás Mustoha
2810c8d413 Add support for WebGL2 buffer types in GetBufferParameter
This makes the new buffer types introduced in WebGL2 usable by the
GetBufferParameter call.
2020-04-28 14:06:02 +02:00
Manish Goregaokar
c30ad6c422 Add XRJointPose 2020-04-27 17:35:48 -07:00
Manish Goregaokar
ad6da0591c Add XRHand[index] 2020-04-27 17:35:48 -07:00
Manish Goregaokar
89fac8be5c Add XRJointSpace 2020-04-27 17:35:48 -07:00
Manish Goregaokar
c89dc821ba Add XRHand interface 2020-04-27 17:35:48 -07:00
Manish Goregaokar
6ad3e0c047 Add dom.webxr.hand feature 2020-04-27 17:35:48 -07:00
bors-servo
c9909643a2
Auto merge of #26293 - jdm:jsonup, r=ferjm
Update serde_json.
2020-04-27 16:11:06 -04:00
Manish Goregaokar
d4a90b12a8 Update webxr 2020-04-27 08:02:41 -07:00
Josh Matthews
bce4ec5b70 Support clearing cached events in console actor. 2020-04-26 18:11:23 -04:00
Josh Matthews
7c48644cad Support navigating browsing contexts in the devtools.
Break the association between pipelines and browsing context actors.
Now there is one browsing context actor per actual browsing context,
and individual actors keep track of known pipelines as necessary.
There is also one console/performance/timeline/inspector/etc. actor
per browsing context.

This also centralizes more information in the browsing context actor.
Rather than duplicating state for the active pipeline in actors that
need to use it, each actor now remembers the name of its associated
browsing context actor and obtains that state whenever it's necessary.
2020-04-26 18:11:23 -04:00
atouchet
0da9ba5bbe More Cargo.toml updates 2020-04-25 18:26:49 -07:00
atouchet
b5a3f016db Some Cargo.toml cleanups 2020-04-25 12:19:40 -07:00
bors-servo
537e575d3d
Auto merge of #26308 - mrobinson:animation-events2, r=jdm,emilio
Add support for transitionrun events

These events are triggered as soon as a transition is added to the list
of running transitions. This will allow better test coverage while
reworking the transitions and animations processing model.

<!-- 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: -->
- [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. -->
2020-04-25 00:08:22 -04:00