Commit graph

4270 commits

Author SHA1 Message Date
Ms2ger
021b9e3239 Remove the layout shutdown channel.
Nobody is listening.
2016-06-04 13:24:32 +02:00
bors-servo
6581e3504a Auto merge of #11585 - asajeffrey:constellation-avoid-deadlock-during-pipeline-closure, r=larsbergstrom
Avoid deadlock when closing a pipeline.

<!-- Please describe your changes on the following line: -->
At the moment, the constellation blocks on a pipeline during closure. This PR makes pipeline closure asynchronous.

---
<!-- 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 #11546.
- [X] These changes do not require tests because testing for absence of deadlock is difficult.

<!-- 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/11585)
<!-- Reviewable:end -->
2016-06-03 22:22:49 -05:00
bors-servo
93fc7c9cc3 Auto merge of #11588 - nox:namednodemap, r=Ms2ger
Clarify some argument names in NamedNodeMap interface

<!-- 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/11588)
<!-- Reviewable:end -->
2016-06-03 21:00:49 -05:00
Alan Jeffrey
2416072dc2 Avoid deadlock when shutting down. 2016-06-03 20:05:37 -05:00
bors-servo
b389ecda67 Auto merge of #11534 - izgzhen:add-blob-url-store, r=Manishearth
Add Blob URL store

Spec: https://w3c.github.io/FileAPI/#BlobURLStore.

I finally decide to put the store under `ScriptThread` and interpret the "global object" as the script thread itself. The new APIs will be used during the page loading (if scheme is `blob`) and `URL.createObjectURL/revokeObjectURL`.

Related to #11131.

<!-- 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 part of #10539

<!-- Either: -->
- [x] These changes do not require tests because it is new stub code which needs further integrating PRs.

<!-- 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/11534)
<!-- Reviewable:end -->
2016-06-03 13:26:29 -05:00
bors-servo
77e79d6e18 Auto merge of #11582 - nox:parentnode, r=Wafflespeanut
Remove some commented-out methods that were removed from spec

<!-- 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/11582)
<!-- Reviewable:end -->
2016-06-03 12:36:19 -05:00
bors-servo
e75339ca0c Auto merge of #11571 - Ms2ger:derive-clone, r=nox
Derive Clone for DOMManipulationTaskSource, UserInteractionTaskSource.

<!-- 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/11571)
<!-- Reviewable:end -->
2016-06-03 10:40:07 -05:00
Anthony Ramine
58c18bfdbd Clarify some argument names in NamedNodeMap interface 2016-06-03 16:40:52 +02:00
Anthony Ramine
22a2c8788b Remove some commented-out methods that were removed from spec 2016-06-03 16:16:25 +02:00
bors-servo
51d41c5161 Auto merge of #11496 - GuillaumeGomez:range, r=nox
Implement Range::createContextualFragment

<!-- 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/11496)
<!-- Reviewable:end -->
2016-06-03 05:32:42 -05:00
Ms2ger
0861b701d5 Derive Clone for DOMManipulationTaskSource, UserInteractionTaskSource. 2016-06-03 09:33:18 +02:00
bors-servo
530b5a649e Auto merge of #11468 - rebstar6:refPol4, r=nox
Implement meta referrer policy delivery (3)

<!-- 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 #10311 (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/11468)
<!-- Reviewable:end -->
2016-06-02 21:51:10 -05:00
Rebecca
687d0cd7c3 Add meta-referrer support for documents 2016-06-02 21:48:09 -04:00
Zhen Zhang
3d7ed42652 add Blob URL store 2016-06-03 08:17:24 +08:00
Guillaume Gomez
5ab7f54762 Implement Range::createContextualFragment 2016-06-03 01:31:53 +02:00
Guillaume Gomez
2ef1437457 Replace HTMLScriptElement::mark_script_already_started by set_script_already_started 2016-06-03 01:31:52 +02:00
Connor Brewster
9980acf2c5 removed unused imports 2016-06-02 16:18:13 -06:00
Keith Yeung
05fc799f92 Clean up DOMManipulationTaskSource 2016-06-02 15:27:08 -04:00
bors-servo
bdecfa13d2 Auto merge of #11542 - asajeffrey:mozbrowser-send-opentab-event, r=paulrouget
Fire a mozbrowseropenwindow event when an html anchor has a non-self target

<!-- Please describe your changes on the following line: -->
When an html anchor has a non-self target, fire a `mozbrowseropenwindow` event.

---
<!-- 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 #11539.
- [X] These changes do not require tests because we don't have the infrastructure for mozbrowser testing yet.

<!-- 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/11542)
<!-- Reviewable:end -->
2016-06-02 09:45:26 -05:00
Alan Jeffrey
835b6a9017 Fire a mozbrowseropenwindow event when an html anchor has a non-self target. 2016-06-02 09:44:35 -05:00
bors-servo
e7241c8215 Auto merge of #11554 - paulrouget:targetProperty, r=Ms2ger
Support link target attribute

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11554)
<!-- Reviewable:end -->
2016-06-02 07:07:19 -05:00
bors-servo
cc017fc0b8 Auto merge of #11114 - creativcoder:nav-sw, r=jdm
implement related service worker interface and register method

Fixes  #11091

<!-- 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/11114)
<!-- Reviewable:end -->
2016-06-02 06:18:59 -05:00
Paul Rouget
b11bf86848 Support link target attribute 2016-06-02 19:12:59 +08:00
bors-servo
196adaff07 Auto merge of #11550 - afluth:11505-ImplementParseFromStringXmlTypes, r=Ms2ger
Added support for additional xml types to DOMParser::parseFromString

<!-- Please describe your changes on the following line: -->
This pull request adds support for "application/xml" and "application/xhtml+xml" to DOMParser::parseFromString.
---
<!-- 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 #11505 (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/11550)
<!-- Reviewable:end -->
2016-06-02 05:25:05 -05:00
Ms2ger
1da1b62128 Remove spurious JS_Init call.
Runtime::new() will call JS_Init a second time, leading to an assertion.
2016-06-02 10:02:19 +02:00
Andrew Fluth
9f2bd6779a Added support for additional xml types to DOMParser::parseFromString 2016-06-01 20:55:27 -05:00
Rahul Sharma
15a2064c0d implement related sw interface and register method 2016-06-02 04:09:39 +05:30
bors-servo
0594d58bc8 Auto merge of #11538 - Ms2ger:warnings, r=emilio
Fix some build warnings.

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

<!-- 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/11538)
<!-- Reviewable:end -->
2016-06-01 15:43:58 -05:00
bors-servo
4c8c57992b Auto merge of #11545 - emilio:reddit, r=pcwalton
script: Ensure we don't ignore reflows for queries that bail out due to the viewport size not yet present

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

<!-- Either: -->
- [ ] There are tests for these changes.

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

This fixes #11223.

Note that this didn't happen in the root pipeline because we explicitly set the
window size in that case.

<!-- 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/11545)
<!-- Reviewable:end -->
2016-06-01 12:54:28 -05:00
Emilio Cobos Álvarez
f08971ec88
script: Ensure we don't ignore reflows for queries that bail out due to the viewport size not yet present.
This fixes #11223.

Note that this didn't happen in the root pipeline because we explicitly set the
window size in that case.
2016-06-01 19:42:15 +02:00
bors-servo
bc9c4b1cba Auto merge of #11531 - emilio:anglemove, r=metajack
script: Use angle from the servo repo

<!-- 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 they're just moving a repo source.

<!-- 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/11531)
<!-- Reviewable:end -->
2016-06-01 10:01:17 -05:00
bors-servo
2be5f72113 Auto merge of #11522 - nox:root-ref, r=jdm
Remove all uses of &Root<T>

<!-- 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/11522)
<!-- Reviewable:end -->
2016-06-01 07:36:47 -05:00
bors-servo
3d7b17681d Auto merge of #11221 - izgzhen:blob-file-backend, r=Manishearth
Add file backend support for Blob and related

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [x] These changes fix #10851, related to #11131
- [x] These changes do not require tests because the implementation is partial and can't work alone

1. Add new backend to `Blob` and a `BlobImpl` struct to abstract multiple backends
2. Rewrite most interfaces of `Blob` to accommodate the change
3. Change the `read` behaviour of `FileReader`, considering the case when blob is file-backed and not cached

The design is still immature, welcome comments!

- [x] I used `DOMRefCell` to cache the bytes in `BlobImpl`, is it sound?
- [x] The interfaces (like `BlobImpl::get_bytes`) handle requests in a default-to-empty way when the inner `DataSlice` is not cached. It might be possible to handle this condition better.

<!-- 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/11221)
<!-- Reviewable:end -->
2016-06-01 05:09:21 -05:00
Ms2ger
46ea78e960 Fix some build warnings. 2016-06-01 10:35:45 +02:00
bors-servo
09e6f4ac54 Auto merge of #11428 - g-k:csstext, r=SimonSapin
csstext

- [x] These changes fix #4431.
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` reports one error for the `css_properties_accessors!` macro not having a spec link

```
$ git log -1 --format=oneline
91fb9bf1d3 fixup! implement cssText
$ ./mach build -d
   Compiling style v0.0.1 (file:///Users/greg/servo/components/style)
   Compiling gfx v0.0.1 (file:///Users/greg/servo/components/gfx)
   Compiling script v0.0.1 (file:///Users/greg/servo/components/script)
   Compiling layout_traits v0.0.1 (file:///Users/greg/servo/components/layout_traits)
   Compiling compositing v0.0.1 (file:///Users/greg/servo/components/compositing)
   Compiling glutin_app v0.0.1 (file:///Users/greg/servo/ports/glutin)
   Compiling constellation v0.0.1 (file:///Users/greg/servo/components/constellation)
   Compiling layout v0.0.1 (file:///Users/greg/servo/components/layout)
   Compiling servo v0.0.1 (file:///Users/greg/servo/components/servo)
Build completed in 0:05:11.475584
$ ./mach test-tidy --faster
Checking files for tidiness...
./components/script/dom/cssstyledeclaration.rs:386: method declared in webidl is missing a comment with a specification link
  Progress: 100% (12/12)
```

- [x] There are tests for these changes.  More CSSOM tests pass, but others fail that probably shouldn't:

* `./mach test-css tests/wpt/css-tests/cssom-1_dev/html/index-002.htm` and a bunch of the other tests in `/css-tests/cssom-1_dev/html/ crash when run individually
* `./mach test-css tests/wpt/css-tests/cssom-1_dev/html/cssom-cssText-serialize.htm` fails to strip a trailing semicolon (`left: 10px` vs `left: 10px;`)
* `./mach test-css tests/wpt/css-tests/cssom-1_dev/html/index-001.htm` shared shorthand values aren't coalesced (`margin: 20px` vs. `margin: 20px 20px 20px 20px`)
* `./mach test-css tests/wpt/css-tests/cssom-1_dev/html/cssstyledeclaration-csstext.htm` also crashes and fails for `color: red;` vs. `color: RED;`,  preserving declaration insertion order, whitespace in the value, and setting an unknown style property.

<!-- 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/11428)
<!-- Reviewable:end -->
2016-06-01 01:59:12 -05:00
bors-servo
5d86b9b2ae Auto merge of #11480 - rafaqtro:local_b, r=emilio
rename

<!-- Please describe your changes on the following line: -->
rename of page_fetch_complete and handle_page_fetch_complete for page_headers_available and handle_page_headers_available .

---
<!-- 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 #11418 (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/11480)
<!-- Reviewable:end -->
2016-06-01 00:15:51 -05:00
bors-servo
f0b3d1e77d Auto merge of #11417 - stshine:flex-longhand-properties, r=mbrubeck
Support remaining longhand flexbox style properties for servo

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

Add the remaining longhand CSS properties of flexbox for servo,
including `flex-wrap`, `flex-grow`, `flex-shrink`, `justify-content`,
`align-items`, `align-self` and `align-content`.

Tests for the remaining longhand properties are also enabled. Test for
default value of `align-self` is modified because the new default value
for this property is "auto" is current flexbox CR.

<!-- 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/11417)
<!-- Reviewable:end -->
2016-05-31 21:44:06 -05:00
bors-servo
27d1f18271 Auto merge of #11398 - pcwalton:webrender-viewport, r=glennw
script: Keep the DOM-side viewport up to date when scrolling happens in WebRender.

This happens asynchronously, just as it does in non-WebRender mode.

This functionality is a prerequisite for doing proper display-list-based
hit testing in WebRender, since it moves the scroll offsets into Servo
(and, specifically, into the script thread, enabling iframe event
forwarding) instead of keeping them private to WebRender.

Requires servo/webrender_traits#55 and servo/webrender#277.

Partially addresses #11108.

r? @glennw

<!-- 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/11398)
<!-- Reviewable:end -->
2016-05-31 20:54:29 -05:00
Zhen Zhang
43ad4ba585 Add file backend support for Blob and related
Changes include:
- Add BlobImpl to Blob, and related caching mechanism
- Expose ResourceThreads to document_loader, workerglobalscope, worker, and global
- Fix encode_multipart_form_data
- Other small fixes to accommodate the above changes
2016-06-01 09:47:07 +08:00
bors-servo
6b1088234b Auto merge of #11335 - szeged:blacklist, r=jdm
Add WebBluetooth GATTBlacklist support

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 there are no webbluetooth tests yet.

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/11335)
<!-- Reviewable:end -->
2016-05-31 20:00:23 -05:00
Glenn Watson
ff995d739c implement cssText 2016-05-31 19:32:30 -04:00
Emilio Cobos Álvarez
796fd6b63a
script: Use angle from the servo repo 2016-06-01 01:19:54 +02:00
Rafael Quintero
71104c8619 rename of page_fetch_complete and handle_page_fetch_complete
rename

align
2016-05-31 17:27:59 -04:00
Patrick Walton
a86f77e36d script: Keep the DOM-side viewport up to date when scrolling happens in
WebRender.

This happens asynchronously, just as it does in non-WebRender mode.

This functionality is a prerequisite for doing proper display-list-based
hit testing in WebRender, since it moves the scroll offsets into Servo
(and, specifically, into the script thread, enabling iframe event
forwarding) instead of keeping them private to WebRender.

Requires servo/webrender_traits#55 and servo/webrender#277.

Partially addresses #11108.
2016-05-31 14:12:51 -07:00
fokinv
a920e6d54e Add WebBluetooth Blacklist support 2016-05-31 17:05:45 +02:00
Anthony Ramine
919a4774dd Avoid a literal "&Root<T>" in its PartialEq impl 2016-05-31 14:57:47 +02:00
Anthony Ramine
88f8a22269 Bump rust-mozjs for the safe Runtime::new (fixes #11512) 2016-05-31 14:54:19 +02:00
Anthony Ramine
d95f5edc2d Cleanup RootCollection methods
The methods `root` and `unroot` should both be unsafe and take
a `*const Reflector`.
2016-05-31 14:52:55 +02:00
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