Commit graph

4839 commits

Author SHA1 Message Date
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
bors-servo
1c2b45f87f Auto merge of #13055 - servo:rustup, r=metajack
(Do not merge) Update Rust to 1.13.0-nightly (198713106 2016-08-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/13055)
<!-- Reviewable:end -->
2016-08-28 07:53:33 -05:00
Anthony Ramine
c66380d83c Update Rust to 1.13.0-nightly (198713106 2016-08-26) 2016-08-28 13:45:03 +02:00
bors-servo
a0f45c6850 Auto merge of #13076 - wdv4758h:serviceworker_manager, r=jdm
Remove unnecessary clone from ServiceWorkerManager::prepare_activation

remove unnecessary for `scope_url`

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12999
- [X] These changes do not require tests because it should works when it compiles

<!-- 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/13076)
<!-- Reviewable:end -->
2016-08-27 14:50:42 -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
Chiu-Hsiang Hsu
10cf2ee11a Remove unnecessary clone from ServiceWorkerManager::prepare_activation 2016-08-27 14:45:17 +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
bors-servo
0ced8cd1f1 Auto merge of #13068 - ashrko619:shut_down_layout_panic, r=jdm
Fixed calling unwrap on an Err value

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] 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/13068)
<!-- Reviewable:end -->
2016-08-26 22:06:28 -05:00
Ashwin R
41accc283d fixed calling unwrap on an Err value 2016-08-27 07:37:12 +05:30
bors-servo
fe1225b4ba Auto merge of #13062 - nox:bump-js, r=nox
Make DOMJSClass use JSClass instead of Class (fixes #13031)

<!-- 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/13062)
<!-- Reviewable:end -->
2016-08-26 19:41:51 -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
Bobby Holley
1799b0a5df Remove unused children_count method from TNode.
The semantics of this method with respect to anonymous children are unclear.
Thankfully it's unused, so we can remove it.
2016-08-26 09:36:53 -07:00
Bobby Holley
b56297f2a5 Make ChildrenIterator concrete.
This will allow us to specialize ChildrenIterator in the Gecko case to do
something more interesting in some cases.
2016-08-26 09:36:53 -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