Commit graph

3648 commits

Author SHA1 Message Date
Cullen Rhodes
40acd24e8f Report use statements that use {} with only one entry 2016-05-27 10:18:44 +01: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
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
1640ade0b3 Auto merge of #11410 - Ms2ger:script-listener-thread, r=nox
Remove the script listener thread.

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.

<!-- 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/11410)
<!-- Reviewable:end -->
2016-05-25 06:10:17 -05:00
Ms2ger
4113eb6f72 Remove the script listener thread (fixes #11345).
We needed a separate thread in the chrome process because communication to the
compositor is done through a trait object, and cross-process virtual calls are
forbidden.

Also, the fact that these messages are ultimately handled by the compositor is
an implementation detail; conceptually, the relevant constellation is supposed
to handle these messages.

So instead, the script thread will now send the messages to the constellation,
which will ask the compositor to handle them.
2016-05-25 12:50:22 +02:00
David Raifaizen
ff5cfb12a0 Restoring node dirty calls after properties are set to trigger mutations 2016-05-25 09:25:38 +02:00
David Raifaizen
8b39260793 Removed mutation calls from sync_property_with_attrs_style method in order to avoid reparsing serialized output 2016-05-25 09:25:37 +02:00
David Raifaizen
3dafd558c5 Changing update_inline_style to process multiple declarations at once to handle shorthand serialization better 2016-05-25 09:25:35 +02:00
Simon Sapin
dc829da07e Less cloning and dynamic dispatch. 2016-05-25 09:25:33 +02:00
David Raifaizen
7d7aac212b Shorthand serialization now takes iterators instead of array slice as argument 2016-05-25 09:25:32 +02:00
David Raifaizen
51e642e875 Converted serialization methods to implement the to_css trait, writing to string buffers to save string allocations for every result 2016-05-25 09:25:29 +02:00
David Raifaizen
0985d7563f Making fixes based on suggestions from nox and SimonSapin 2016-05-25 09:24:10 +02:00
David Raifaizen
839a7559e7 Added sync_property_with_attrs_style method to serialize style string when inline style is changed 2016-05-25 09:24:08 +02:00
David Raifaizen
b4d8f3ba3a Removed previously copied serialize_shorthand method as well as unnecessary calls to document.content_changed 2016-05-25 09:24:07 +02:00
bors-servo
a3fe756cdb Auto merge of #11366 - Ms2ger:css_errors_store, r=SimonSapin
Stop storing CSS errors on the Document.

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 removing dead code

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

They are never read.

<!-- 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/11366)
<!-- Reviewable:end -->
2016-05-25 00:09:16 -05:00
bors-servo
0b64586bf5 Auto merge of #11368 - izgzhen:fix-filemanager-exit, r=asajeffrey
Fix FileManager thread panic and other misc improvements

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [x] There are tests for these changes

Changes:

- Add shut down logic for FileManager thread
- Add an unit test for filemanager_thread

<!-- 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/11368)
<!-- Reviewable:end -->
2016-05-24 22:17:15 -05:00
bors-servo
a04e30d247 Auto merge of #10796 - servo:character-data-surrogates, r=nox
Make /dom/nodes/CharacterData-surrogates.html not panic.

It now fails since `DOMString` is currently based on `std::string::String` on the Rust side, which is strictly well-formed UTF-8 and can not contain unpaired surrogate code points.

Fixes #10780

r? @Ms2ger

<!-- 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/10796)
<!-- Reviewable:end -->
2016-05-24 15:59:31 -07:00
bors-servo
2a2b88f42c Auto merge of #11287 - heycam:moz-binding, r=bholley
Support -moz-binding in geckolib

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 changes target stylo

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/11287)
<!-- Reviewable:end -->
2016-05-24 14:41:04 -07:00
Till Schneidereit
7536afff2a 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.
2016-05-24 17:43:49 +02:00
Zhen Zhang
96b2093121 Fix FileManager thread panic and other misc improvements
- Add shut down logic for FileManager thread
- Add an unit test for filemanager_thread
2016-05-24 22:32:36 +08:00
Keith Yeung
c93ed39f33 Parse HTMLInputElement attributes 2016-05-24 10:12:18 -04:00
Simon Sapin
c11a3b958d Make /dom/nodes/CharacterData-surrogates.html not panic.
It now fails since DOMString is currently based on std::string::String
on the Rust side, which is strictly well-formed UTF-8 and can not
contain unpaired surrogate code points.

Fixes #10780
2016-05-24 16:08:01 +02:00
Ms2ger
e7eee3b067 Remove the IterableContext trait.
It serves no purpose.
2016-05-24 16:01:33 +02:00
Attila Dusnoki
39c99af4c8 Add included services 2016-05-24 15:50:33 +02:00
Ms2ger
a5139787de Stop storing CSS errors on the Document.
They are never read.
2016-05-24 14:41:38 +02:00
Anthony Ramine
cdc7bca944 Move DOMString back to script
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +02:00
bors-servo
846517342b Auto merge of #11147 - danlrobertson:webgl-tex, r=emilio
Impl copyTexImage2D and copyTexSubImage2D

- [X] `./mach build` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

Implement copyTexImage2D and copyTexSubImage2D for WebGLRenderingContext. Feedback would be appreciated. I did my best to follow the [spec](https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8). Please let me know if I missed anything. I couldn't find tests for this. Let me know if I should create one. I'm more than happy to do so. As always any feedback, comments,or critiques are very welcome 😄

Part of #10209

<!-- 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/11147)
<!-- Reviewable:end -->
2016-05-23 20:07:52 -07:00
Daniel Robertson
867cd9be29 Impl copyTexImage2D and copyTexSubImage2D
Implement copyTexImage2D and copyTexSubImage2D for
WebGLRenderingContext.
2016-05-23 22:29:23 -04:00
bors-servo
ef81e6982a Auto merge of #11338 - Ms2ger:compositor-refcell, r=nox
Take ScriptThread::compositor out of its RefCell.

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.

There's no reason for it; IpcSender::send takes &self.

<!-- 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/11338)
<!-- Reviewable:end -->
2016-05-23 19:16:12 -07:00
Cameron McCormack
bb85f5faf0 Add an extra data field to ParserContext.
This will be used for passing Gecko-specific information through
the CSS parser in stylo.
2016-05-24 12:12:10 +10:00
bors-servo
5454cfb369 Auto merge of #11324 - dzbarsky:sample_coverage, r=nox
Implement SampleCoverage

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
- [ ] `./mach test-tidy --faster` 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11324)
<!-- Reviewable:end -->
2016-05-23 16:52:28 -07:00
bors-servo
7d02c2055d Auto merge of #11341 - nox:raf, r=pcwalton
Use a simple Vec for the animation frame list

Adding an animation frame list is now just pushing a new pair onto the vector,
while canceling one is setting its callback to None.

This means we can't send NoAnimationCallbacksPresent anymore to the constellation
when all entries were cancelled, but I'm not sure that's very important anyway.

The good downside of this change is that when running the callbacks, if no
new one was queued during their execution, we can just swap back the original Vec
into the Document in run_the_animation_frame_callbacks, thus reusing the
original allocation.

<!-- 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/11341)
<!-- Reviewable:end -->
2016-05-23 10:50:37 -07:00
bors-servo
de79f96775 Auto merge of #11333 - Manishearth:submit-submit-button, r=nox
Include <button type=submit> data whilst constructing the form dataset

This makes it possible to close things in github (see
https://github.com/Manishearth/mitochondria/issues/1)

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

Either:
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/11333)
<!-- Reviewable:end -->
2016-05-23 04:18:09 -07:00
Anthony Ramine
1e9be028cf Use a simple Vec for the animation frame list
Adding an animation frame list is now just pushing a new pair onto the vector,
while canceling one is setting its callback to None.

This means we can't send NoAnimationCallbacksPresent anymore to the constellation
when all entries were cancelled, but I'm not sure that's very important anyway.

The good downside of this change is that when running the callbacks, if no
new one was queued during their execution, we can just swap back the original Vec
into the Document in run_the_animation_frame_callbacks, thus reusing the
original allocation.
2016-05-23 12:11:58 +02:00
Manish Goregaokar
102cdaa7cc
Include <button type=submit> data whilst constructing the form dataset 2016-05-23 15:12:19 +05:30
Ms2ger
2b014befd0 Take ScriptThread::compositor out of its RefCell.
There's no reason for it; IpcSender::send takes &self.
2016-05-23 11:31:18 +02:00
bors-servo
7cea4eb01c Auto merge of #11225 - izgzhen:patch-input-element-file, r=Manishearth
Implement file related functionalities in htmlinputelement and related

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [x] These changes is related to #11131
- [x] These changes do not require tests because it is a partial implementation

1. Improve the `filemanager_thread` by adding type string and create `SelectedFile`
2. Fill several gaps in `htmlinputelement` implementation related to file type
3. Improve the `File` interface to accommodate the above changes
4. Integrate changes introduced by PR #11189

<!-- 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/11225)
<!-- Reviewable:end -->
2016-05-23 01:10:46 -07:00
Zhen Zhang
dd590d088b Implement file-type functionalities in htmlinputelement and related
Changes include:
- Implement file selection and other DOM behaviours in htmlinputelement
- Integrate IpcSender<FileManagerThreadMsg> into ResourceThreads
- Improve filemanager_thread, including adding type_string field to SelectedFile
- Improve interfaces in FileList/File/Blob to accommodate the above changes
2016-05-23 15:35:46 +08:00
David Zbarsky
abfbeca670 Implement SampleCoverage 2016-05-22 00:23:29 -07:00
Anthony Ramine
7e06fb0c8a Fix the doc on inheritance and casting 2016-05-21 16:08:47 +02:00
bors-servo
1a34137ac4 Auto merge of #10961 - creativcoder:custom_response_iface, r=jdm
adding interface for custom responses

Fixes #10960

<!-- 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/10961)
<!-- Reviewable:end -->
2016-05-21 01:12:54 -07:00
bors-servo
5fc511a40e Auto merge of #11255 - s-baldrick:11158, r=ConnorGBrewster
11158 - add event handlers

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 #11158 (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/11255)
<!-- Reviewable:end -->
2016-05-20 21:26:41 -07:00