Commit graph

4699 commits

Author SHA1 Message Date
Anthony Ramine
7ad51dcd7a Update serde to 0.8 (fixes #12659) 2016-08-12 18:37:27 +02:00
bors-servo
5b915c403d Auto merge of #12817 - servo:euclid, r=nox
Update to euclid 0.8

<!-- 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/12817)
<!-- Reviewable:end -->
2016-08-11 20:12:29 -05:00
Martin Robinson
6259df5e2d Update to euclid 0.8 2016-08-12 03:12:06 +02:00
bors-servo
4cefbcc949 Auto merge of #12813 - emilio:hit-test, r=notriddle
dom: getElementsFromPoint does the hit testing on viewport coordinates.

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

<!-- Either: -->
- [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. -->

We got this wrong (I think it wasn't my fault actually), I was just writing a test for #12777 when I found this.

<!-- 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/12813)
<!-- Reviewable:end -->
2016-08-11 05:34:27 -05:00
bors-servo
b7facf41cb Auto merge of #12790 - malisas:malisa-bytestring-generator, r=Ms2ger
Update bindings generator to support default ByteString values in a dictionary

<!-- Please describe your changes on the following line: -->
Update bindings generator to support default ByteString values in a dictionary.

---
<!-- 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 #12737 (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/12790)
<!-- Reviewable:end -->
2016-08-11 04:36:23 -05:00
Emilio Cobos Álvarez
f9c0f2df13
dom: getElementsFromPoint does the hit testing on viewport coordinates.
We got this wrong, I was just writing a test for #12777 when I found this.
2016-08-10 21:15:10 -07:00
bors-servo
1b2450339c Auto merge of #12757 - emilio:stylo, r=bholley,pcwalton
stylo: Stop restyling display: none elements, remove the has_changed hack that made us use ReconstructFrame unconditionally.

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

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

r? @bholley

<!-- 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/12757)
<!-- Reviewable:end -->
2016-08-10 21:02:30 -05:00
Emilio Cobos Álvarez
a36762a9a2
style: Fix pseudo-element restyling. 2016-08-10 18:26:25 -07:00
bors-servo
9b4b94aa75 Auto merge of #12777 - emilio:hit-test, r=pcwalton
layout: Take into account the client point for fixed positioned stacking contexts

<!-- 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 #12763 (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/12777)
<!-- Reviewable:end -->
2016-08-10 18:50:33 -05:00
Malisa Smith
7fd65affab bindings generator: support default ByteString values in dictionary 2016-08-10 10:50:36 -07:00
bors-servo
ddf4e68c91 Auto merge of #12780 - izgzhen:xhr-file-upload, r=Manishearth
Add XHR support for FormData and related fixes

+ Update IDL for `FormData`, and related fixes
+ Reuse `htmlformelement::FormDatum` for `formdata.rs` for a uniform representation, and related fixes
+ Add support for `FormData` branch of XHR `BodyInit`.
+ Fixes a lot of related WPT tests

---
- [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

<!-- 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/12780)
<!-- Reviewable:end -->
2016-08-10 06:40:16 -05:00
Zhen Zhang
184b522230 Add XHR support for FormData 2016-08-10 12:58:35 +02:00
Eric Anholt
12a96caaf1 webgl: Validate that depthRange near <= far.
Fixes a subtest of webgl-specific.html.
2016-08-10 00:05:02 -07:00
Simon Sapin
fdb2071b2d Update to selectors 0.8.2 2016-08-09 18:18:38 +02:00
Emilio Cobos Álvarez
28d7c2dca8
layout: Take into account the client point for fixed positioned stacking contexts. 2016-08-08 13:03:55 -07:00
Emilio Cobos Álvarez
0e3d4ab407
layout: Expand animation test mode to support not force-ticking layout. 2016-08-05 14:42:45 -07:00
Josh Matthews
f152bc3b06 Implement Window.postMessage for same-origin windows. 2016-08-04 11:52:26 +02:00
bors-servo
1837fcbedd Auto merge of #11318 - mitchhentges:1471-cache-tag-name, r=nox
Compute tag_name a maximum of once per document owner

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

Either:
- [X] These changes do not require tests because no new functionality was added, just a reorganization and caching of existing 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/11318)
<!-- Reviewable:end -->
2016-08-04 02:27:20 -05:00
bors-servo
20b9ce6cff Auto merge of #12682 - creativcoder:fire-fetch, r=jdm
Dispatch lifecycle events to service worker object and refactor html tests

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

Changes introduced to dispatch `controllerchange`, `activate` and `fetch` simple events to Service Worker interfaces. The html tests under `tests/html/service-workers` was also updated to demo the changes.
r? @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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [X] These changes do not require 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/12682)
<!-- Reviewable:end -->
2016-08-04 01:25:23 -05:00
bors-servo
7aafc0d0ec Auto merge of #12685 - ConnorGBrewster:history_length, r=asajeffrey
Implement history.length

<!-- 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] 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/12685)
<!-- Reviewable:end -->
2016-08-03 22:22:57 -05:00
Mitchell Hentges
1ca4a3e32f Compute tag_name a maximum of once per document owner 2016-08-03 20:05:22 -07:00
bors-servo
cbf71a2cf3 Auto merge of #12645 - emilio:stylo, r=bholley
stylo: Allow computing change hints during the traversal.

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

<!-- Either: -->
- [x] These changes do not require tests because geckolib :-(

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

r? @bholley
cc @heycam

<!-- 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/12645)
<!-- Reviewable:end -->
2016-08-03 19:02:26 -05:00
Mike MacDonald (crazymykl)
aed761509b
Fire load event for external stylesheets
Do not load stylesheets with the wrong Content-Type

Fixes #11912, #11910
2016-08-03 17:13:26 -04:00
Emilio Cobos Álvarez
6d67525172
style: Refactor TRestyleDamage and TNode to accept/provide a "style source"
In the Gecko case, this style source would be the style context. In the servo
case, it will be always the computed values.

We could optimise this further in the case of stylo (from three FFI calls to
one) if we use an API of the form CalcAndStore(node, new_cv). But that would
imply borrowing the data twice from Servo (we also have borrow_data_unchecked
fwiw, but...).
2016-08-03 13:31:11 -07:00
bors-servo
7a7bdf51ad Auto merge of #11726 - sjmelia:7720_add_target_selector, r=mbrubeck
Issue 7720: Add target selector and update when scrolling to fragment

<!-- Please describe your changes on the following line: -->
Add the target pseudo selector and set/unset it during scrolling to fragment. This change is not complete as no repaint is triggered after the selector is added - it will only take effect after a repaint is triggered by e.g. hovering over another element. (See manual test)

I would like some help because i'm not sure how to resolve this; I can only think to call window.reflow.

I added a manual test case, don't think this counts really! I think the applicable automated test is in /tests/wpt/web-platform-tests/dom/nodes/Element-matches.html but it currently fails, I think due to the above.

---
<!-- 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 #7720  (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/11726)
<!-- Reviewable:end -->
2016-08-03 14:53:30 -05:00
Connor Brewster
611de2ac06 Implement history.length
Add full frame tree iter to reduce code duplication
Add FrameId field to the Frame struct.
2016-08-03 11:42:31 -06:00
Steve Melia
04f5369577 Issue 7720: Add target selector and update when scrolling to fragment 2016-08-03 13:23:10 +01:00
Glenn Watson
db8c3ef727 Update cargo.lock for wr2, pin ipc-channel. 2016-08-03 10:44:10 +02:00
Zhen Zhang
17ae38a318 Add cancellability to file manager load and related refactoring 2016-08-02 23:51:51 +02:00
bors-servo
28b329e454 Auto merge of #12536 - izgzhen:form-file, r=Manishearth
Add form submission for file type input and related fixings

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
- [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/12536)
<!-- Reviewable:end -->
2016-08-02 10:04:46 -05:00
Rahul Sharma
1b29dfb8ab Dispatch events to service worker object and refactor html tests 2016-08-02 20:18:25 +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
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
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
Johann Hofmann
ff6283a63c
Prevent injection vulnerability in image page 2016-08-01 17:25:23 +02:00
Zhen Zhang
47a7d465fd Add FileReaderSync skeleton 2016-07-31 09:19:39 +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
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
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
ddh
db808ca75d Added devtools support to fetch for XHR + Manish's XHR ident fix
added unit test for request fetch with devtools

added devtools/fetch test
2016-07-29 11:20:38 +01:00
Rahul Sharma
4936fb26d9 Bring back run_with_memory_reporting in serviceworkerglobalscope 2016-07-29 15:34:24 +05:30
bors-servo
74d3b87c3e Auto merge of #12649 - Ms2ger:update-script, r=Manishearth
Some fixes to the script crate.

<!-- 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/12649)
<!-- Reviewable:end -->
2016-07-29 04:42:18 -05:00
Ms2ger
7842b72c09 Remove the no longer necessary iter_arith feature gate. 2016-07-29 10:38:10 +02:00
Ms2ger
decc57f2ad Correct the call to JS_SetGCZeal. 2016-07-29 10:24:42 +02:00
Ms2ger
5a61142720 Remove an unused argument to ErrorInfo::from_dom_exception. 2016-07-29 10:24:29 +02:00
bors-servo
11ad48f8e3 Auto merge of #12648 - heycam:store-extra-data, r=Manishearth
Store UrlExtraData in {specified,computed}::Image::Url.

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

This stores a `UrlExtraData` object in `specified::Image::Url` and `computed::Image::Url`, so that geckolib can use the base/principal to create Gecko `ImageValue`s.  (I'll do that in the followup to support background-image; want to get this in first.)

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 existing tests should be sufficient

<!-- 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/12648)
<!-- Reviewable:end -->
2016-07-29 02:26:25 -05:00
Cameron McCormack
baa339f4af Store UrlExtraData in {specified,computed}::Image::Url. 2016-07-29 14:22:35 +08:00