Commit graph

19671 commits

Author SHA1 Message Date
Rahul Sharma
1b29dfb8ab Dispatch events to service worker object and refactor html tests 2016-08-02 20:18:25 +05:30
Manish Goregaokar
d1e45f78af
Add serialize_four_sides, use for serializing BorderRadius 2016-08-02 19:22:03 +05:30
bors-servo
2aa257f603 Auto merge of #12557 - creativcoder:sw-scope, r=nox
Bring back run_with_memory_reporting in serviceworkerglobalscope

<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [X] These changes do not require tests because its a 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/12557)
<!-- Reviewable:end -->
2016-08-02 08:05:16 -05:00
Manish Goregaokar
c6feae3c5c
Add roundtrip parsing tests for basic_shape/position 2016-08-02 15:57:35 +05:30
Manish Goregaokar
973796b989
Various fixes in basic-shape parsing/serialization found by unit tests 2016-08-02 15:57:34 +05:30
Manish Goregaokar
e69f6396e2
Remove unused imports 2016-08-02 15:57:32 +05:30
Manish Goregaokar
1e7973263f
Fix tidy 2016-08-02 15:57:30 +05:30
Manish Goregaokar
eb82cc25ef
Add Polygon to basic_shape.rs 2016-08-02 15:57:28 +05:30
Manish Goregaokar
78ce65d5a8
Add Ellipse to basic_shape.rs 2016-08-02 15:57:27 +05:30
Manish Goregaokar
77f345476f
Add Circle to basic_shape.rs 2016-08-02 15:57:25 +05:30
Manish Goregaokar
44e33bcdc5
Move Position into its own values module 2016-08-02 15:57:23 +05:30
Manish Goregaokar
88c1a67d89
Add ShapeRadius to basic_shape.rs 2016-08-02 15:57:22 +05:30
Manish Goregaokar
2580c1dc6e
Add InsetRect, move BorderRadius to basic_shape.rs 2016-08-02 15:57:20 +05:30
Cameron McCormack
f2a547c7ed Parse style sheets with a real base URL in geckolib. 2016-08-02 16:52:15 +08:00
bors-servo
93b130f3f7 Auto merge of #12579 - izgzhen:fix-fileapi-ref, r=Manishearth
Fix FileAPI's refcount implementation

Revise several intricate parts of FileAPI's internal refcounting-related implementation.

Goal: Get it done right once and for all.

r? @Manishearth

<!-- 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 do not require tests because it is internal logic 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12579)
<!-- Reviewable:end -->
2016-08-02 03:03:47 -05:00
Zhen Zhang
ef091179f5 Add form submission for file type input and related fixings 2016-08-02 09:05:42 +02:00
bors-servo
2eeb945807 Auto merge of #12689 - heycam:warning-fix, r=Ms2ger
Fix unused variable warning.

<!-- 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: -->
- [ ] `./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 it's just a variable rename

<!-- 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/12689)
<!-- Reviewable:end -->
2016-08-02 02:01:27 -05:00
Cameron McCormack
4a8c181419 Fix unused variable warning. 2016-08-02 11:43:44 +08:00
bors-servo
f16aac0e5d Auto merge of #12651 - heycam:background-position, r=Manishearth
Add support for background-position in geckolib.

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

r? @Manishearth

---
<!-- 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 this is a geckolib-only 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12651)
<!-- Reviewable:end -->
2016-08-01 20:41:56 -05:00
bors-servo
4fc4232489 Auto merge of #12683 - GuillaumeGomez:up_crate, r=larsbergstrom
Update video-metadata crate version (pkg-config support)

<!-- 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/12683)
<!-- Reviewable:end -->
2016-08-01 16:11:47 -05:00
Guillaume Gomez
4fb04a1161 Update video-metadata crate version (pkg-config support) 2016-08-01 23:05:16 +02:00
bors-servo
144b980df2 Auto merge of #12679 - johannhof:image-inject, r=Manishearth
Prevent injection vulnerability in image page

This is taking up nox' suggestion from #12542 and creates an img element using Rust code instead of escaping the URL. I will look at the neterror.html URL strings separately, we might do those in a similar way.

To reproduce, visit e.g. the following URL with your vulnerable Servo:
```
https://servo.org/screenshot.png?'onload='document.body.innerHTML=`hacked`'
```

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #12542

- [x] These changes do not require tests because this is just fixing up existing behavior and I'm not sure how to test it

r?@jdm

<!-- 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/12679)
<!-- Reviewable:end -->
2016-08-01 13:27:46 -05:00
bors-servo
7f79261d4d Auto merge of #12678 - servo:always-be-updating, r=jdm
Update png.

<!-- 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/12678)
<!-- Reviewable:end -->
2016-08-01 11:52:09 -05:00
bors-servo
3e97b79a5f Auto merge of #12661 - larsbergstrom:ffmpwg_windows, r=metajack
Add missing libraries for Windows

<!-- Please describe your changes on the following line: -->
r? @metajack
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12661)
<!-- Reviewable:end -->
2016-08-01 10:55:13 -05:00
Johann Hofmann
ff6283a63c
Prevent injection vulnerability in image page 2016-08-01 17:25:23 +02:00
bors-servo
76ae608290 Auto merge of #12662 - izgzhen:fileapi-idlharness, r=Ms2ger
Update FileAPI WPT idlharness

Updated to match the latest https://w3c.github.io/FileAPI/#idl-index

<!-- 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/12662)
<!-- Reviewable:end -->
2016-08-01 09:01:27 -05:00
bors-servo
e9d647ca54 Auto merge of #12677 - Ms2ger:unused-float-sizes, r=Manishearth
Remove unused inline_size_of_preceding_{left,right}_floats fields from BlockFlow.

<!-- 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/12677)
<!-- Reviewable:end -->
2016-08-01 08:04:30 -05:00
Ms2ger
d05574d2a2 Update png. 2016-08-01 14:03:09 +02:00
Ms2ger
247c86f887 Remove unused inline_size_of_preceding_{left,right}_floats fields from BlockFlow. 2016-08-01 13:56:24 +02:00
bors-servo
5dac1f64c1 Auto merge of #12663 - izgzhen:file-reader-sync, r=Manishearth
Add FileReaderSync skeleton

Add a FileReaderSync interface skeleton, no concrete implementation yet.

<!-- 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] 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12663)
<!-- Reviewable:end -->
2016-07-31 03:50:37 -05:00
Zhen Zhang
47a7d465fd Add FileReaderSync skeleton 2016-07-31 09:19:39 +02:00
bors-servo
7f1ecddd31 Auto merge of #12667 - samlh:patch-1, r=emilio
Remove dead code from table_cell.rs

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./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 functional 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12667)
<!-- Reviewable:end -->
2016-07-31 01:46:47 -05:00
Samuel Harrington
6c2faa2a20 Remove dead code from table_cell.rs 2016-07-30 23:33:31 -07:00
Zhen Zhang
612e15f05b Update FileAPI WPT idlharness 2016-07-31 00:16:31 +02:00
bors-servo
1ce4be8f6d Auto merge of #12634 - malisas:malisa-headersAPI, r=jdm
Headers API constructor and methods

<!-- Please describe your changes on the following line: -->
This PR fills out the constructor and the delete, get, has, and set methods for the Headers API. Addresses issue #11897 .

The PR also rewrites the append method to support `hyper::header::Headers`'s HashMap `insert` method, which overwrites entries instead of appending.
As a result of this, for a given header name there is at most one value in the inner "header list"/HashMap. Multiple values for the same name are comma-delimited.

There are still a few TODOs:
- Support `OpenEndedDictionary<ByteString>`  as a possible `HeadersInit` value. [OpenEndedDictionary<T> is a future IDL construct.](https://fetch.spec.whatwg.org/#headers-class)
- Support `iterable<ByteString, ByteString>`. Related issue: #12628
- Values are comma-delimited, except for values with the name `set-cookie`, which are newline-delimited. This is because values for `set-cookie` are [allowed to contain](https://tools.ietf.org/html/rfc7230#section-3.2.2) inner commas. This violates the [spec](https://fetch.spec.whatwg.org/#concept-header-value-combined).
- The TODOs from PR #12467 regarding value parsing also still need to be resolved.

---
<!-- 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 tests for the Headers API already exists, but this commit does not implement the interface fully. The tests will fail.

<!-- 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/12634)
<!-- Reviewable:end -->
2016-07-30 12:36:49 -05:00
Malisa Smith
e631d3a5f6 Headers API constructor and methods
- Reworked the append method to support the inner `hyper::header::Headers`'s HashMap `insert` method, which overwrites entries instead of appending.
- Filled out constructor as well as delete, get, has, and set methods.
- Updated relevant test expectations
2016-07-30 10:32:51 -07:00
Lars Bergstrom
82dc707637 Add missing libraries for Windows 2016-07-30 11:03:33 -05:00
bors-servo
2553bb7af4 Auto merge of #12660 - servo:cargoup, r=larsbergstrom
Update Cargo to 0.13.0-nightly (f1bbc08 2016-07-29)

> Finished debug [unoptimized + debuginfo] target(s) in 502.89 secs

<!-- 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/12660)
<!-- Reviewable:end -->
2016-07-30 10:19:39 -05:00
Anthony Ramine
de065257a9 Update Cargo to 0.13.0-nightly (f1bbc08 2016-07-29)
> Finished debug [unoptimized + debuginfo] target(s) in 502.89 secs
2016-07-30 17:17:14 +02:00
bors-servo
d053fb16f6 Auto merge of #12186 - GuillaumeGomez:video-metadata, r=larsbergstrom,jdm,KiChjang
Implement video-metadata check

<!-- 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/12186)
<!-- Reviewable:end -->
2016-07-29 17:46:42 -05:00
Guillaume Gomez
34cb55193d Change tests results to set timeout/failure expected 2016-07-30 00:32:27 +02:00
bors-servo
cacacf1457 Auto merge of #12653 - Manishearth:split-values, r=SimonSapin
style: Split values.rs into specified/computed module files

r? @SimonSapin

<!-- 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/12653)
<!-- Reviewable:end -->
2016-07-29 15:55:07 -05:00
bors-servo
8a09a0369f Auto merge of #12642 - notriddle:textarea_height, r=asajeffrey
Use explicit height of inline-block fragments

When an explicit height is used for inline-block fragments, the line spacing algorithm should use that for the height above the baseline, instead of the intrinsic one.

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12492 (github issue number if applicable).
- [X] There are tests for these changes

<!-- 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/12642)
<!-- Reviewable:end -->
2016-07-29 13:53:13 -05:00
bors-servo
fdb1e511bd Auto merge of #12637 - asajeffrey:constellation-use-reentrant-logging-mutex, r=emilio
Replaced mutex in constellation logging by a reentrant mutex.

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

The double-panic in #12553 may be caused by using a non-reentrant lock, which panics on reetry. This PR adds a reentrant lock type (slightly annoyingly, the implementation in std isn't exported) and uses it for logging. cc @jdm

---
<!-- 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 #12619.
- [X] These changes do not require tests because they are designed to remove a class of intermittents.

<!-- 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/12637)
<!-- Reviewable:end -->
2016-07-29 12:49:08 -05:00
bors-servo
b5fe7db8b4 Auto merge of #12502 - avadacatavra:devtools, r=jdm
Added devtools support to fetch for XHR

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

Added devtools support for fetch for XHR, but devtools can't show the request in the XHR tab. I've attached a picture of an XHR request in devtools.

<img width="694" alt="screenshot 2016-07-19 11 07 55" src="210b0e8a-4da1-11e6-8288-48005ede33f6.png">

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because I don't know how to automate devtools testing for this

<!-- 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/12502)
<!-- Reviewable:end -->
2016-07-29 11:44:20 -05:00
Alan Jeffrey
e3030d053a Replaced mutex in constellation logging by a reentrant mutex. 2016-07-29 09:44:45 -05:00
bors-servo
9d795c3a3e Auto merge of #12650 - shinglyu:py3-tidy, r=Wafflespeanut
Add python3 licence check template

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

Add a python3 license template. #11107 uses python3 exclusively so we need this.
---
<!-- 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 covered by test-tidy self test

<!-- 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/12650)
<!-- Reviewable:end -->
2016-07-29 09:42:00 -05:00
Manish Goregaokar
149246e96a
style: Split values.rs into specified/computed module files 2016-07-29 18:43:42 +05:30
bors-servo
304887bad4 Auto merge of #12640 - UK992:windows-link-args, r=jdm
Add link arguments to test-unit

Apply same link arguments added in https://github.com/servo/servo/pull/12605 to ``test-unit``, to prevent rebuild servo.

<!-- 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/12640)
<!-- Reviewable:end -->
2016-07-29 07:41:37 -05:00
bors-servo
94e6f59174 Auto merge of #12635 - nc4rrillo:refactor-spawn-multiprocess, r=Manishearth
Extracted common parts of the starting content process

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

---
I implemented a trait for both `process::Command` and `sandbox::Command` in order to constrain my generic `setup_common` method.

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

<!-- Either: -->
- [X] These changes do not require tests because we are extracting common functionality across two code branches into a method

<!-- 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/12635)
<!-- Reviewable:end -->
2016-07-29 06:43:19 -05:00