Commit graph

4608 commits

Author SHA1 Message Date
bors-servo
c6e15f8ef2 Auto merge of #14028 - servo:rustup, r=nox,SimonSapin
Update Rust to 1.14.0-nightly (7c69b0d5a 2016-11-01)

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

<!-- 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/14028)
<!-- Reviewable:end -->
2016-11-02 21:49:08 -05:00
Anthony Ramine
391296278d Make #[derive(JSTraceable)] a procedural macro 2016-11-03 01:10:35 +01:00
Simon Sapin
5bb4c6c884 Use heapsize_derive instead of heapsize_plugin 2016-11-03 01:10:32 +01:00
bors-servo
6ef46ab9e4 Auto merge of #13453 - metajack:media-query-list, r=jdm
Implement matchMedia and MediaQueryList

<!-- 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 #13376 (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. -->

Fixes #13376.

<!-- 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/13453)

<!-- Reviewable:end -->
2016-11-02 14:51:12 -05:00
Jack Moffitt
138a0480fe Implement matchMedia and MediaQueryList
Fixes #13376.
2016-11-02 13:40:22 -06:00
Ms2ger
c3c6df69b4 Rewrite load_whole_resource using the fetch stack. 2016-11-02 16:15:27 +01:00
Ms2ger
558afe1786 Update js. 2016-11-02 13:25:49 +01:00
Ms2ger
623ab22468 Use fetch in ScriptThread.
I did not find the prose that defines the creation of the request in the HTML
standard (if it exists).
2016-11-02 09:25:57 +01:00
Bobby Holley
fb70ee2c0c Drop style data from descendants on display:none.
MozReview-Commit-ID: 8ls43oAGWRg
2016-11-01 11:03:04 -07:00
bors-servo
408caac669 Auto merge of #14006 - Haggus:master, r=jdm
Removed incorrectly exposed webidl interfaces

<!-- Please describe your changes on the following line: -->
Partial fix for #12415

Fixed: Touch, TouchList, ValidityState

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

<!-- 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/14006)
<!-- Reviewable:end -->
2016-10-31 15:58:38 -05:00
Mateusz 'Haggus' Mrowiec
ff8113efb6 Removed incorrectly exposed webidl interfaces 2016-10-31 20:16:40 +01:00
bors-servo
ceb18e7d86 Auto merge of #13729 - cynicaldevil:readAsArrayBuffer, r=Ms2ger
Implemented FileReader::readAsArrayBuffer

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

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

There's still some small issues, but I suppose most of the work is done:
- test-tidy mentions a `method declared in webidl is missing a comment with a specification link` for the `getResult` method.
- I get an 'unused code' warning for code present in `UnionTypes.rs`, which is auto-generated.

Passing tests:
- [x]  `FileAPI/reading-data-section/filereader_result.html`
- [x]  `FileAPI/reading-data-section/filereader_readAsArrayBuffer.html`
- [x]  `FileAPI/idlharness.html`
- [ ]  `FileAPI/reading-data-section/FileReader-multiple-reads.html`

<!-- 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/13729)

<!-- Reviewable:end -->
2016-10-31 14:01:18 -05:00
Nikhil Shagrithaya
51ef05bf3d Implemented FileReader::readAsArrayBuffer 2016-11-01 00:25:26 +05:30
bors-servo
ccefef5be4 Auto merge of #13988 - dsprenkels:tidy-fncalls, r=Wafflespeanut
test-tidy: Check for space between function name and `(`

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

Disallow an extraneous space in a function call between
the function name and the opening parenthesis in Rust
code, while ignoring macro declarations.

---

<!-- 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 --all` does not report any errors
- [x] `./mach test-tidy --self` does not report any errors
- [x] These changes fix #13980

<!-- Either: -->
- [x] There are tests for these changes, these are written in
 - `python/tidy/servo_tidy_tests/rust_tidy.rs`
 - `python/tidy/servo_tidy_tests/test_tidy.py`
- [ ] These changes do not require tests

<!-- 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/13988)

<!-- Reviewable:end -->
2016-10-31 13:03:32 -05:00
Daan Sprenkels
66059904b7 Remove extra spaces in function calls and declarations 2016-10-31 18:11:37 +01:00
bors-servo
0d46c7c708 Auto merge of #13419 - Coder206:swPromise, r=jdm
ServiceWorkerContainer::Promise

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

<!-- Either: -->
- [ ] 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13419)

<!-- Reviewable:end -->
2016-10-31 11:19:01 -05:00
Patrick Trottier
e6b879048f Add Promises to Service Worker Container
The purpose of the code changes is to enable the use of promises in the Service Worker container. I also modified the Service Worker test in order to support the promises.
2016-10-31 15:20:28 +00:00
bors-servo
357e746a9a Auto merge of #13908 - aethanyc:add-border-width-keyword, r=emilio
Use enum BorderWidth as SpecifiedValue

Use enum BorderWidth instead of a tuple-like struct to store the specified
value. BorderWidth is needed to be used in both longhand and shorthand
border width properties, so I put it in `specified` module.

Fixed #13869.

---
<!-- 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 #13869 (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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13908)
<!-- Reviewable:end -->
2016-10-29 19:48:27 -05:00
bors-servo
fbec79e920 Auto merge of #13872 - anholt:webgl-fbo, r=emilio
webgl: Add basic support for framebuffer attachments

This is by no means a complete implementation, but I've slowed down on working on it, so I think we should look at what it takes to merge the current code.  There are some major features missing, like initializing renderbuffers to 0 (uninitialized memory leak), tracking the attachments' attributes (width/height/format) for parameter requests, and lots of missing glCheckFramebufferStatus() validation.  On the other hand, this is enough to run some demos using FBOs.

---
<!-- 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 #13639 (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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13872)
<!-- Reviewable:end -->
2016-10-27 21:39:15 -05:00
bors-servo
7205d5a657 Auto merge of #13949 - nox:rustup, r=larsbergstrom
Update Rust to 1.14.0-nightly (c59cb71d9 2016-10-26)

<!-- 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/13949)
<!-- Reviewable:end -->
2016-10-27 13:45:40 -05:00
Anthony Ramine
d6479c6f0f Update Rust to 1.14.0-nightly (c59cb71d9 2016-10-26) 2016-10-27 19:18:56 +02:00
Bobby Holley
97fd61f512 Eliminate untraversed node types from LayoutNodeType.
MozReview-Commit-ID: 926ReI1BSsf
2016-10-27 09:15:33 -07:00
Patrick Walton
f83e1a34dc script: Implement the frameBorder attribute on HTMLIFrameElement.
google.com uses this for the "set Google as your home page" popup.
2016-10-26 17:12:43 -07:00
Ting-Yu Lin
0fc38f79d6 Use enum BorderWidth as SpecifiedValue
Use enum BorderWidth instead of a tuple-like struct to store the specified
value. BorderWidth is needed to be used in both longhand and shorthand
border width properties, so I put it in `specified` module.

Fixed #13869.
2016-10-26 16:24:12 +08:00
Eric Anholt
71d266052b webgl: Re-check FBO status on binding an FBO.
When the FBO has been unbound, anything that happened to its
attachments (deletion, new binding, reallocation) may have caused it
to change status.

This doesn't change any test results currently, because we're not
checking if the attachments are deleted, the wrong size, or have
appropriate formats.
2016-10-25 22:19:29 -07:00
Eric Anholt
dba7d5eb51 webgl: Detach RBs and textures from the bound FBO on deletion.
This is part of general GL behavior: when an object is deleted, look
through the currently bound objects and detach the deleted object from
them.  Detaching an object from an FBO causes it to need to be
re-checked for its status.
2016-10-25 22:19:26 -07:00
Eric Anholt
6c10d5ca75 webgl: Add support for FBO attachments.
This allows many FBO tests to start running as their framebuffers
start coming back as framebuffer complete.
2016-10-25 22:18:29 -07:00
Eric Anholt
989c936e67 webgl: Add support for renderbufferStorage().
This is not a complete implementation yet: It doesn't clear the
contents of the renderbuffer on creation.  However, Gecko's plan to
only clear renderbuffers when the first FBO using them is the
simplest.
2016-10-25 22:18:28 -07:00
Eric Anholt
8a0ca2efba webgl: Add support for checkFramebufferStatus().
For now it's returning the default UNSUPPORTED on user FBOs.

object-deletion-behaviour.html starts running a bunch more subtets.
2016-10-25 22:18:27 -07:00
Eric Anholt
cc0955f12d webgl: Unbind deleted objects from the GL side, not just our side.
Once FBOs are allowed, we were running into testcases that deleted the
active FBO, and expected the following ReadPixels to come from the
default framebuffer.
2016-10-25 22:18:20 -07:00
bors-servo
4b28750b9a Auto merge of #13912 - ddrmanxbxfr:remove-deprecated-url-methods, r=Ms2ger
Remove URL.domainToASCII and URL.domainToUnicode

Modifications

- Removed URL.domainToASCII method
- Removed URL.domainToUnicode method
- Added test in wpt to make sure both method are undefined.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13835  (github issue number if applicable).
- [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/13912)
<!-- Reviewable:end -->
2016-10-25 19:46:54 -05:00
Mathieu Rheaume
943233afd6 Remove URL.domainToASCII and URL.domainToUnicode 2016-10-25 19:05:57 -04:00
Eric Anholt
5fda437e88 webgl: Throw an error when binding a deleted framebuffer.
The spec was recently changed to clarify that this should throw an
error.
2016-10-24 20:42:17 -07:00
Corey Farwell
bec5bf49bd Implement selectedIndex property on <select>. 2016-10-24 14:14:49 -04:00
bors-servo
f3973a0d3b Auto merge of #13898 - anholt:webgl-texture-fixes, r=emilio
webgl: texture size validation fixes

<!-- Please describe your changes on the following line: -->
This pull request fixes the errors in texture-size-limit.html.

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

<!-- 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/13898)
<!-- Reviewable:end -->
2016-10-24 00:52:57 -05:00
Eric Anholt
5b852b1cdd webgl: Fix up maximum size validation.
We were checking to see if it was too big to be level 0, but we really
want to see if it's too big to be the given level.

This was the last remaining failure in texture-size-limit.html.
2016-10-23 17:46:10 -07:00
Eric Anholt
2f68297051 webgl: Allow TexImage data argument to be larger than necessary.
texture-size-limit.html is using a large array for all of its calls at
various sizes, and we were throwing errors on the calls that should
have passed.
2016-10-23 17:45:56 -07:00
bors-servo
a1306e1dd3 Auto merge of #13897 - scotttrinh:dom-webidl, r=jdm
Partial fix for #12415: DOM interfaces

<!-- Please describe your changes on the following line: -->
Fix exposure of DOM interfaces. Only two of the interfaces needed changing and I want someone to double check on `DOMException` (which I left exposed to both `Window` and `Worker`), but I used Firefox's definition as my source since the specs don't lay it out explicitly.

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

<!-- Either: -->
- [X] These changes do not require tests because they only remove code.

<!-- 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/13897)
<!-- Reviewable:end -->
2016-10-23 12:21:11 -05:00
Scott Trinh
9af35e8a25 Partial fix for #12415: DOM interfaces 2016-10-23 10:18:12 -04:00
Atte Lautanala
65a7747864 Implement response API Clone step 1 2016-10-23 12:32:48 +03:00
bors-servo
62689ba64d Auto merge of #13882 - jeenalee:response-clone, r=jdm
Make Response's `Clone()` method to clone headers.

<!-- Please describe your changes on the following line: -->
This patch allows the response clone to have the same headers list as the original's. Previously, only the cloned response's headers guard was set to be the same as the original response's headers guard.

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

<!-- 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/13882)
<!-- Reviewable:end -->
2016-10-22 08:05:13 -05:00
Ms2ger
1a96733417 Move WindowSizeType to script_traits. 2016-10-22 13:33:38 +02:00
Jeena Lee
25cc87f226 Make Response's Clone() method to clone headers.
This patch allows the response clone to have the same headers list as
the original's. Previously, only the cloned response's headers guard was
set to be the same as the original response's headers guard.
2016-10-21 09:14:57 -07:00
bors-servo
776a1d9cac Auto merge of #13784 - TooManyBees:13363-check-script-enabled, r=Ms2ger
Issue 13363 - Step 1.2 of compiling event handler

<!-- Please describe your changes on the following line: -->
Adds the conditional to test that scripting is enabled in `EventTarget#get_compiled_event_handler`, and return `None` early if not.

Adds tests for "scripting enabled" and "scripting disabled" cases.

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

<!-- 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13784)
<!-- Reviewable:end -->
2016-10-21 09:24:05 -05:00
Ms2ger
e97f06800e Move LoadData to script_traits. 2016-10-21 12:49:16 +02:00
bors-servo
bb271ef4af Auto merge of #13848 - mrobinson:remove-layers, r=glennw
Remove concept of Layers from Servo

<!-- 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 PR should not change behavior.

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

Layers were a feature of the legacy drawing path. If we re-add them at
some point, it probably makes more sense to make them a product of
display list inspection.

This change also remove a bunch of dead painting code.

<!-- 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/13848)
<!-- Reviewable:end -->
2016-10-21 01:43:25 -05:00
Martin Robinson
ccb7ab926a Remove concept of Layers from Servo
Layers were a feature of the legacy drawing path. If we re-add them at
some point, it probably makes more sense to make them a product of
display list inspection.

This change also remove a bunch of dead painting code.
2016-10-21 08:38:34 +02:00
bors-servo
28be83bd9a Auto merge of #13762 - frewsxcv:select-reset, r=Manishearth
Implement "reset algorithm" for `<select>`.

<!-- 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/13762)
<!-- Reviewable:end -->
2016-10-20 23:31:46 -05:00
bors-servo
4e5ad268b1 Auto merge of #13839 - servo:locked-style, r=mbrubeck
Add RwLock in more Arc’d things in stylesheets.

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

CSSOM needs hold potentially multiple references (through `Arc`) to these objects, and then mutate them.

CC @upsuper
r? @mbrubeck

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

<!-- 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/13839)
<!-- Reviewable:end -->
2016-10-20 11:29:27 -05:00
Jesse Kipp
4f0ffbd1f6 Issue 13363 - Step 1.2 of compiling event handler
When compiling event handlers, check whether scripting is enabled
and early return None/null if not.

https://html.spec.whatwg.org/multipage/
webappapis.html#getting-the-current-value-of-the-event-handler

Issue 13363 - Fix spec for disabled scripting

The original spec for this PR was bad because it depended on the
DOM without scripting enabled to use Javascript to signal the test's
failure, so it could never fail.

Use an onerror handler on `window` where scripting is enabled, and
use an invalid string of JavaScript for the handler, to detect
whether or not the event handler is *really* being compiled or not.

Condense tests into a single HTML file

Yup, didn't even realize I could do that at the time.

Remove an unnecessary test
2016-10-20 11:08:44 -04:00