Commit graph

4221 commits

Author SHA1 Message Date
Anthony Ramine
b45f1918d1 Remove JS::from_rooted 2016-05-31 14:43:58 +02:00
Ms2ger
b6a7895396 Add a missing JSAutoCompartment to javascript url handling. 2016-05-30 16:33:31 +02:00
Anthony Ramine
704646698f Fix permissions of mozbrowser and BrowserElementPrivileged (fixes #11498) 2016-05-30 11:23:42 +02:00
bors-servo
b11648903b Auto merge of #11426 - DDEFISHER:master, r=emilio
Implement IsBuffer, IsFramebuffer and IsRenderbuffer for WebGLRenderingContext

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy --faster` does not report any errors
- [X] These changes fix #11357
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11426)
<!-- Reviewable:end -->
2016-05-29 20:03:56 -05:00
Daniel
c017438428 Implement IsBuffer, IsFramebuffer and IsRenderbuffer for WebGLRenderingContext 2016-05-29 17:08:10 -04:00
Thiago Pontes
766ad5e092 use USVStrings instead of DOMString for urls in Node and Document 2016-05-28 14:53:31 -04:00
bors-servo
3ec20d9cf5 Auto merge of #11472 - jdm:wip, r=mbrubeck
Report blank lines that follow an open brace

This automates something that I find myself frequently commenting on in PRs.

---
<!-- 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] There are tests for these changes OR

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11472)
<!-- Reviewable:end -->
2016-05-27 18:14:25 -05:00
bors-servo
d9323121b6 Auto merge of #11470 - servo:postmessage1.5, r=Ms2ger
Make script origins sendable and immutable.

<!-- 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 no behaviour 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11470)
<!-- Reviewable:end -->
2016-05-27 13:06:37 -05:00
Josh Matthews
3cb8af20c2 Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
bors-servo
3052e4f478 Auto merge of #11465 - nox:open, r=jdm
Implement window.openURLInDefaultBrowser() (fixes #11292)

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11465)
<!-- Reviewable:end -->
2016-05-27 12:03:56 -05:00
bors-servo
d160f8cb80 Auto merge of #11463 - Ms2ger:LayoutChan, r=nox
Remove the LayoutChan type.

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

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

It is a pointless abstraction.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11463)
<!-- Reviewable:end -->
2016-05-27 10:26:23 -05:00
Josh Matthews
555661ef1c Make script origins sendable and immutable. 2016-05-27 17:16:13 +02:00
Anthony Ramine
056bdc5514 Implement window.openURLInDefaultBrowser() (fixes #11292) 2016-05-27 16:16:02 +02:00
Anthony Ramine
8003687deb Properly hide BrowserElementPrivileged members 2016-05-27 16:16:01 +02:00
bors-servo
3ab5c07559 Auto merge of #11462 - Manishearth:devtools-fixes, r=Ms2ger
devtools: fix segfault, remove println

This fixes the segfault from #11457 by adding an autocompartment.

It also removes the print statements which clog the command line and replaces
them with `debug!()`

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because we don't have full-server
  devtools 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11462)
<!-- Reviewable:end -->
2016-05-27 08:49:43 -05:00
Ms2ger
e94f3d4fe0 Remove the LayoutChan type.
It is a pointless abstraction.
2016-05-27 15:33:04 +02:00
Anthony Ramine
3cc7b575fb Initialise reflector earlier for globals
This allows us to use global_root_from_object in the context of a Condition.
2016-05-27 14:11:34 +02:00
bors-servo
2f9796fa69 Auto merge of #11329 - c-rhodes:11320, r=jdm
Report use statements that use {} with only one entry

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 --faster` does not report any errors
- [X ] These changes fix #11320  (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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11329)
<!-- Reviewable:end -->
2016-05-27 07:11:17 -05:00
bors-servo
fb8934a138 Auto merge of #11449 - djc:rm-get-html-element, r=nox
Remove Document.get_html_element() (fixes #8409)

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because small refactor

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

Replace uses by calling self.GetDocumentElement(), instead.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11449)
<!-- Reviewable:end -->
2016-05-27 06:21:36 -05:00
bors-servo
d890453f78 Auto merge of #11434 - catchmrbharath:status, r=nox
WIP: Fixes #11407: Implement Window.status

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 #11407 (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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11434)
<!-- Reviewable:end -->
2016-05-27 05:33:14 -05:00
Dirkjan Ochtman
51e2802047 Remove side-effecting map call per review comments 2016-05-27 11:47:32 +02:00
bors-servo
073c5e3b6b Auto merge of #11308 - nox:guarded, r=jdm
Implement [Func]

First part of #11292, this just includes support of `[Func]`.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11308)
<!-- Reviewable:end -->
2016-05-27 04:45:06 -05:00
Manish Goregaokar
283fc8dd25
Use JSautoCompartment in devtools handle_evaluate_js to avoid segfault
fixes #11457
2016-05-27 15:12:27 +05:30
Dirkjan Ochtman
a79f00c337 Use GetDocumentElement() in Document::invalidate_stylesheets() (fixes #8409) 2016-05-27 11:29:09 +02:00
Bharath M R
a4d9a1d6a1 Fixes #11407: Implement Window.status 2016-05-27 02:28:36 -07:00
Cullen Rhodes
40acd24e8f Report use statements that use {} with only one entry 2016-05-27 10:18:44 +01:00
Kosov Eugene
94ad5aef62 add log2(u32) and use it to prevent casting to and from float to int 2016-05-27 10:15:37 +03:00
bors-servo
4dcb05ca4f Auto merge of #11423 - servo:jdm-patch-2, r=mbrubeck
Update spec link for timers.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy --faster` does not report any errors
- [X] These changes do not require tests because documentation only

---
The specification link was broken.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11423)
<!-- Reviewable:end -->
2016-05-26 23:26:09 -05:00
Connor Brewster
4bb2edd0f1 Remove unused import 2016-05-26 17:03:25 -06:00
Anthony Ramine
694deabcd5 Use [Func] on HTMLIFrameElement.mozbrowser 2016-05-27 00:55:05 +02:00
Anthony Ramine
34dfc28e98 Move mozbrowser_enabled to util::prefs 2016-05-27 00:55:04 +02:00
Anthony Ramine
34858fd0c9 Clean up the functions to retrieve a global root from JS objects 2016-05-27 00:55:03 +02:00
Anthony Ramine
e179cb02ff Implement [Func] 2016-05-27 00:55:02 +02:00
Anthony Ramine
0d04acd50f Rename receiver to global in bindings::interface 2016-05-26 23:56:18 +02:00
Anthony Ramine
f0b53937d4 Remove some 'static lifetimes from bindings::interface 2016-05-26 23:56:17 +02:00
Anthony Ramine
25aaf78e98 Make define_constants private 2016-05-26 23:56:16 +02:00
Anthony Ramine
fd7c4f8149 Remove utils::Prefable in favour of guard::Guard 2016-05-26 23:56:13 +02:00
Anthony Ramine
a20db08f06 Remove Prefable::terminator 🤖 2016-05-26 23:55:37 +02:00
Anthony Ramine
adcecda047 Simplify how Prefable arrays are passed in bindings::interface 2016-05-26 23:55:36 +02:00
Anthony Ramine
bee6f59b16 Use itertools.groupby in generatePrefableArray 2016-05-26 23:55:35 +02:00
Anthony Ramine
b094932d57 Make MemberCondition a function returning a plain string 2016-05-26 23:55:31 +02:00
bors-servo
6d0c420d59 Auto merge of #11432 - ab22:11402-implement-window-alert, r=KiChjang
11402 implement window alert

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 #11402

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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11432)
<!-- Reviewable:end -->
2016-05-26 15:42:26 -05:00
bors-servo
64cca225e5 Auto merge of #11430 - asajeffrey:constellation-record-mozbrowser-parent-info, r=ConnorGBrewster
Record the frame type (IFrame or MozBrowserIFrame) in the pipeline.

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 do not require tests because this is a refactoring

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

This is a first step towards supporting the notion of multiple top-level browsing contexts in Servo, by making the constellation aware of which content is loaded in a mozbrowser iframe.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11430)
<!-- Reviewable:end -->
2016-05-26 14:53:09 -05:00
bors-servo
3bf96a7a31 Auto merge of #11367 - szeged:included_services, r=jdm
Extend WebBluetooth with included services

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy --faster` does not report any errors
- [X] These changes do not require tests because there are no webbluetooth tests yet

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11367)
<!-- Reviewable:end -->
2016-05-26 14:04:33 -05:00
Alan Jeffrey
d92dfe1b8c Record the frame type (IFrame or MozBrowserIFrame) in the pipeline. 2016-05-26 12:55:55 -05:00
Abelardo E. Mendoza
d72dbb6198 implement window alert with no params 2016-05-26 11:38:53 -06:00
bors-servo
5a81470c4d Auto merge of #11372 - tschneidereit:parent-js-runtime-for-workers, r=nox
Pass a parent JS runtime when creating DOM Worker runtimes

This enables sharing data with the parent runtime, decreasing memory usage and startup time. Also contains an update to current rust-mozjs, because that's required for this to work.

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [x] These changes don't fix a github issue

Either:
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because the changes don't change any observable behavior

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11372)
<!-- Reviewable:end -->
2016-05-26 00:08:42 -05:00
bors-servo
edf121324e Auto merge of #11370 - Ms2ger:IterableContext, r=jdm
Remove the IterableContext trait.

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 --faster` 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 refactoring

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

It serves no purpose.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11370)
<!-- Reviewable:end -->
2016-05-25 22:42:31 -05:00
Josh Matthews
c727cfc4ea Update spec link for timers. 2016-05-25 14:19:05 -04:00
bors-servo
116faa7617 Auto merge of #11376 - creativcoder:update-string-cache, r=nox
Bump string-cache to 0.2.18

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy --faster` does not report any errors
- [X] These changes do not require tests because its a crate version bump.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11376)
<!-- Reviewable:end -->
2016-05-25 10:13:29 -05:00