Commit graph

10886 commits

Author SHA1 Message Date
Nazım Can Altınova
d4c3035659 Property declaration block serialization should check for importance 2016-11-26 14:16:33 +03: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
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
Ms2ger
f672bf9eab Factor out FileManager::promote_memory(). 2016-11-21 10:37:25 +01:00
Ms2ger
5ce869d58a Factor out FileManager::read_file(). 2016-11-21 10:37:24 +01:00
Ms2ger
508e6adb7e Stop cloning FileManager::store so much. 2016-11-21 10:37:23 +01:00
Ms2ger
95ccd2d08f Move the UIProvider from FileManagerStore to FileManager.
This will allow us to reduce the amount of code that needs to care about it.
2016-11-21 10:37:22 +01:00
Cameron McCormack
d92cc8ecd0 Don't assert when we do a rule tree GC and the root nodes still has strong references.
It could still have children.
2016-11-21 17:04:58 +08:00
Cameron McCormack
830cc88283 Support cursor property url() values in stylo. r=manishearth
MozReview-Commit-ID: 6herzaXUz4i
2016-11-21 14:48:59 +08:00
Cameron McCormack
c6be1a8995 Regenerate bindings.
MozReview-Commit-ID: LLZf2HKBpjF
2016-11-21 11:35:02 +08:00
Cameron McCormack
48aa7070ac GC the RuleTree when the Stylist is dropped.
We only consider doing a GC currently if the root node has a zero refcount.
But that only happens if it has no children -- even weak children keep a
strong reference to their parent.  So at the very least, we should do a
GC specifically when the RuleTree is going away.  (We probably want to add
some other GC opportunities too at some point, otherwise it's easy to
never GC a RuleTree.)
2016-11-21 09:01:19 +08:00
bors-servo
976989fc8d Auto merge of #14278 - emilio:layout-data-in-script, r=Ms2ger
style: Don't assert when the final rule tree GC happens in script.

This should silence the assertions in https://github.com/servo/servo/issues/14213.

r? @Ms2ger

<!-- 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/14278)
<!-- Reviewable:end -->
2016-11-20 14:23:39 -06:00
bors-servo
ac6a2681ae Auto merge of #14274 - stshine:servo-url-index, r=emilio
Implement range index with the Position enum on ServoUrl

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

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

r? @emilio

<!-- 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/14274)
<!-- Reviewable:end -->
2016-11-20 12:35:14 -06:00
Simon Sapin
b203ab2419 Rename selector_impl.rs to selector_parser.rs
This makes it consistent with an upcoming update of the selectors crate.
2016-11-20 15:30:37 +01:00
Simon Sapin
08066800cd Rename selector_matching.rs to stylist.rs 2016-11-20 15:29:09 +01:00
Emilio Cobos Álvarez
5c98dffea6
style: Don't assert when the final rule tree GC happens in script. 2016-11-20 14:13:18 +01:00
bors-servo
72e4c6dc21 Auto merge of #13418 - stshine:location-replace, r=KiChjang
Make document url mutable and implement location.replace()

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

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

<!-- 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/13418)

<!-- Reviewable:end -->
2016-11-20 02:27:54 -06:00
bors-servo
b78622bd53 Auto merge of #14256 - heycam:rn-gc-heuristic, r=emilio
GC the rule tree only when the free list gets to a certain size.

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

Use a heuristic similar to Gecko's to decide when to GC the rule tree.

r? @emilio

<!-- 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/14256)
<!-- Reviewable:end -->
2016-11-19 22:01:12 -06:00
bors-servo
7e34f4cb5b Auto merge of #14284 - nox:fnv, r=Wafflespeanut
Use FnvHasher in http_loader::load

Should help with #11100.

<!-- 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/14284)
<!-- Reviewable:end -->
2016-11-19 19:18:10 -06:00
Pu Xingyu
5287e70829 Minor fixes and update test expectations 2016-11-20 06:30:10 +08:00