Commit graph

4592 commits

Author SHA1 Message Date
Nikhil Shagrithaya
51ef05bf3d Implemented FileReader::readAsArrayBuffer 2016-11-01 00:25:26 +05:30
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
Corey Farwell
a45e1d9d95 Implement "reset algorithm" for <select>. 2016-10-19 23:35:19 -04:00
Simon Sapin
742681a623 Add RwLock in more Arc’d things in stylesheets. 2016-10-19 19:55:05 +02:00
bors-servo
350c60b62d Auto merge of #13827 - jdm:screenshot, r=Ms2ger
Support taking screenshots when a webdriver server is active.

Improve the experience of using webdriver to take screenshots of Servo. When a screenshot can't be obtained immediately, increase the delay before trying again from 2ms to 1s.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13826
- [X] These changes do not require tests because we can't test webdriver 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/13827)
<!-- Reviewable:end -->
2016-10-19 12:08:00 -05:00
Josh Matthews
e19268c04e Support taking screenshots when a webdriver server is active. 2016-10-18 19:51:32 -04:00
bors-servo
f96718d03d Auto merge of #13711 - glennw:remove-old-renderer, r=larsbergstrom
Remove old rendering backend.

This removes paint threads, rust-layers dependency, and changes
optional webrender types to be required.

The use_webrender option has been removed, however I've left
the "-w" command line option in place for now so that wpt
runner can continue to pass that. Once it's removed from there
we can also remove the -w option.

Once this stage is complete, it should be fine to change the
display list building code to generate webrender display
lists directly and avoid the conversion step.

<!-- 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/13711)
<!-- Reviewable:end -->
2016-10-17 19:22:20 -05:00
Glenn Watson
acfdfd2fa9 Remove old rendering backend.
This removes paint threads, rust-layers dependency, and changes
optional webrender types to be required.

The use_webrender option has been removed, however I've left
the "-w" command line option in place so that wpt
runner can continue to pass that. Once it's removed from there
we can also remove the -w option.

Once this stage is complete, it should be fine to change the
display list building code to generate webrender display
lists directly and avoid the conversion step.
2016-10-18 10:21:27 +10:00
bors-servo
48dd0d49c2 Auto merge of #13803 - scotttrinh:bluetooth-webidl, r=jdm
Partial fix for 12415

<!-- Please describe your changes on the following line: -->
Fix interface exposure for Bluetooth, which ended up pulling a longer thread of other interfaces into it. Per @jdm just went ahead and did all of the interfaces that `./mach build -d` errored on, so there are a lot of interfaces here.

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

<!-- Either: -->
- [x] These changes do not require tests because they only removed 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/13803)
<!-- Reviewable:end -->
2016-10-17 15:18:13 -05:00
Scott Trinh
ab0ddf9040 Partial fix for 12415 2016-10-17 16:08:07 -04:00
bors-servo
cbe2f7e53b Auto merge of #13801 - nox:h5e, r=jdm
Bump html5ever to 0.5.5

<!-- 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/13801)
<!-- Reviewable:end -->
2016-10-17 12:33:36 -05:00
Anthony Ramine
b6d6b3b7f3 Bump html5ever to 0.5.5 2016-10-17 17:22:07 +02:00
bors-servo
a71b1e65be Auto merge of #13783 - frewsxcv:select-value, r=nox
Implement `value` property on `<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/13783)
<!-- Reviewable:end -->
2016-10-17 02:47:48 -05:00
Corey Farwell
a3d4d336b7 Implement value property on <select>. 2016-10-16 17:06:58 -04:00
Lucas Lois
d764eef5a2 Removed incorrectly exposed webidl interfaces
I removed exposure in Window and Worker to some interfaces that
was not specified in the specification.
2016-10-16 13:29:47 -03:00
bors-servo
0b697c1080 Auto merge of #13785 - gterzian:use_veqdequeu_in_servoparser, r=nox
switch to using DOMRefCell<VeqDeque<String>> for ServoParser::pending…

<!-- Please describe your changes on the following line: -->
The field ServoParser::pending_input should be a DOMRefCell<VeqDeque<String>>, this lets us use VecDeque::pop_front instead of Vec::remove in ServoParser::take_next_input_chunk.

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

…_input

<!-- 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/13785)
<!-- Reviewable:end -->
2016-10-16 05:46:56 -05:00
Gregory
f1d0c8b8df switch to using DOMRefCell<VeqDeque<String>> for ServoParser::pending_input 2016-10-16 18:39:37 +08:00
bors-servo
97bcd97ebd Auto merge of #13747 - scotttrinh:canvas-webidl, r=Ms2ger
Partial fix for #12415: expose Canvas interfaces

<!-- Please describe your changes on the following line: -->
Fix interface exposure per [the specs](https://html.spec.whatwg.org/multipage/scripting.html#2dcontext).

One lingering question I have is if [`CanvasPath`](https://html.spec.whatwg.org/multipage/scripting.html#canvaspath) needs to be added to `interfaces.worker.js` since it *is* exposed to the `Worker` environment. I tried adding it to the `interfaces.worker.js` list but it failed tests at https://github.com/servo/servo/blob/master/tests/wpt/mozilla/tests/mozilla/interfaces.js#L82

---
<!-- 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 contain a partial fix for #12415 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] 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/13747)
<!-- Reviewable:end -->
2016-10-16 00:18:09 -05:00