Commit graph

4861 commits

Author SHA1 Message Date
Anthony Ramine
2bc0862f47 Make console a namespace (fixes #13010) 2016-09-10 14:33:08 +02:00
Anthony Ramine
0b689a8a31 Implement WebIDL namespaces 2016-09-08 11:01:34 +02:00
Anthony Ramine
8ba0cf30a1 Fix descriptor argument in CGCallGenerator.__init__
It's a descriptor, not a descriptor provider.
2016-09-07 15:48:22 +02:00
Anthony Ramine
7a942b1742 Store Console timers in globals 2016-09-07 15:48:22 +02:00
Anthony Ramine
20b131af17 Implement Borrow<str> for DOMString
Useful to use DOMString as a HashMap key type.
2016-09-07 15:47:36 +02:00
Josh Matthews
61fcc72d35 Implement Reflectable for GlobalRef. 2016-09-07 10:52:44 +02:00
Josh Matthews
8653450b6e Extract mutability out of Reflectable trait. 2016-09-07 10:40:13 +02:00
bors-servo
3631e314b9 Auto merge of #13174 - servo:error-workers, r=nox
Prepare for error reporting in workers.

<!-- 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/13174)
<!-- Reviewable:end -->
2016-09-06 12:35:39 -05:00
bors-servo
628c644fee Auto merge of #13183 - nox:cleanup-interface, r=Ms2ger
Clean up stuff in bindings::interface

<!-- 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/13183)
<!-- Reviewable:end -->
2016-09-06 08:48:15 -05:00
Ms2ger
00559f18b1 Add missing IsCallable checks. 2016-09-06 13:59:44 +02:00
Anthony Ramine
a60634b998 Fix case of InterfaceObjectClass in codegen 2016-09-06 13:31:25 +02:00
Anthony Ramine
718d733cc8 Reorder some stuff in bindings::interface 2016-09-06 13:31:24 +02:00
Anthony Ramine
86996fdf83 Remove NonNullJSNative 2016-09-06 10:14:11 +02:00
Anthony Ramine
51e46b11a3 Move WebIDL constants machinery to bindings::constant 2016-09-06 10:14:11 +02:00
Anthony Ramine
109a297309 Simplify InterfaceConstructorBehavior 2016-09-06 10:13:55 +02:00
Simon Sapin
3ce64fd269 Rename DeclarationBlock to ApplicableDeclarationBlock
Make it more different from PropertyDeclarationBlock
2016-09-06 14:17:26 +08:00
Ms2ger
59904e65d5 Remove dead error handling code. 2016-09-05 17:53:53 +02:00
Ms2ger
b3050855e7 Implement report_an_error on GlobalRef. 2016-09-05 17:14:28 +02:00
bors-servo
1901a21a2c Auto merge of #13081 - hsinewu:nodelist-iterable, r=Ms2ger
make nodeList iterable

<!-- Please describe your changes on the following line: -->
Not sure what to test in the script.
Need some advice. o_O

---
<!-- 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 #13021 (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/13081)
<!-- Reviewable:end -->
2016-09-05 09:45:24 -05:00
Ms2ger
5ae29b02b6 Stop using mem::transmute_copy. 2016-09-05 09:54:40 +02:00
hsinewu
b4ac513371 Make NodeList iterable 2016-09-05 13:03:38 +08:00
Ms2ger
137845d47b Panic when stringifying an primitive fails.
This should not happen.
2016-09-02 11:44:46 +02:00
Ms2ger
ae38c53de7 Dispatch error events at the window object. 2016-09-02 11:44:44 +02:00
bors-servo
f787e8ed65 Auto merge of #13145 - ashrko619:nav-cookie-enabled, r=nox
Implemented Navigator.cookieEnabled

<!-- 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 #13124 (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/13145)
<!-- Reviewable:end -->
2016-09-01 05:25:52 -05:00
Ashwin R
60f249874e Implemented Navigator.cookieEnabled 2016-09-01 06:24:33 +05:30
Emilio Cobos Álvarez
468b329645
style: Provide whether we're styling or not to rust-selectors.
This makes us not adding the flags to everything in servo.
2016-08-31 17:27:15 -07:00
bors-servo
bbfe38e35f Auto merge of #13134 - servo:archery, r=emilio
Add lots of Arc’s in style, and prepare for using DOMRefCell

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

`DOMRefCell` usage is not there year because of thread-safety questions, but I have this much already that I’d like to land before it bitrots.

r? @emilio

---
<!-- 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 new tests because refactor

<!-- 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/13134)
<!-- Reviewable:end -->
2016-08-31 16:30:56 -05:00
bors-servo
3649a356c8 Auto merge of #13100 - nox:better-getters, r=Ms2ger
Use Option<T> to return from getters

<!-- 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/13100)
<!-- Reviewable:end -->
2016-08-31 04:10:42 -05:00
Simon Sapin
ad3437b98a Remove now-redundant Arc inside PropertyDeclarationBlock. 2016-08-31 02:34:08 +02:00
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
Emilio Cobos Álvarez
fd9cd2f103
layout: Keep track of whether we've deferred the painting of the document due to
a script query.

This will, rather unfortunately, mean that we might repaint two times if we've
deferred a paint, then get an out-of-band reflow. Still seemed better than not
suppressing paints at all.

Fixes #13131
2016-08-30 17:01:03 -07: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
Anthony Ramine
7dfb336be8 Use Option<T> to return from getters
This removes the cumbersome &mut bool argument and offers overall
a more readable code.
2016-08-30 19:07:19 +02:00
Anthony Ramine
6e1523f4ae Compile WebIDL return type "object" to NonZero<*mut JSObject> 2016-08-30 19:07:13 +02:00
Anthony Ramine
3e32948a39 Root js_object in TextEncoder::Encode 2016-08-30 19:06:41 +02:00
Anthony Ramine
897a81e95b Improve some TestBinding methods
We make them return sensical things in a sensical way.
2016-08-30 19:06:41 +02:00
Anthony Ramine
2400b91d05 Don't bother with the global in ImageData::get_image_data 2016-08-30 19:06:41 +02:00
Anthony Ramine
854a3dff68 Assert that ImageData::data is not null 2016-08-30 19:06:40 +02: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
Simon Sapin
899192e046 Update cssparser
Today’s Rust Nigthly broke it
2016-08-28 23:10:56 +02: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
Keith Yeung
40c9601686 Update string_cache to 0.2.26 2016-08-28 07:51:49 -07:00