Commit graph

4202 commits

Author SHA1 Message Date
Simon Sapin
acc38aa8c2 Use Arc<PropertyDeclarationBlock> everwhere it’s appropriate. 2016-08-31 02:34:07 +02:00
Simon Sapin
c87180a2fb Move DOMRefCell to style. 2016-08-31 02:34:05 +02:00
Simon Sapin
ec723057b2 Make DOMRefCell use style’s copy of RefCell 2016-08-31 02:34:04 +02:00
Simon Sapin
ef5977f059 Wrap in Arc<_> every object reflected in CSSOM.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1281962#c5
2016-08-31 02:34:03 +02:00
bors-servo
e07ee3f4cf Auto merge of #13126 - splav:HTMLOptionElement.form#13111, r=metajack
Html option element.form#13111

<!-- Please describe your changes on the following line: -->
Add HTMLOptionElement form attribute support

---
<!-- 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 #13111 (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/13126)
<!-- Reviewable:end -->
2016-08-30 13:18:10 -05:00
Alexandrov Sergey
f5dbf41841 add HTMLOptionElement form attribute support 2016-08-30 17:29:58 +03:00
Glenn Watson
119716acb2 Fix canvas image tests when using webrender.
When webrender is enabled, image decoding doesn't pre-multiply by
alpha, but the canvas code expects the image data to be
pre-multiplied form.
2016-08-30 09:57:38 +10:00
Alan Jeffrey
6a271b0527 Remove mutex from Trusted
Use weak references rather than message passing to
garbage-collect dead references.
2016-08-29 11:56:28 +02:00
bors-servo
d37d4d697a Auto merge of #13102 - anholt:webgl-is-program, r=emilio
webgl: Add isProgram() support.

<!-- Please describe your changes on the following line: -->
webgl: Add isProgram() support.

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

There's one failure still, where a deleted program should still be
considered to be a program until it's unbound.  However, I recently
made it so that we unbind at delete time, and we may need to partially
back that change out.

<!-- 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/13102)
<!-- Reviewable:end -->
2016-08-28 21:23:59 -05:00
bors-servo
11e8e42fd8 Auto merge of #13060 - anholt:webgl-invalid-passed-params, r=emilio
webgl: Do validation of glScissor/glViewport(width, height) on the DOM side

<!-- Please describe your changes on the following line: -->
webgl: Do validation of glScissor/glViewport(width, height) on the DOM side

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

Avoids testcase CRASHes due to unexpected GL 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/13060)
<!-- Reviewable:end -->
2016-08-28 20:10:47 -05:00
Eric Anholt
847ab63de6 webgl: Add isProgram() support.
There's one failure still, where a deleted program should still be
considered to be a program until it's unbound.  However, I recently
made it so that we unbind at delete time, and we may need to partially
back that change out.
2016-08-28 17:18:09 -07:00
bors-servo
ff6ffb7370 Auto merge of #13063 - larsbergstrom:remove_git_info, r=metajack
Remove static usage at compile-time of GIT_INFO to enable builds outs…

r? @metajack

The issue here is that if we build Servo from a expanded copy of the sources w/o a git repository present in-tree, this will fail. Further, we can't switch to `option_env` with an `unwrap_or` because `concat!` expects string literals.

<!-- 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/13063)
<!-- Reviewable:end -->
2016-08-28 10:43:29 -05:00
bors-servo
1fd2577e51 Auto merge of #13070 - tp6vup54:master, r=KiChjang
Convert imports in generate_imports into one per line, so that it can…

<!-- Please describe your changes on the following line: -->
Convert imports in generate_imports into one per line, so that it can easily add new ones with alphabetical order.

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

… easily add new ones with alphabetical order.

<!-- 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/13070)
<!-- Reviewable:end -->
2016-08-27 07:27:50 -05:00
bors-servo
0be94bb7cc Auto merge of #13057 - servo:rpe-ac, r=nox
Remove the JSAutoCompartment from report_pending_exception.

<!-- 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/13057)
<!-- Reviewable:end -->
2016-08-27 06:32:12 -05:00
Lars Bergstrom
bdf4563c6a Remove static usage at compile-time of GIT_INFO to enable builds outside of a git repo 2016-08-27 06:31:28 -05:00
tp6vup54
59dcb31491 Convert imports in generate_imports into one per line, so that it can easily add new ones with alphabetical order. 2016-08-27 14:45:47 +08:00
bors-servo
969aefe01f Auto merge of #12934 - anholt:webgl-deletion-and-bindings, r=emilio
webgl: object deletion and bindings

<!-- Please describe your changes on the following line: -->
This PR brings in some fixes to the wpt object-deletion-and-behaviour.html testcase.

The test still has many failures, but some of the things that were really getting in the way are fixed.

---
<!-- 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/12934)
<!-- Reviewable:end -->
2016-08-27 00:05:54 -05:00
Eric Anholt
e8b5f70429 webgl: Add getters for other GL_*_BINDING enums.
Fixes many subcases of object-deletion-behaviour.html.
2016-08-26 14:04:21 -07:00
Eric Anholt
db9fe23903 webgl: Remove objects from binding points on object deletion.
We keep bindings that shadow what's mapped in the GL state currently,
and so we need to remove the objects from our binding points when they
get implicitly removed from the GL binding points during object deletion.
2016-08-26 14:04:20 -07:00
Eric Anholt
6ec2c41df8 webgl: Protect against GL error on glBindRenderbuffer(deleted rbo).
On a GLES or compatibility underlying GL context, we were fine because
an underlying renderbuffer object would just get re-created, and
nothing too bad happened because we aren't tracking the currently
bound renderbuffer at the DOM level.  However, on a desktop GL core
context, binding non-genned or deleted names is an error.

Fixes a crash in object-deletion-behavior.html.
2016-08-26 14:04:19 -07:00
Tetsuharu OHZEKI
0277cf9174 Make DOMJSClass use JSClass instead of Class (fixes #13031) 2016-08-26 22:31:09 +02:00
Eric Anholt
b8b74e4b37 webgl: Do validation of glScissor/glViewport(width, height) on the DOM side.
Avoids testcase CRASHes due to unexpected GL errors.
2016-08-26 12:58:51 -07:00
Ms2ger
5662f0d346 Remove the JSAutoCompartment from report_pending_exception.
It doesn't really belong there.
2016-08-26 17:59:31 +02:00
bors-servo
3b11c5ea2d Auto merge of #13052 - anholt:webgl-drawelements-types, r=nox
webgl: Fix validation of drawElements()'s type argument.

<!-- Please describe your changes on the following line: -->
webgl: Fix validation of drawElements()'s type argument.

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

Fixes crash due to unexpected GL errors in gl-drawelements.html.

<!-- 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/13052)
<!-- Reviewable:end -->
2016-08-26 06:24:39 -05:00
bors-servo
2ad6a7e612 Auto merge of #13044 - nox:webidl, r=Ms2ger
Update the WebIDL parser

<!-- 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/13044)
<!-- Reviewable:end -->
2016-08-26 05:26:19 -05:00
Anthony Ramine
dccf771e25 Implement [Replaceable] (fixes #13033) 2016-08-26 10:37:59 +02:00
Eric Anholt
15fa1a5a7d webgl: Fix validation of drawElements()'s type argument.
Fixes crash due to unexpected GL errors in gl-drawelements.html.
2016-08-26 01:37:39 -07:00
Anthony Ramine
60f0f8eaa5 Update the WebIDL parser 2016-08-26 00:56:08 +02:00
Anthony Ramine
7ac2464302 Restore abstract.patch which was mistakenly removed 2016-08-26 00:55:47 +02:00
Anthony Ramine
a4f96761b2 Hoist 7fd65affab as its own patch 2016-08-26 00:55:29 +02:00
bors-servo
6beec195ed Auto merge of #13028 - ofekd:implement-data-value-attr, r=KiChjang
Implement HTMLDataElement#value

<!-- Please describe your changes on the following line: -->
Implement HTMLDataElement#value

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

<!-- 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/13028)
<!-- Reviewable:end -->
2016-08-25 12:48:06 -05:00
bors-servo
160d15670e Auto merge of #13017 - nox:wrong-receiver, r=Ms2ger
Pass the receiver to get_property_on_prototype (fixes #11600)

<!-- 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/13017)
<!-- Reviewable:end -->
2016-08-25 11:49:54 -05:00
Anthony Ramine
6c1167b1e2 Pass the receiver to get_property_on_prototype (fixes #11600) 2016-08-25 15:48:07 +02:00
Anthony Ramine
f70fa98954 Make has_property_on_prototype fallible 2016-08-25 15:46:43 +02:00
Anthony Ramine
fbc8938bee Mark get_property_on_prototype and has_property_on_prototype as unsafe 2016-08-25 15:46:42 +02:00
bors-servo
f4bd1b224e Auto merge of #12847 - clstl:HTMLDialogElement#close, r=nox
Implements HTMLDialogElement#close

<!-- Please describe your changes on the following line: -->
Implements HTMLDialogElement#close according to [link](https://html.spec.whatwg.org/multipage/#the-dialog-element:dom-dialog-close)

---
<!-- 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 #12352
- [X] There are tests for these change

<!-- 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/12847)
<!-- Reviewable:end -->
2016-08-25 08:43:23 -05:00
clstl
aa5edd1118 Implements HTMLDialogElement#close 2016-08-25 16:13:30 +03:00
Ofek
cc23f9a87a implement HTMLDataElement#value 2016-08-25 16:08:09 +03:00
bors-servo
8b84566097 Auto merge of #13030 - nox:global, r=Ms2ger
Improve prototypes of global objects

<!-- 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/13030)
<!-- Reviewable:end -->
2016-08-25 07:45:39 -05:00
Anthony Ramine
241de3dfd0 Call JS_SetImmutablePrototype for prototypes of globals (fixes #13023) 2016-08-25 14:29:27 +02:00
Anthony Ramine
6da56f7e67 Define interface members on the global object directly (fixes #4593) 2016-08-25 14:29:16 +02:00
Anthony Ramine
0729000b56 Pass a MutableHandleObject to create_global_object 2016-08-25 14:03:09 +02:00
Anthony Ramine
5f59bb2e0c Make create_global_object take a &'static Class 2016-08-25 14:03:08 +02:00
Anthony Ramine
a4f2159e36 Rename utils::create_dom_object to interface::create_global_object 2016-08-25 14:03:07 +02:00
Anthony Ramine
32a600246e Split global logic out of CGWrapMethod 2016-08-25 14:02:52 +02:00
bors-servo
7834475482 Auto merge of #12980 - jdm:proxychanges, r=nox
Fix ridiculous DOM proxy getter performance

This implements the missing shadowing checks that were causing us to take many slow paths when dealing with proxy objects. Verified by running `tests/html/binding_perf.html` before and after and observing a 12x improvement.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12357
- [X] These changes do not require tests because we can't test performance 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/12980)
<!-- Reviewable:end -->
2016-08-25 06:31:46 -05:00
Anthony Ramine
fa17814f12 Make define_constants unsafe 2016-08-25 13:07:46 +02:00
Josh Matthews
4961a513d4 Check for shadowing properties on DOM proxies. Fixes #12357. 2016-08-25 00:11:39 -04:00
Josh Matthews
2ad293ca64 Pass real values to the proxy handler setup. 2016-08-25 00:11:38 -04:00
Jeena Lee
e3624edbf6 Implement iterable for Headers.
This commit implements iterable in DOM Headers based on iterable
implementation from #12819. Expected wpt results are updated as well.
2016-08-24 13:12:35 -07:00