Commit graph

9570 commits

Author SHA1 Message Date
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
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
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
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
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
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
JayalakshmiV
ef6f99d8f5 implemented CreateImageBitmap function for Canvas image source 2020-04-29 21:51:10 -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
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
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
565e9432c6 Support connecting to worker globals from remote devtools. 2020-04-28 11:07:45 -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
d4a90b12a8 Update webxr 2020-04-27 08:02:41 -07: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
Josh Matthews
2a0700e78b Report openxr failure at app startup. 2020-04-24 14:47:21 -04:00
Martin Robinson
d386d6d1f1 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.
2020-04-24 14:20:37 +02:00
bors-servo
3078b352a7
Auto merge of #26231 - utsavoza:ugo/issue-23522/16-04-2020, r=gterzian
Implement various checks on the Location setters

Since there are no existing open PRs for the issue, I am raising one based on the work done by @UxioAndrade and @braddunbar in previous two PRs for the issue (#25714 and #23670) respectively.

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23522
- [x] There are tests for these changes
2020-04-24 05:30:18 -04:00
bors-servo
25220049d9
Auto merge of #26289 - he4d:master, r=jdm
Replaced failible boolean with an enum

<!-- Please describe your changes on the following line: -->
Replaced the boolean `fallible` argument of some WebGL object methods with the new `enum Operation { Fallible, Infallible }` that was added to the `webglrenderingcontext`. This improves the readability of that methods.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because the issue says so

<!-- 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-24 02:04:07 -04:00
Utsav Oza
b10de7793a Implement various checks on the Location setters
Implement various checks on the Location setters

Set correct referrer url before for href location setter

Update wpt-metadata for failing tests

Try updating tests/wpt/metadata/url/failure.html.ini
2020-04-24 10:08:01 +05:30
Josh Matthews
1ce68eb4ea webgl: Update IDL from upstream to avoid overloading issues. 2020-04-23 16:13:56 -04:00
Tobias Tschinkowitz
9c343fcc96 Replaced failible boolean with an enum 2020-04-23 18:23:01 +02:00
bors-servo
610991bdfc
Auto merge of #26244 - mrobinson:animation-cancel, r=jdm
Add support for canceling CSS transitions

This change adds support for canceling CSS transitions when a property is
no longer transitionable. Support for canceling and replacing CSS
transitions when the end value changes is still pending. This change
also takes advantage of updating the constellation message to fix a bug
where transition events could be sent for closed pipelines.

Fixes #15079.

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

<!-- 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-22 15:34:06 -04:00
bors-servo
84fe99b1d5
Auto merge of #26253 - asajeffrey:script-dummy-content-editble, r=jdm
Add a dummy implementation of contentEditable

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

Add a dummy implementation of `contentEditable`.

---
<!-- 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 the existing wpt tests should do

<!-- 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-22 11:32:05 -04:00
Martin Robinson
453b252a65 Add support for canceling CSS transitions
This change adds support for canceling CSS transitions when a property
is no longer transitionable or when an element becomes styled with
display:none. Support for canceling and replacing CSS transitions when
the end value changes is still pending. This change also takes advantage
of updating the constellation message to fix a bug where transition
events could be sent for closed pipelines.

Fixes #15079.
2020-04-22 17:23:26 +02:00
Mátyás Mustoha
a90f034976 Fix InvalidateSubFramebuffer error handling
The WebGL2 InvalidateSubFramebuffer function should generate
INVALID_VALUE when width or height is negative.
2020-04-22 12:45:56 +02:00
Alan Jeffrey
c00eb62090 Add a dummy implementation of contentEditable 2020-04-21 19:12:52 -05:00
Manish Goregaokar
30cd89d2d8 Add feature gating for hit tests 2020-04-19 20:29:14 -07:00
Manish Goregaokar
1b07b77323 Add XRSession::requestHitTestSource() 2020-04-19 20:29:14 -07:00
Manish Goregaokar
f1d6a89150 Add XRFrame::getHitTestResults() 2020-04-19 20:29:14 -07:00
Manish Goregaokar
87bce8cde9 Add XRHitTestResult::getPose 2020-04-19 20:29:14 -07:00
Manish Goregaokar
c7b91523d0 Add XRHitTestResult 2020-04-19 20:29:14 -07:00
Manish Goregaokar
341d36a826 Add XRHitTestSource 2020-04-19 20:29:14 -07:00
Manish Goregaokar
83f92a3181 Update XRRay semantics
Implements changes from https://github.com/immersive-web/hit-test/pull/85
2020-04-19 20:29:14 -07:00
Manish Goregaokar
7dd2a71d6d Add XRRay.matrix 2020-04-19 20:29:14 -07:00
Manish Goregaokar
e7ba4e5a47 Add XRRay(transform) constructor 2020-04-19 20:29:14 -07:00
Manish Goregaokar
977b36d855 Add XRRay constructors 2020-04-19 20:29:14 -07:00