Commit graph

6838 commits

Author SHA1 Message Date
Manish Goregaokar
ebf9ccc9de Basic XRSession interface 2018-12-19 15:40:38 -08:00
Manish Goregaokar
376426a936 Move VR interface to XR
The WebVR spec no longer has a navigator.vr, but there is a navigator.XR in the XR spec. Instead of duplicating work I've combined the two.
2018-12-19 14:33:54 -08:00
Josh Matthews
fc2d810bce Delay iframe and script element processing until the DOM is stable. 2018-12-14 13:12:49 -05:00
Josh Matthews
14b0de30db Prevent JS execution and layout operations while DOM in inconsistent state. 2018-12-14 13:12:47 -05:00
Josh Matthews
231a37be24 Initial window sizes are mandatory. 2018-12-14 13:12:46 -05:00
Josh Matthews
34e77f62af Ensure that all new iframes have a correct initial window size. 2018-12-14 13:00:47 -05:00
bors-servo
eab848df3e
Auto merge of #22433 - ferjm:player.eos.size, r=ceyusa
Improve implementation of media resource fetch algorithm

I have been observing inconsistent behaviors with my local tests depending of the media asset being played. I figured that we had these issues:

- We were setting the player EOS as soon as we got the first [process_response_eof](1046ae58a1/components/script/dom/htmlmediaelement.rs (L1596)). This is fine only if there is a single request. But that's not the case for multiple range requests or for seeks. Setting the player EOS makes the player appsrc reject any new buffers, and that breaks playback. Figuring out when is the right time to set the player EOS won't be a straight forward task, so my suggested fix for now is to simply not set it for now. It is a cleanup step that it would be nice to have but it is not mandatory.

- We were setting the input size more than once for multiple range requests and with the incorrect value. The fix uses the `content-length` or the `content-range` headers for single and range requests respectively.

- We were moving to the HaveEnoughData state if a fetch request succeded but no data was fetched from the network.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- 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/22433)
<!-- Reviewable:end -->
2018-12-12 18:38:25 -05:00
bors-servo
2e01a23bad
Auto merge of #22432 - servo:encoding, r=SimonSapin
Make the parser decode input from document's encoding

<!-- 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/22432)
<!-- Reviewable:end -->
2018-12-12 15:17:32 -05:00
Fernando Jiménez Moreno
8818898240 Do not move to HaveEnoughData state if no media data is fetched from the network 2018-12-12 18:08:40 +01:00
Fernando Jiménez Moreno
707b490c0f Signal EOS if media request fails 2018-12-12 16:52:37 +01:00
Lucas Fantacuci
ad3ec61d2f Implementing volume attribute into HTMLMediaElement 2018-12-12 11:50:35 -02:00
Anthony Ramine
a2abfc6301 Make the parser decode input from document's encoding
The document's encoding is only computed from the Content-Type header for now,
with no sniffing at all.
2018-12-12 13:50:27 +01:00
Fernando Jiménez Moreno
243b4e1a39 Do not set player EOS. Set input size only if it changes 2018-12-12 13:06:52 +01:00
Anthony Ramine
848a4e256a Fix an ignore_malloc_size_of comment 2018-12-12 11:29:14 +01:00
Anthony Ramine
d1d79bf947 Remove an argument to ServoParser::parse_html_script_input
Since the spec of document.open was updated, this argument became useless.
2018-12-12 11:29:14 +01:00
bors-servo
1046ae58a1
Auto merge of #22081 - KiChjang:onmessageerror, r=jdm
Add onmessageerror to WindowEventHandler

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

<!-- 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/22081)
<!-- Reviewable:end -->
2018-12-12 02:49:04 -05:00
Keith Yeung
3ee5a63199 Add onmessageerror to WindowEventHandler 2018-12-11 23:48:46 -08:00
Dan Robertson
62a9bfa0c5
script: Create structures for TextTrack API
Fill out the basics for the WebIDLs for the following:

  - TextTrack
  - TextTrackCue
  - TextTrackCueList
  - TextTrackList
2018-12-11 20:14:00 +00:00
bors-servo
eeaca0b26d
Auto merge of #22389 - jdm:anim-complete, r=emilio,ferjm
Cancel animations that affect nodes that do not participate in layout.

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22378
- [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/22389)
<!-- Reviewable:end -->
2018-12-10 18:04:49 -05:00
Josh Matthews
ed74b898a5 Cancel animations that affect nodes that do not participate in layout. 2018-12-10 08:59:17 -05:00
CYBAI
235fb5952d Introduce NavigationPreloadManager for ServiceWorkerRegistration 2018-12-08 16:50:18 +08:00
Anthony Ramine
b4448a9fe7 Use Utf8LossyDecoder instead of IncompleteUtf8 2018-12-05 16:39:07 +01:00
bors-servo
a0116827e6
Auto merge of #22336 - jdm:image-reload, r=Manishearth
Fix missing textures on reloading three.js image content

The fundamental problem is that three.js sets the crossOrigin property of an image, which kicks off an image microtask, and then sets the src. When the image URL is in the image cache (such as when reloading a page), this causes the shortcut to be taken and the image data is made available immediately, but the queued image task is unaware of this and asks the image cache to feed the image data. The existing code then ended up in an unexpected state when trying to deal with this data, such that when three.js received the image load notification and performed the texImage2D operation on the image data, it would discover that the image element did not claim to have a URL, and it would treat this as a broken image. Ultimately, this caused the texture that three.js obtained to be completely black.

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

<!-- 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/22336)
<!-- Reviewable:end -->
2018-11-30 22:38:49 -05:00
Josh Matthews
896a2de2ac Ensure that any image tasks queued before a cached image is available are ignored. 2018-11-30 14:49:37 -05:00
George Roman
6c458b04d2 Remove unused recycle argument from Document::unload 2018-11-30 18:08:08 +02:00
bors-servo
06f453a2b8
Auto merge of #22244 - georgeroman:response_statustext_default_change, r=jdm
Change Response's statusText default value from 'Ok' to an empty string

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

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

<!-- Either: -->
- [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. -->

<!-- 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/22244)
<!-- Reviewable:end -->
2018-11-28 13:10:11 -05:00
bors-servo
3f0643c1de
Auto merge of #22263 - Darkspirit:servo_preload, r=jdm
Preload servo.org

Pending submissions of servo.org and searchfox.org were [merged](https://chromium.googlesource.com/chromium/src/net/+log/master/http/transport_security_state_static.json) into the HSTS Preload list today.
r? @jdm

---
- [x] `./mach test-tidy` does not report any errors

<!-- 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/22263)
<!-- Reviewable:end -->
2018-11-28 02:34:31 -05:00
Manish Goregaokar
5413328be2 Update webrender 2018-11-27 17:33:13 -08:00
Jan Andre Ikenmeyer
f1f409ffb6
Update MPL license to https (part 5) 2018-11-27 19:09:17 +01:00
George Roman
73f11d69ea Change Response's statusText default value from 'Ok' to an empty string 2018-11-27 19:26:40 +02:00
bors-servo
2b410acbf9
Auto merge of #22225 - servo:webgl, r=emilio
Send an IpcSharedMemory in tex_image_2d and tex_sub_image_2d

<!-- 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/22225)
<!-- Reviewable:end -->
2018-11-21 10:21:41 -05:00
Anthony Ramine
9a8d03a0f3 Make HTMLCanvasElement::fetch_all_data return a shared memory blob 2018-11-21 12:53:50 +01:00
Fernando Jiménez Moreno
f98da2e7b7 HTMLMediaElement playing attribute 2018-11-21 09:42:53 +01:00
ddh
26007fddd3 refactored performance timing to align with updated spec
refactoring with ResourceFetchMetadata

implemented deprecated window.timing functionality

created ResourceTimingListener trait

fixed w3c links in navigation timing

updated include.ini to run resource timing tests on ci
2018-11-20 16:21:32 +00:00
bors-servo
3fe83f1d06
Auto merge of #22227 - vn-ki:audio-const, r=jdm
Implement Audio constructor

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

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because *tests were already there and the expectations were updated*.

<!-- 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/22227)
<!-- Reviewable:end -->
2018-11-20 09:11:17 -05:00
Anthony Ramine
804d964b7d Send an IpcSharedMemory in tex_image_2d and tex_sub_image_2d
This avoids a copy in the case of textures coming from HTMLImageElement.
2018-11-20 10:14:52 +01:00
Anthony Ramine
cfca906ee2 Call rgba8_byte_swap_colors_inplace on the WebGL thread 2018-11-20 10:14:52 +01:00
Anthony Ramine
2c0acf6b9b Move PixelFormat to the pixels crate 2018-11-20 10:14:52 +01:00
Anthony Ramine
ca62b5c318 Call prepare_pixels on the WebGL thread 2018-11-20 10:14:50 +01:00
Anthony Ramine
5f9e3d8bb9 Move prepare_pixels to canvas_traits::webgl 2018-11-20 10:14:50 +01:00
Anthony Ramine
2a5539caef Use Size2D in TexImage2D and TexSubImage2D messages 2018-11-20 10:14:49 +01: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
Vishnunarayan K I
684d1081d4 Implement Audio constructor 2018-11-20 13:30:45 +05:30
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
a1a14459c1
Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
Jan Andre Ikenmeyer
6b0c111126
Update MPL license to https (part 2) 2018-11-19 14:46:57 +01:00
Bastien Orivel
9a7eeb349a Update crossbeam-channel to 0.3 2018-11-18 19:33:19 +01:00
bors-servo
34bf312e0c
Auto merge of #22214 - jabedude:validate-argument, r=jdm
Add GetShaderPrecisionFormat argument validation

This patch adds a check on the shader_type argument. If it is not one either
FRAGMENT_SHADER or VERTEX_SHADER, we return INVALID_ENUM.

<!-- 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  #22080
<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because @jdm wants to wait until the PR is open to 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/22214)
<!-- Reviewable:end -->
2018-11-17 16:47:14 -05:00
Josh Abraham
4b5b3c3adb Add GetShaderPrecisionFormat argument validation
This patch adds a check on the shader_type argument. If it is not one either
FRAGMENT_SHADER or VERTEX_SHADER, we return INVALID_ENUM.
2018-11-17 08:18:12 -05:00
bors-servo
94991db145
Auto merge of #22202 - servo:webgl, r=jdm
Clean up some code on the WebGL texture upload paths

This doesn't actually change anything… yet.

<!-- 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/22202)
<!-- Reviewable:end -->
2018-11-17 02:35:22 -05:00