Commit graph

10903 commits

Author SHA1 Message Date
bors-servo
996756687c Auto merge of #14241 - Manishearth:mut-cssom, r=SimonSapin
CSSOM: Whole ton of things

CSSOM is now starting to be useful!

Based on #14190. Only the <s>last commit</s> last two commits need review.

cc @xidorn . This doesn't change the style API, but adds useful methods.

part of #11420

This adds:
 - `insertRule()` and `deleteRule()` on `CSSStyleSheet`, `CSSGroupingRule`
 - `.style` getters on link and style elements
 - Keyframes-backed `CSSRules` and `CSSKeyframesRule.cssRules`
 - `CSSGroupingRule.cssRules`
 - `prefix` and `namespaceURI` attributes of `CSSNamespaceRule`
 - Fixups regarding parent stylesheets

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/14241)
<!-- Reviewable:end -->
2016-11-23 10:27:49 -08:00
Manish Goregaokar
95cbf1a885 Address review comments 2016-11-23 10:15:58 -08:00
Manish Goregaokar
18742e72fa Update test expectations 2016-11-23 09:32:48 -08:00
Manish Goregaokar
0e19f456bc Fixup error from #14238 2016-11-23 09:32:47 -08:00
Manish Goregaokar
8108fc465a Add CSSNamespaceRule.{namespaceURI, prefix} 2016-11-23 09:32:46 -08:00
Manish Goregaokar
64442090ba Add CSSKeyframesRule.{findRule, deleteRule, appendRule} 2016-11-23 09:32:44 -08:00
Manish Goregaokar
a9cd17ae96 Add CSSGroupingRule.{cssRules, insertRule(), deleteRule()} 2016-11-23 09:32:43 -08:00
Manish Goregaokar
cada5d7c03 Transitively deparent on removal
Chrome and Firefox do this already, probably a spec oversight
2016-11-23 09:32:42 -08:00
Manish Goregaokar
53c99662bc Make parent stylesheet optional for CSSRules 2016-11-23 09:32:40 -08:00
Manish Goregaokar
52a3a71be3 Add support for keyframe-backed CSSRules, CSSKeyframesRule.cssRules and CSSKeyframeRule 2016-11-23 09:32:39 -08:00
Manish Goregaokar
2793d5f0a9 Handle parser state in CSSOM insert_rule 2016-11-23 09:31:29 -08:00
Manish Goregaokar
972e9ac0fb Add support for LinkStyle's sheet getter on <style> and <link> 2016-11-23 09:30:33 -08:00
Manish Goregaokar
1d20d75cb2 Add insertRule() and deleteRule() on CSSStyleSheet 2016-11-23 09:30:29 -08:00
bors-servo
bc1e18c29e Auto merge of #14345 - servo:cookies-host, r=jdm
Rewrite test_redirect_from_x_to_y_provides_y_cookies_from_y.

<!-- 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/14345)
<!-- Reviewable:end -->
2016-11-23 08:55:54 -08:00
Ms2ger
035c35cdcc Provide an API to replace the host table. 2016-11-23 15:29:41 +01:00
Ms2ger
9f659e157a Improve parse_hostsfile. 2016-11-23 14:34:39 +01:00
bors-servo
c4b7cc863e Auto merge of #14276 - szeged:notify, r=jdm
Add Start/Stop notifications

Add support for Start and Stop Notifications for WebBluetooth

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

<!-- 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/14276)
<!-- Reviewable:end -->
2016-11-23 03:22:43 -08:00
bors-servo
5946f756d7 Auto merge of #14277 - szeged:service-and-manufacturer-data, r=jdm
serviceData and manufacturerData support

<!-- Please describe your changes on the following line: -->
Allow requesting for BluetoothDevices with service and manufacturer specific data.

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

<!-- 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/14277)
<!-- Reviewable:end -->
2016-11-23 01:25:39 -08:00
zakorgyula
1b1b07ef42 serviceData and manufacturerData support 2016-11-23 01:25:21 -08:00
Attila Dusnoki
fd7cdbf19f Add Start/Stop notifications 2016-11-23 01:24:33 -08:00
bors-servo
a2babd6db8 Auto merge of #14316 - canaltinova:stylo-properties, r=emilio
Implement parsing/serialization and/or gecko glue for some properties

<!-- Please describe your changes on the following line: -->
The PR covers implementation and/or gecko glue for these properties:

1. Implemented parsing/serialization and gecko glue for column-rule-width, column-rule-color and column-span longhand properties (column-span is not implemented in gecko yet but I wanted to complete column properties :) )
2.  Implemented parsing/serialization and gecko glue for text-emphasis-color longhand and text-emphasis shorthand properties.
3. Implemented gecko glue for column-gap and order properties

I implemented column-rule-width and column-rule-color properties with `-moz-` prefixes, but I can remove them if it's not right.
I coudn't test them in full stylo build yet (LLVM messed up my current clang). But I'll test them soon.

r? @Manishearth or @emilio

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

<!-- 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/14316)
<!-- Reviewable:end -->
2016-11-22 23:51:21 -08:00
Xidorn Quan
9ad80f280a Remove unused check_bindings 2016-11-23 15:24:40 +11:00
Nazım Can Altınova
c8c7240dc2 Implement gecko glue for column-gap and order properties 2016-11-23 01:50:55 +03:00
Nazım Can Altınova
852fdca1c5 Implement parsing/serialization of text-emphasis-color and text-emphasis 2016-11-23 01:50:53 +03:00
bors-servo
1535f84bf1 Auto merge of #14211 - asajeffrey:constellation-share-more-script-threads, r=jdm
Share script threads by tab and by eTLD+1

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

This PR shares script threads among all similar-origin documents in the same tab. This allows DOM object to be shared among same-origin same-tab documents.

---
<!-- 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 #633.
- [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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14211)
<!-- Reviewable:end -->
2016-11-22 16:41:46 -06:00
Alan Jeffrey
7ae19c07f0 Share script threads per-tab and per-eTLD+1. 2016-11-22 15:02:00 -06:00
bors-servo
bcf4184483 Auto merge of #14296 - Wafflespeanut:either, r=emilio
Some generic impls for Either<Length, T>

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

We seem to be using `parse_non_negative` a lot for `LengthOrFoo` types, so it's better to have generic impls (now, and in the future) for such things (assuming that `Length` will always be in the first variant of `Either`).

---
<!-- 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 it's 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/14296)
<!-- Reviewable:end -->
2016-11-22 14:59:11 -06:00
Ravi Shankar
dc7c1c6270 Some impls for Either<A, B> 2016-11-22 22:59:03 +05:30
bors-servo
f37fc5ea5e Auto merge of #14320 - servo:selectorsup, r=nox
Update to selectors 0.15

<!-- 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: -->
- [ ] 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14320)
<!-- Reviewable:end -->
2016-11-22 10:44:03 -06:00
Simon Sapin
f044659b7c Use selectors::SelectorList 2016-11-22 14:50:23 +01:00
Simon Sapin
81a3de3299 Remove SelectorImpl aliases 2016-11-22 14:50:22 +01:00
Simon Sapin
82b13d50e3 Update to selectors 0.15 2016-11-22 14:50:21 +01:00
bors-servo
3af2586b8e Auto merge of #14208 - servo:CookieStorage-debug, r=jdm
Derive Debug for CookieStorage.

<!-- 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/14208)
<!-- Reviewable:end -->
2016-11-22 07:45:20 -06:00
bors-servo
a89ba50180 Auto merge of #14206 - szeged:blacklist-to-blocklist, r=jdm
Rename blacklist to blocklist in WebBluetooth

<!-- Please describe your changes on the following line: -->
There was a renaming in the [specification](1d5cfa4ee8).

---
<!-- 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/14206)
<!-- Reviewable:end -->
2016-11-22 05:55:02 -06:00
bors-servo
f747ff95cd Auto merge of #14218 - shinglyu:dropshadow-review, r=Manishearth
Implement drop-shadow filter for Stylo

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

This patch got an r+ on [MozReview](https://reviewboard.mozilla.org/r/90560/#issue-summary)

---
<!-- 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 Bugzilla [#1315157](https://bugzilla.mozilla.org/show_bug.cgi?id=1315157)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because unit test not land-able if not enabled for servo. I'll land the test later when we enable it in Servo

<!-- 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/14218)
<!-- Reviewable:end -->
2016-11-22 03:25:43 -06:00
bors-servo
cd77071d3f Auto merge of #14313 - asajeffrey:util-opts-multiple-debugs, r=frewsxcv
Allow multiple -Z debug options.

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

This PR allows the `-Z` command line option to be set multiple times; `servo -Zfoo -Zbar` is the same as `servo -Zfoo,bar`. This means we can pass debug options into `mach test-wpt` as `mach test-wpt --binary-arg=-Zfoo`; previously this failed because mach already passed in some debug options.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because this is part of the debug and test architecture

<!-- 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/14313)
<!-- Reviewable:end -->
2016-11-22 02:23:48 -06:00
Shing Lyu
43002f2f07 Added stylo glue for drop-shadow filter 2016-11-22 10:53:20 +08:00
Shing Lyu
5248c5847d Implement drop-shadow CSS parser 2016-11-22 10:52:53 +08:00
bors-servo
30867001d1 Auto merge of #14232 - servo:moar-locks, r=upsuper
CSSOM: Make Stylesheet fields have their own synchronization

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

r? @upsuper

---
<!-- 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 bug 1314208.

<!-- 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/14232)
<!-- Reviewable:end -->
2016-11-21 19:33:57 -06:00
bors-servo
d287f58d3f Auto merge of #14275 - servo:fm-ui, r=jdm
Remove the dependency of fetch on filemanager_thread::UIProvider.

<!-- 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/14275)
<!-- Reviewable:end -->
2016-11-21 18:28:19 -06:00
Alan Jeffrey
358a7e2392 Allow multiple -Z debug options. 2016-11-21 17:16:04 -06:00
bors-servo
bbc821607a Auto merge of #14173 - asajeffrey:script-thread-stores-top-level-frame-id, r=paulrouget
Report panics using the top-level frame id rather than the pipeline id

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

At the moment, we report panics from script and layout using the root pipeline id. Once we are sharing more script threads, there won't be a root pipeline id any more. The plan is only to share script threads in the same tab, so there will be a top-level frame id that all the pipelines have in common. This PR reports panics using that top-level frame id.

This mostly makes a difference to the browser API: rather than targeting a `mozbrowsererror` event at the root iframe of the script thread that panicked, it targets it at the containing mozbrowser iframe.

---
<!-- 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 we don't test crash reporting

<!-- 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/14173)
<!-- Reviewable:end -->
2016-11-21 15:51:59 -06:00
bors-servo
0ea0ade71d Auto merge of #13574 - creativcoder:job-iface, r=jdm
Implement job queue for ServiceWorkerRegistration

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

Fixes #13424
As of now this PR (Work in Progress), will try to implement (partially) on algorithms namely : [Schedule_Job](https://w3c.github.io/ServiceWorker/#schedule-job-algorithm), [Run_Job](https://w3c.github.io/ServiceWorker/#run-job-algorithm), [Register_Job](https://w3c.github.io/ServiceWorker/#register-algorithm).

 An issue that needs to be addressed:
Resolving the promise value after queueing it as a `dom_manipulation_task` by wrapping it in a runnable `RunJobHandler` (which holds a `TrustedPromise`) and trying to call `resolve_native` results in a crash. [stack trace](http://paste.ofcode.org/zdjJ9npBgX6JsyWQkJjnYk)

@jdm I am not sure what's causing the crash ?

---

<!-- 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
- [ ] 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/13574)

<!-- Reviewable:end -->
2016-11-21 14:52:02 -06:00
Nazım Can Altınova
61431b7fd6 Implement parsing/serialization of column-rule-width, column-rule-color and column-span 2016-11-21 23:04:43 +03:00
Rahul Sharma
114c491111 Initial work on job queues for service workers 2016-11-22 01:29:37 +05:30
bors-servo
95bc7ece47 Auto merge of #14268 - Manishearth:regen, r=bholley
Regenerate bindings

Don't merge yet

<!-- 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/14268)
<!-- Reviewable:end -->
2016-11-21 12:19:39 -06:00
bors-servo
d562d10180 Auto merge of #14210 - GuillaumeGomez:fragment_node, r=nox
Add missing action in CreateContextualFragment method

r? @nox

<!-- 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/14210)
<!-- Reviewable:end -->
2016-11-21 10:20:18 -06:00
bors-servo
6cc1976cca Auto merge of #14280 - larsbergstrom:fix_fake_ld, r=Ms2ger
Move build.rs along with the other Servo files from components to ports

<!-- Please describe your changes on the following line: -->
r? @Ms2ger

---
<!-- 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/14280)
<!-- Reviewable:end -->
2016-11-21 09:20:51 -06:00
bors-servo
385e59e0f1 Auto merge of #14273 - heycam:rule-tree-stylo, r=bholley,emilio
ensure RuleNodes are dropped when Gecko drops the Stylist

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

These are the Servo-side patches from https://bugzilla.mozilla.org/show_bug.cgi?id=1318238, which already have been reviewed by @bholley and @emilio there.

<!-- 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/14273)
<!-- Reviewable:end -->
2016-11-21 08:16:36 -06:00
Ms2ger
ae1340bf50 Pass the UIProvider to FileManager::handle() as needed. 2016-11-21 10:37:26 +01:00