Commit graph

17922 commits

Author SHA1 Message Date
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
90d72c5de0
Add tests for submit buttons with values 2016-05-23 15:26:10 +05:30
bors-servo
2063bde0a4 Auto merge of #11179 - asajeffrey:webdriver-resize-window, r=jgraham
Implemented webdriver SetWindowSize.

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

Either:
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because the new tests are in https://github.com/w3c/web-platform-tests/pull/3024

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/11179)
<!-- Reviewable:end -->
2016-05-23 02:53:48 -07: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
Ms2ger
041c907d1b Don't block the script listener thread on window.close().
This does not appear to have any effect. I believe this has been the case
since e841065351, when the helper thread was
introduced.

It was added in a7ef1cd35e, where it blocked the
script thread rather than this helper thread.
2016-05-23 11:23:54 +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
Ms2ger
517e40725d Remove pub uses from compositor_thread.rs. 2016-05-23 08:53:43 +02:00
bors-servo
aa9fc4e054 Auto merge of #11332 - paulrouget:bhtmlUpdate, r=Manishearth
browserhtml update

- [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 it's a package update

<!-- 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/11332)
<!-- Reviewable:end -->
2016-05-22 21:28:17 -07:00
Paul Rouget
3a05f387a0 browserhtml update 2016-05-23 06:22:57 +02:00
bors-servo
6b039612ba Auto merge of #11325 - servo:sandboxing, r=nox
Move sandboxing into the constellation crate.

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/11325)
<!-- Reviewable:end -->
2016-05-22 06:43:56 -07:00
Ms2ger
38d96c9564 Move sandboxing into the constellation crate. 2016-05-22 14:49:28 +02:00
David Zbarsky
abfbeca670 Implement SampleCoverage 2016-05-22 00:23:29 -07:00
bors-servo
f1efeb00af Auto merge of #11317 - nox:castable, r=mbrubeck
Fix the doc on inheritance and casting

<!-- 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/11317)
<!-- Reviewable:end -->
2016-05-21 09:29:58 -07:00
bors-servo
eeea481a12 Auto merge of #11313 - nox:channel-loop, r=mbrubeck
Hoist channel creation out of loop in handle_is_ready_to_save_image

<!-- 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/11313)
<!-- Reviewable:end -->
2016-05-21 08:32:30 -07:00
bors-servo
27c457d7c5 Auto merge of #11301 - servo:pipeline, r=nox
Move pipeline into the constellation crate.

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 _____

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/11301)
<!-- Reviewable:end -->
2016-05-21 07:34:22 -07:00
Ms2ger
76fae9fa28 Move pipeline into the constellation crate. 2016-05-21 16:33:57 +02:00
Ms2ger
383cdd450f Move CompositionPipeline out of the pipeline module. 2016-05-21 16:33:26 +02:00
Anthony Ramine
7e06fb0c8a Fix the doc on inheritance and casting 2016-05-21 16:08:47 +02:00
Anthony Ramine
0d694b1fed Hoist channel creation out of loop in handle_is_ready_to_save_image 2016-05-21 12:11:51 +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
63bbc13fff Auto merge of #11314 - metajack:window-hi-dpi, r=mbrubeck
Make Servo DPI aware on Windows

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 testing would be overly difficult

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

This implements system level DPI awareness for Windows. It has three
parts:

1. Add a application manifest which is copied alongside servo.exe during
build that declares our DPI awareness level. This is needed otherwise
DPI queries will return 96dpi and our application will be upscaled on
high DPI displays.

2. Rename hidpi_factor to avoid confusion with Glutin's hidpi_factor
which does something else.

3. Correctly convert windows sizes on window creation for
Windows. Unlike OS X, Windows uses device pixels for window creation.

<!-- 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/11314)
<!-- Reviewable:end -->
2016-05-20 22:41:07 -07:00
Jack Moffitt
568d454ca6 Make Servo DPI aware on Windows
This implements system level DPI awareness for Windows. It has three
parts:

1. Add a application manifest which is copied alongside servo.exe during
build that declares our DPI awareness level. This is needed otherwise
DPI queries will return 96dpi and our application will be upscaled on
high DPI displays.

2. Rename hidpi_factor to avoid confusion with Glutin's hidpi_factor
which does something else.

3. Correctly convert windows sizes on window creation for
Windows. Unlike OS X, Windows uses device pixels for window creation.
2016-05-20 23:40:39 -06: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
bors-servo
c0c70ef094 Auto merge of #11273 - mbrubeck:fast-shape, r=pcwalton
Add a fast path for shaping ASCII text

On both my Linux laptop and iMac, this is about twice as fast as Harfbuzz text shaping on https://en.wikipedia.org/wiki/Barack_Obama.

I haven't tested this on any high-DPI (retina) displays, and I'm not 100% certain that the font unit scaling is correct there.

Depends on servo/core-text-rs#50.

<!-- 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/11273)
<!-- Reviewable:end -->
2016-05-20 17:58:23 -07:00
Matt Brubeck
5991afafa4 Add a fast path for shaping ASCII text 2016-05-20 16:47:01 -07:00
bors-servo
b9650b5dd5 Auto merge of #11312 - nox:gdi32, r=mbrubeck
Bump gdi32-sys and user32-sys to 0.2

<!-- 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/11312)
<!-- Reviewable:end -->
2016-05-20 16:43:42 -07:00
Anthony Ramine
b615e3f646 Bump gdi32-sys and user32-sys to 0.2 2016-05-21 01:33:09 +02:00
bors-servo
85d8267fd2 Auto merge of #11299 - servo:GlutinCompositorProxy-Send, r=nox
Remove unsafe Send implementation for GlutinCompositorProxy.

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 _____

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

Send is now implemented for glutin::WindowProxy.

<!-- 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/11299)
<!-- Reviewable:end -->
2016-05-20 14:23:30 -07:00
Mitchell Hentges
619212abf3 Reduce 'android-18' duplication, as originally done by wenderen
Use android.platform (and $ANDROID_PLATFORM) for configuration, apply 'android-18' default
2016-05-20 22:23:28 +02:00
bors-servo
5b9375ada1 Auto merge of #11283 - asajeffrey:scheduler-with-fewer-threads, r=emilio
Scheduler with fewer threads

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 #11268.

Either:
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's improving perf, not adding functionality.

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/11283)
<!-- Reviewable:end -->
2016-05-20 12:36:48 -07:00
Alan Jeffrey
e6ebd7f11d Replace the one-thread-per-timeout model by a two-thread model of timeouts. 2016-05-20 13:59:12 -05:00
bors-servo
5bfebd4a99 Auto merge of #11294 - kilobtye:fix-resize, r=mbrubeck
Compute overflow when viewport size changed

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 #11120 (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.

<!-- 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/11294)
<!-- Reviewable:end -->
2016-05-20 11:18:25 -07:00
Piotr Stankiewicz
d1af39c114 dom: Add missing event handlers
Adding:
* global event handlers,
* window event handlers,
* document and element handlers,
* and support for BeforeUnloadEvent.

Signed-off-by: Piotr Stankiewicz <bionicrift@gmail.com>
2016-05-20 18:25:13 +01:00
bors-servo
5f34522fba Auto merge of #10910 - asajeffrey:remove-unwrap-from-glutin-app, r=aneeshusa
Removed sources of panic from ports/glutin.

Fixes #10547.

<!-- 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/10910)
<!-- Reviewable:end -->
2016-05-20 10:06:00 -07:00
Alan Jeffrey
37511cc616 Removed sources of panic from ports/glutin. 2016-05-20 11:24:24 -05:00
bors-servo
d9e19f491f Auto merge of #11290 - servo:privatize-constellation, r=nox
Privatize constellation

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 _____

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/11290)
<!-- Reviewable:end -->
2016-05-20 09:14:39 -07:00
bors-servo
983612751b Auto merge of #11282 - rzambre:csv2tsv, r=larsbergstrom
Replacing CSV profiling with TSV profiling

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 add to issue #10886 that has already been fixed.

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.

<!-- 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/11282)
<!-- Reviewable:end -->
2016-05-20 08:09:58 -07:00
Alan Jeffrey
8797f6f3ec Responding to review comments. 2016-05-20 09:45:34 -05:00
Alan Jeffrey
3962ffc501 Added a timeout to SetWindowSize. 2016-05-20 09:20:45 -05:00
Alan Jeffrey
e2203f81d3 Made SetWindowSize synchronous. 2016-05-20 09:20:45 -05:00
Alan Jeffrey
5acf0f9a05 Implemented webdriver SetWindowSize. 2016-05-20 09:20:44 -05:00
bors-servo
8b82eb6a04 Auto merge of #11184 - perlun:patch-1, r=mbrubeck
Added info about browserhtml

- [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 it is only Markdown documentation.

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

----

I feel it would make sense to make mention of this here, especially since Browser.html is part of the [road map](https://github.com/servo/servo/wiki/Roadmap) for what we aim to achieve during the year.

<!-- 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/11184)
<!-- Reviewable:end -->
2016-05-20 07:18:58 -07:00
bors-servo
a8d28771f8 Auto merge of #11293 - Ms2ger:StorageThread, r=KiChjang
Remove the pointless StorageThread alias.

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 _____

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/11293)
<!-- Reviewable:end -->
2016-05-20 06:25:13 -07:00
Ms2ger
4f623dead3 Remove unsafe Send implementation for GlutinCompositorProxy.
Send is now implemented for glutin::WindowProxy.
2016-05-20 14:39:42 +02:00
bors-servo
a4e215974c Auto merge of #11289 - Ms2ger:paintthread, r=nox
Simplify PaintThread::create().

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 _____

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/11289)
<!-- Reviewable:end -->
2016-05-20 05:08:40 -07:00
Ms2ger
0071b45449 Remove the pointless StorageThread alias. 2016-05-20 13:11:36 +02:00
kilobtye
166e35a4c7 Compute overflow when viewport size changed 2016-05-20 18:55:36 +08:00
bors-servo
8caaf196e1 Auto merge of #11288 - Ms2ger:threadfactory, r=nox
Remove pointless phantom arguments to ScriptThreadFactory and LayoutThreadFactory.

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 _____

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/11288)
<!-- Reviewable:end -->
2016-05-20 03:03:54 -07:00