Commit graph

6319 commits

Author SHA1 Message Date
bors-servo
56f6762cf8
Auto merge of #21015 - tigercosmos:yyy, r=jdm
Support cloning steps for textarea/input

<!-- 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 #13282 (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/21015)
<!-- Reviewable:end -->
2018-06-07 10:13:30 -04:00
tigercosmos
73c0af6759 support textarea clone 2018-06-07 06:54:26 -07:00
Anthony Ramine
f1288cc6e0 Implement EXT_texture_filter_anisotropic 2018-06-06 12:24:47 +02:00
bors-servo
652a177ff5
Auto merge of #19511 - DonatJR:implement-read-methods-on-filereadersync, r=jdm
Implement read methods on FileReaderSync

<!-- Please describe your changes on the following line: -->
Implemented the read methods on the FileReaderSync struct according to https://w3c.github.io/FileAPI/#dfn-FileReaderSync

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

<!-- 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/19511)
<!-- Reviewable:end -->
2018-06-04 15:55:14 -04:00
Jonas Reinwald
0fdafb08c8 Implement read methods on FileReaderSync 2018-06-04 15:53:08 -04:00
bors-servo
0b6df7ef4d
Auto merge of #20915 - servo:webgl, r=jdm
Implement EXT_shader_texture_lod

<!-- 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/20915)
<!-- Reviewable:end -->
2018-06-04 11:11:31 -04:00
Anthony Ramine
4e5e1e6c33 Implement EXT_shader_texture_lod 2018-06-04 16:33:05 +02:00
bors-servo
65eff4fb8a
Auto merge of #20865 - gterzian:improve_spec_compliance_window_close, r=cbrewster
improve spec compliance of window.close

<!-- Please describe your changes on the following line: -->
Improve the spec compliance of https://html.spec.whatwg.org/multipage/window-object.html#dom-window-close, mainly by implementing the steps related to [closing a browsing context](https://html.spec.whatwg.org/multipage/window-object.html#close-a-browsing-context)

---
<!-- 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/20865)
<!-- Reviewable:end -->
2018-06-04 06:16:45 -04:00
Gregory Terzian
2753e5efab improve spec compliance of window.close 2018-06-04 15:02:23 +08:00
CYBAI
f2ad35209f Fix typo for worklet 2018-06-03 20:34:28 +08:00
Emilio Cobos Álvarez
aea5e146fe
dom: Remove CSSStyleDeclaration.setPropertyValue/setPropertyPriority. 2018-06-02 17:24:12 +02:00
Emilio Cobos Álvarez
274bc4df3e
dom: don't parse internal properties in CSSStyleDeclaration. 2018-06-02 12:24:44 +02:00
bors-servo
022daccbe1
Auto merge of #20884 - jdm:more-limits, r=avadacatavra
Don't forward GL parameter gets for constant limits.

This avoids IPC traffic for unchanging constants that are determined when the GL context is created. These changes require https://github.com/emilio/rust-offscreen-rendering-context/pull/123.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #20876.
- [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/20884)
<!-- Reviewable:end -->
2018-05-31 15:03:43 -04:00
Josh Matthews
76c29f8bd0 Don't forward GL parameter gets for constant limits. 2018-05-31 14:24:18 -04:00
Alan Jeffrey
d0cc9d2cd5 Updated to mozjs v0.7.1. 2018-05-30 14:44:47 -05:00
bors-servo
0356be3021
Auto merge of #20879 - tigercosmos:ccc, r=jdm
Update type of custom element constructor

<!-- 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 #20875 (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/20879)
<!-- Reviewable:end -->
2018-05-30 08:09:36 -04:00
tigercosmos
6d426f7c14 Update type of custom element constructor 2018-05-30 10:00:12 +08:00
Josh Matthews
b1202cfa9f
Don't panic when tearing down a WebGL context and the thead is unreachable.
This avoids some cascading double-panics when there are errors in the WebGL rendering thread.
2018-05-29 15:26:39 -04:00
bors-servo
2439ab02b8
Auto merge of #20837 - gterzian:tests_for_has_event_listener, r=cbrewster
Fix for document salvageable state

I noticed a bug where if the document was un-salavageable due to the presence of `beforeunload` listeners, this could be overwritten if there were no listeners for `unload`. This could also have happened if an iframe of the document had no listeners while the parent did.

<!-- 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/20837)
<!-- Reviewable:end -->
2018-05-28 15:52:31 -04:00
bors-servo
4e6b100c7e
Auto merge of #20864 - tigercosmos:aa1, r=emilio
remove misleading spec url

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

`pub fn scroll_area(&self)` in `node.rs` is only called by `fn ScrollHeight(&self)` and `fn ScrollWidth(&self)` in `element.rs`.

`scrolltop` and `scrollleft` are actually implemented in `element.rs`.

The misleading spec urls should be removed.

<!-- 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/20864)
<!-- Reviewable:end -->
2018-05-26 09:29:25 -04:00
tigercosmos
393aa06e5b remove misleading url 2018-05-26 06:17:56 -07:00
bors-servo
31f91ec3e1
Auto merge of #20854 - servo:webgl, r=emilio
Drive-by fixes in WebGL

<!-- 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/20854)
<!-- Reviewable:end -->
2018-05-25 00:45:33 -04:00
bors-servo
f6762d54e2
Auto merge of #20707 - gterzian:embedder_handling_of_prompts_and_alerts_2, r=payl
Embedder handling of prompts and alerts

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

Allow embedder to allow alerts and prompts, but via constellation forwarding messages from script.

---
<!-- 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 build-geckolib` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #19992  (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/20707)
<!-- Reviewable:end -->
2018-05-24 10:34:48 -04:00
Anthony Ramine
3e510ec008 Implement most of the unsupported parameters in gl.getParameter()
Fixes #20536.
Fixes #20537.
Fixes #20538.
Fixes #20544.
Fixes #20545.
Fixes #20546.
Fixes #20548.
Fixes #20549.
Fixes #20551.
2018-05-24 12:32:15 +02:00
Anthony Ramine
b523267349 Move WebGLVertexArrayObjectOES to script::dom
It's not a WebGL extension itself, it's just used by one.
2018-05-24 12:12:23 +02:00
Anthony Ramine
54f88b5eaf Add OESElementIndexUint to WebGLExtensions::register_all_extensions 2018-05-24 12:09:58 +02:00
Gregory Terzian
2812b3cf4a send message to embedder in prompt_to_unload 2018-05-23 21:46:05 +08:00
Gregory Terzian
4234b1252a move top_level_browsing_context_id out of embedder msg 2018-05-23 21:46:05 +08: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
Gregory Terzian
57c0d82944 prevent overwriting of salvageable state in later prompt/unload steps 2018-05-22 18:11:45 +08:00
bors-servo
0b5720547e
Auto merge of #20669 - simartin:issue_20623, r=jdm
Issue #20623: Check the input to WebGLRenderingContext's clear().

Validate the input to this function as per specifications.

---
- [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 #20623
- [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/20669)
<!-- Reviewable:end -->
2018-05-20 11:54:56 -04:00
Gregory Terzian
9467543c80 update "navigation within beforeunload" test to match the spec 2018-05-20 10:34:39 +08:00
bors-servo
cb764be7cd
Auto merge of #20674 - simartin:issue_20556, r=nox
Issue #20556: Implement proper checks in WebGLRenderingContext's bindBuffer()

Implement missing check, about deleted buffers.
---
- [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 #20556
- [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/20674)
<!-- Reviewable:end -->
2018-05-18 23:49:37 -04:00
bors-servo
a4b298c002
Auto merge of #20754 - anholt:webgl-fixes, r=emilio
Webgl fixes

<!-- Please describe your changes on the following line: -->
Add gl.getParameter() support for webgl unpack settings, and remove some unreachable and incorrect error-generation code

---
<!-- 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 #20372
- [x] These changes fix #20553
- [x] These changes fix #20554

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

<!-- 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/20754)
<!-- Reviewable:end -->
2018-05-18 22:26:18 -04:00
bors-servo
fe1a057bd1
Auto merge of #20740 - fabricedesre:mutation-observer-disconnect, r=jdm
Implement MutationObserver.disconnect()

<!-- Please describe your changes on the following line: -->
This implements https://dom.spec.whatwg.org/#dom-mutationobserver-disconnect
I added a `node_list` to the `MutationObserver` struct to keep track of the nodes involved in an observer because otherwise I could not find a way to unregister the observers on the node themselves without traversing the whole document tree. Let me know if there's something I missed.

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

<!-- 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/20740)
<!-- Reviewable:end -->
2018-05-18 18:27:50 -04:00
bors-servo
3d109b4574
Auto merge of #20615 - KiChjang:window-indexed-getter, r=emilio
Implement window indexed getter

Fixes #4589.

<!-- 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/20615)
<!-- Reviewable:end -->
2018-05-17 18:52:38 -04:00
Simon Martin
c2fb588ac7 Issue #20556: Implement proper checks in WebGLRenderingContext's bindBuffer(). 2018-05-10 08:51:51 +02:00
Fabrice Desré
5bfa819038 Implement MutationObserver.disconnect() 2018-05-09 16:27:09 -07:00
Keith Yeung
df23f909cd Do not unwrap in element{,s}FromPoint 2018-05-07 23:25:09 -07:00
bors-servo
1d8283e010
Auto merge of #20329 - gterzian:before_unload, r=cbrewster
Implement beforeunload event and infrastructure

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

Implementation of:
1. https://html.spec.whatwg.org/multipage/#prompt-to-unload-a-document, and
2. https://html.spec.whatwg.org/multipage/#unload-a-document
---
<!-- 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 #10787 and fix #20485 and fix #20588 and fix #20496 (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/20329)
<!-- Reviewable:end -->
2018-05-07 13:22:23 -04:00
Eric Anholt
471924af62 webgl: Add getParameter(UNPACK_PREMULTIPLY_ALPHA_WEBGL) support. 2018-05-07 09:46:30 -07:00
Eric Anholt
8c052d3593 webgl: Add getParameter(UNPACK_FlIP_Y_WEBGL) support. 2018-05-07 09:46:13 -07:00
Eric Anholt
5f2d512c12 webgl: Drop a silly check for 0 in GetTexParameter.
0 is not among the valid values for a wrap mode or filter, so it won't
ever be returned unless the driver is broken, and even if it was a
valid value we would want to pass it through.
2018-05-05 20:13:02 -07:00
Gregory Terzian
29d1cf6270 implement "has event listener", plug into (before)unload 2018-05-05 19:14:43 +08:00
Gregory Terzian
427eaed535 beforeunload and unload infrastructure 2018-05-05 19:14:36 +08:00
Anthony Ramine
0f91712800 Update to gleam 0.5 2018-05-05 13:08:36 +02:00
Gregory Terzian
a1d1b18710 PutForward=href on window and document location 2018-05-04 15:15:12 +08:00
bors-servo
2c9ef9e558
Auto merge of #20689 - fabricedesre:mutation-take-records, r=emilio
MutationObserver api: Implement takeRecords() and characterData mutations

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

I started by looking at adding support for `takeRecords()` to get fluent.js to work on Servo. To get the wpt tests to pass I ended up implementing character data mutations (most of the plumbing was already there) and this fixed a few more tests.

We are still missing support for `disconnect()`, which I keep for a followup.

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

<!-- 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/20689)
<!-- Reviewable:end -->
2018-05-02 14:05:00 -04:00
Fabrice Desré
75434e6fce MutationObserver api: Implement takeRecords() and characterData mutations 2018-05-02 09:58:37 -07:00
Gregory Terzian
a5a120f30a fire pageshow for new entry after history traversal 2018-05-01 21:41:18 +08:00