Commit graph

4369 commits

Author SHA1 Message Date
Ms2ger
86bfd2cc9f Move LayoutRPC to script_layout_interface. 2016-06-20 19:08:07 +02:00
Ms2ger
68d603a6d0 Move TrustedNodeAddress to script_layout_interface. 2016-06-20 19:08:06 +02:00
Ms2ger
0616a60fd9 Move ServoLayoutNode and related structs to script. 2016-06-20 19:08:05 +02:00
Ms2ger
7de3d165ad Introduce LayoutJS<Node>::opaque() to replace OpaqueNodeMethods::from_jsmanaged(). 2016-06-20 19:08:02 +02:00
Ms2ger
000e2de57a Move HTMLCanvasData to script_layout_interface. 2016-06-20 19:04:41 +02:00
Ms2ger
6b847eb93a Introduce LayoutNodeType and LayoutElementType enums. 2016-06-20 19:02:49 +02:00
Ms2ger
6aaf3e6a01 Move OpaqueStyleAndLayoutData to script_layout_interface. 2016-06-20 19:02:38 +02:00
Ms2ger
5cab8ff8d2 Make OpaqueStyleAndLayoutData::dispose a method on Node. 2016-06-20 19:02:37 +02:00
Keith Yeung
d66a04ea6c Update string_cache to v0.2.20 2016-06-20 12:17:28 +08:00
bors-servo
9208b8e214 Auto merge of #11768 - achals:blob-string, r=Ms2ger
Update Blob::{new, new_inherited} to take Strings

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because no logic changes, only interface changes.

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11768)
<!-- Reviewable:end -->
2016-06-17 09:52:38 -05:00
Achal Shah
af325a9a3a Update Blob::{new, new_inherited} to take Strings 2016-06-17 07:43:11 -07:00
bors-servo
0c9d0eb685 Auto merge of #11716 - izgzhen:impl-blob-url-dom, r=Manishearth
Implement Blob URL's DOM interfaces

r? @Manishearth

Implement the two functions in `URL` to create/revoke Blob URLs, and related code to approximate our proposed design to make things work together.

<!-- 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 part of #10539, related to #11131

<!-- Either: -->
- [x] There are tests for these changes OR

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11716)
<!-- Reviewable:end -->
2016-06-17 07:26:16 -05:00
Zhen Zhang
4d3379392d Implement Blob URL's DOM interfaces 2016-06-17 20:06:37 +08:00
bors-servo
fb9f327342 Auto merge of #11769 - splav:master, r=jdm
Remove unused XHR method

<!-- Please describe your changes on the following line: -->
Remove unused XHR method.
---
<!-- 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 #11760 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it is a cleanup

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11769)
<!-- Reviewable:end -->
2016-06-17 04:53:36 -05:00
Alexandrov Sergey
520f90c2ee Remove unused XHR method 2016-06-17 10:11:44 +03:00
bors-servo
5a0c98afb2 Auto merge of #11506 - nox:slither, r=emilio
Make canvas send their data themselves to other canvas

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11506)
<!-- Reviewable:end -->
2016-06-17 02:07:37 -05:00
Anthony Ramine
f8c3fe1076 Make canvas send their data themselves to other canvas 2016-06-16 18:24:04 +01:00
bors-servo
d620ab71c4 Auto merge of #10225 - jmr0:visibility_api, r=jdm
Implement non-visible pipeline and iframe visibility methods

This addresses #9566 and a good part of #9751, specifically:

* Pipeline has a notion of visibility
* IFrame setVisible/getVisible interface with IFrame's pipeline visibility
* IFrame mozbrowservisibilitychange responds to changes in visibility
* Pipeline visibility is used to limit animations (requestAnimationFrame does not tick animations when hidden) and to increase timer intervals (currently set to a minimum of 1 second while hidden)

Absent for now are any changes to the Document API and general implementation of the Page Visibility API, since the more interesting parts require knowledge of whether the user agent is minimized, OS screen locked, etc.

cc @paulrouget @jdm

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10225)
<!-- Reviewable:end -->
2016-06-16 08:53:56 -05:00
jmr0
2bff131535 Implement non-visible pipeline and iframe visibility methods 2016-06-15 23:28:07 -04:00
bors-servo
2086d216dd Auto merge of #11697 - mrmiywj:form-index-getter, r=Ms2ger
indexed getter of form elements

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

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

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11697)
<!-- Reviewable:end -->
2016-06-15 01:10:49 -05:00
mrmiywj
4bb88432b2 indexed getter of form elements 2016-06-14 21:40:32 -07:00
bors-servo
40e2b7d674 Auto merge of #11745 - servo:rustup, r=mbrubeck
Update to rustc 2016-06-14.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11745)
<!-- Reviewable:end -->
2016-06-14 18:32:37 -05:00
Ms2ger
0addbe36b0 Update to rustc 2016-06-14. 2016-06-15 00:27:36 +01:00
bors-servo
0cfae3a3e7 Auto merge of #11717 - izgzhen:filepicker, r=Manishearth
Add filepicker

Add file picker based on tinyfiledialog to the file manager implementation.

Changes:
- [x] Add the picker invocation code
- [x] Rewrite unit test to accommodate the change
- [x] Patch up `htmlinputelement` to make things work

<!-- 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 are related to #11131.

<!-- Either: -->
- [x] There are tests for these changes OR

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11717)
<!-- Reviewable:end -->
2016-06-14 07:27:47 -05:00
Zhen Zhang
256c7e894e filepicker 2016-06-14 20:22:51 +08:00
Darin Minamoto
a158e478b8 Replace RefCell in SCRIPT_THREAD_ROOT with Cell 2016-06-12 18:16:08 -07:00
bors-servo
278c1a7da7 Auto merge of #11720 - canaltinova:sandbox, r=nox
Fix the type of HTMLIFrameElement.sandbox

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

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

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11720)
<!-- Reviewable:end -->
2016-06-11 23:40:11 -05:00
bors-servo
0c11e8340b Auto merge of #11556 - Manishearth:make-fetch-happen, r=jdm
Make fetch happen

<!-- Please describe your changes on the following line: -->
Moves XHR over to the fetch backend.

Previous PR: https://github.com/servo/servo/pull/114

---
<!-- 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
- [ ] `./mach test-tidy` does not report any errors (Will fix later)

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

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11556)
<!-- Reviewable:end -->
2016-06-11 19:30:28 -05:00
bors-servo
3fa0dca3a3 Auto merge of #11700 - Ms2ger:assert, r=jdm
Remove an invalid assertion in fire_timer.

It's not clear to me if this is something we should expect to happen, but it
does indeed happen, so we should disable the assertion while we investigate.

Fixes #9984.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11700)
<!-- Reviewable:end -->
2016-06-11 18:42:53 -05:00
Manish Goregaokar
9deecd793c
Review fixes 2016-06-11 11:49:40 +05:30
Patrick Walton
041cfe6d0a script: When using WebRender, keep the DOM-side scroll positions for
elements with `overflow: scroll` up to date, and take them into account
when doing hit testing.

Closes #11648.
2016-06-10 18:43:04 -07:00
Nazım Can Altınova
47984a52c6 Add Sandbox field to HTMLIFrameElement 2016-06-11 01:59:59 +03:00
Nazım Can Altınova
41230fe03d Change sandbox to sandbox_allowance in HTMLIFrameElement 2016-06-11 01:24:20 +03:00
bors-servo
08a55e2951 Auto merge of #11214 - farodin91:windowproxy, r=jdm
Support WindowProxy return values in bindings

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 --faster` does not report any errors
- [x] These changes fix #10965 (github issue number if applicable).

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

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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11214)
<!-- Reviewable:end -->
2016-06-10 10:53:35 -05:00
Manish Goregaokar
fd6f9bd411 Test fixes; update for changes in spec 2016-06-10 20:55:25 +05:30
Manish Goregaokar
bf99e73cb0 Re-add support for fetching chunks (and thus xhr download progress) 2016-06-10 20:53:40 +05:30
Manish Goregaokar
6e29b872d7 Test fixes:
- Hack to stop hitting unreachable on referer
 - add fetch_done to make sync work
 - Make datauris work by setting the response URI, spec bug
 - Allow for empty bodies
 - Make request bodies work (pass to http, fix fencepost in iter count)
2016-06-10 20:53:36 +05:30
Manish Goregaokar
8bcf54deb5 Use RequestInit instead of LoadData. Make code look like the spec. 2016-06-10 20:53:28 +05:30
Manish Goregaokar
5e49873af7 Hook XHR up to fetch 2016-06-10 20:53:23 +05:30
Manish Goregaokar
d4f428ad95 Abstractify the Listener abstractions further 2016-06-10 20:53:19 +05:30
bors-servo
2fb8525919 Auto merge of #11707 - jdm:resize_warn, r=Ms2ger
Avoid frequent intermittent failure in tests.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11613 (github issue number if applicable).
- [X] These changes do not require tests because they address a frequent nondeterministic panic that occurs in other tests.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11707)
<!-- Reviewable:end -->
2016-06-10 10:06:29 -05:00
Josh Matthews
a3ef9ae422 Avoid frequent intermittent failure in tests. 2016-06-10 14:54:44 +01:00
Ms2ger
f695842df7 Remove an invalid assertion in fire_timer.
It's not clear to me if this is something we should expect to happen, but it
does indeed happen, so we should disable the assertion while we investigate.

Fixes #9984.
2016-06-10 09:49:58 +02:00
bors-servo
5e8ab6c0ff Auto merge of #11168 - daoshengmu:texSubImage2D, r=emilio
Implement WebGL TexSubImage2D

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 I have run the wpt test of texSubImage2D.html, and it works.

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

I have implemented ```TexSubImage2D``` follow [the spec](https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8). This is my first version of implementation, and I notice I can reuse the code from ```TexImage2D```. Therefore, I would like to discuss make ```validate_tex_image2D_from_buffer``` and ```validate_tex_image2D_from_source``` to remove duplicate code.

Part of #10209

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11168)
<!-- Reviewable:end -->
2016-06-09 19:49:08 -05:00
Daosheng Mu
9f563e9e43 Implement texSubImage2D API 2016-06-10 01:15:55 +01:00
bors-servo
6f9016cf3e Auto merge of #11552 - izgzhen:add-testing-fix-filemanager, r=Manishearth
Improve implementation and add testing regarding file manager thread

First there is a more completed unit test. And in the test running, I found a runtime error `Serde(Custom("bincode does not support Deserializer::deserialize))` when reading response from file manage thread. I analyzed a bit and found that it is probably caused by the `Uuid` field. I temporarily work around it by making the `Id` essentially a string wrapped inside `SelectedFileId`.

Related to PR #11131.

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

<!-- Either: -->
- [x] There are tests for these changes

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11552)
<!-- Reviewable:end -->
2016-06-09 18:14:30 -05:00
Jansen Jan
fda011923e Support WindowProxy return values in bindings
unscopable
2016-06-09 23:42:27 +02:00
Zhen Zhang
f8fa9aaf42 Add unit testing to file manager; Replace uuid by stringified version in FileManagerThreadMsg 2016-06-10 02:20:52 +08:00
Ms2ger
7455dc4a50 Avoid an index-out-of-bounds error in ScriptMemoryFailsafe.
Fixes #11059.
Fixes #11400.
Fixes #11481.
Fixes #11671.
Fixes #11682.
2016-06-09 14:51:10 +02:00
bors-servo
77e0089c12 Auto merge of #11548 - kevgs:default_view2, r=Ms2ger
Make Document::DefaultView return a null value when there's no browsing context

Fixes #11469.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11548)
<!-- Reviewable:end -->
2016-06-09 02:48:30 -05:00