Commit graph

10600 commits

Author SHA1 Message Date
Shing Lyu
8bea421329 Migrated -Z trace-layout to serde_json 2016-11-07 15:54:07 +08:00
bors-servo
f48b3fe219 Auto merge of #14089 - Wafflespeanut:tocss, r=SimonSapin
Make use of Servo-specific ToCss everywhere!

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

This will allow types to be generic over our local `ToCss`

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- 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/14089)
<!-- Reviewable:end -->
2016-11-06 23:26:08 -06:00
Glenn Watson
0c7cdaf233 Update core-graphics. 2016-11-06 20:27:04 -08:00
Ravi Shankar
6061985898 Prefer Servo-specific ToCss for all types 2016-11-07 09:14:22 +05:30
bors-servo
1e771a8073 Auto merge of #14097 - frewsxcv:hella-atoms, r=jdm
Add more event names to atom list; use more `atom` macros.

<!-- 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/14097)
<!-- Reviewable:end -->
2016-11-06 15:28:54 -06:00
bors-servo
b5cf4db774 Auto merge of #14087 - MichaelKohler:issue13735, r=jdm
Remove CollectMemoryReports from compositor (fixes #13735)

Remove all of the code in compositor.rs related to:

* sending the RegisterReporter message
* sending the UnregisterReporter message
* the mem_profiler_chan member of IOCompositor
* move the code that sends the ProfilerMsg::Exit message into Constellation::handle_exit instead

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #13735 (github issue number if applicable).

- [ ] There are tests for these changes OR
- [x] These changes do not require tests because _____

<!-- 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/14087)
<!-- Reviewable:end -->
2016-11-06 14:01:27 -06:00
Ravi Shankar
5dbc8d02c9 Move Servo-specific ToCss to style_traits 2016-11-07 00:00:28 +05:30
Nazım Can Altınova
7720fe4d9c Move LengthOrNumber to style/values and implement GeckoStyleCoordConvertible 2016-11-06 20:08:31 +03:00
Nazım Can Altınova
9a2ef2e6ef Move set_image and set_gradient into nsStyleImage impl 2016-11-06 20:08:29 +03:00
Nazım Can Altınova
6014c0c8ed Implement gecko glue for border-image-slice 2016-11-06 20:08:27 +03:00
Nazım Can Altınova
8387d7e8b6 Implement gecko glue for border-image-width 2016-11-06 20:08:24 +03:00
Nazım Can Altınova
cbd43f7acc Implement gecko glue for border-image-repeat 2016-11-06 20:08:22 +03:00
Nazım Can Altınova
dc55e80752 Implement gecko glue for border-image-outset 2016-11-06 20:08:20 +03:00
Nazım Can Altınova
132b36835b Refactor image code and implement gecko glue for border-image-source 2016-11-06 20:08:18 +03:00
Nazım Can Altınova
da27b61352 Implement parsing/serialization for border-image-* longhands 2016-11-06 20:08:16 +03:00
Corey Farwell
54e490a3c8 Add more event names to atom list; use more atom macros. 2016-11-06 11:03:14 -05:00
Ms2ger
88285b6534 Privatize the chrome_loader module. 2016-11-06 12:18:40 +01:00
Ms2ger
a888f075a1 Privatize the http_loader module. 2016-11-06 12:18:39 +01:00
Ms2ger
697275dea3 Privatize some net modules. 2016-11-06 12:18:37 +01:00
bors-servo
8c35f93343 Auto merge of #14077 - kivikakk:refactor-style-lengths, r=emilio
Refactor style lengths per #13584

<!-- Please describe your changes on the following line: -->
Refactor `components/style/values/{computed,specified}/mod.rs` into `…/length.rs` per #13584.

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

<!-- Either: -->
- [x] These changes do not require tests because the existing code should be covered by 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/14077)
<!-- Reviewable:end -->
2016-11-06 04:08:14 -06:00
Yuki Izumi
f33f5605ba
Refactor style lengths per #13584 2016-11-06 14:11:37 +11:00
bors-servo
bc9a8f58db Auto merge of #14066 - rjgoldsborough:remove-extra-clones-14062, r=frewsxcv
remove extra clones from dom event script

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

fixes #14062 by removing extra clone calls
---
<!-- 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 #14062  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because elements are already copies

<!-- 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/14066)
<!-- Reviewable:end -->
2016-11-05 21:55:33 -05:00
bors-servo
465619ca37 Auto merge of #14082 - dns2utf8:cleanup_14065, r=jdm
Remove unneeded #allow(unsafe_code)

I did #14065

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

<!-- 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/14082)
<!-- Reviewable:end -->
2016-11-05 19:51:19 -05:00
Michael Kohler
1985ad6d85 Remove CollectMemoryReports from compositor (fixes #13735) 2016-11-06 01:43:09 +01:00
Jake Goldsborough
c5f562aa07 remove extra clones from dom event script 2016-11-05 13:43:27 -07:00
Stefan Schindler
d2c23942a8 Remove unneeded #allow(unsafe_code) 2016-11-05 17:42:29 +01:00
Simon Sapin
1a18161006 rule tree: more descriptive field names 2016-11-05 17:29:56 +01:00
Simon Sapin
2dd2c9cedd Simplify rule_tree::StyleSourceGuardHandle 2016-11-05 17:29:55 +01:00
Simon Sapin
98bd99b74c rule tree: Remove unsound transmute()
RuleTreeDeclarationsIterator would yield &PropertyDeclaration
with the lifetime of the rule tree, but the reference would only
be valid as long as the iterator was holding the corresponding lock.

The lock would be released when the iterator’s `.next()` method
moves to the next rule tree node, or when  the iterator is dropped.

Also change apply_declaration to not require a `Clone` iterator
(since closures unfortunately don’t implement `Clone`).
Instead have it take a callable that returns a fresh iterator.
2016-11-05 17:29:54 +01:00
Emilio Cobos Álvarez
de4fe6e2b6 Concurrent rule tree, v1
This patch introduces infrastructure for the rule tree, and constructs it.

We don't use it yet, nor have good heuristics for GC'ing it, but this should not
happen anymore once we store the rule node reference in the node.

I haven't messed up with memory orders because I want to do a try run with it,
then mess with them.

Take down the ApplicableDeclarationsCache, use the rule tree for doing the cascade.
2016-11-05 17:29:52 +01:00
bors-servo
f7875dad1a Auto merge of #14060 - servo:gfx-azure, r=nox
Remove the direct azure dependencies from gfx, layout and layout_thread.

<!-- 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/14060)
<!-- Reviewable:end -->
2016-11-05 07:26:30 -05:00
bors-servo
2b4a7b0b7a Auto merge of #14053 - notriddle:flow_ref_unsafe, r=pcwalton
Make `FlowRef` a newtype

This creates a sharp distinction between `Arc<Flow>`s, which may be
owned by anyone, and `FlowRef`s, which may only be owned by the
traversal code. By checking the reference count, we ensure that a `Flow`
cannot be pointed to by `Arc`s and `FlowRef`s simultaneously.

This is not a complete fix for #6503, though it is a necessary start
(enforcing the no-aliasing rule of `FlowRef::deref_mut` will require far
more work).

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14014 (github issue number if applicable).
- [X] These changes do not require tests because the existing tests, plus the added assertions, should be sufficient

<!-- 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/14053)
<!-- Reviewable:end -->
2016-11-04 16:53:38 -05:00
Michael Howell
5f320bd2ca Make FlowRef a newtype
This creates a sharp distinction between `Arc<Flow>`s, which may be
owned by anyone, and `FlowRef`s, which may only be owned by the
traversal code. By checking the reference count, we ensure that a `Flow`
cannot be pointed to by `Arc`s and `FlowRef`s simultaneously.

This is not a complete fix for #6503, though it is a necessary start
(enforcing the no-aliasing rule of `FlowRef::deref_mut` will require far
more work).

Fixes #14014
2016-11-04 13:36:04 -07:00
bors-servo
cfef68f92d Auto merge of #14047 - mskrzypkows:getElementsByTagName, r=nox
fix getElementsByTagName()

<!-- Please describe your changes on the following line: -->
Improved implementation of getElementsByTagName() in Document, properly pass 3 cases of https://dom.spec.whatwg.org/#concept-getelementsbytagname

---
<!-- 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  #11596 (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/14047)
<!-- Reviewable:end -->
2016-11-04 12:41:22 -05:00
Maciej Skrzypkowski
af5d109695 fix getElementsByTagName() 2016-11-04 16:58:19 +01:00
bors-servo
7c6793fc28 Auto merge of #14054 - servo:unreachable_code, r=SimonSapin
Fix unreachable_code warning.

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

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [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/14054)
<!-- Reviewable:end -->
2016-11-04 08:44:48 -05:00
Simon Sapin
28b02695d9 Fix unreachable_code warning. 2016-11-04 14:17:31 +01:00
bors-servo
dae007fd16 Auto merge of #13612 - szeged:test-api-impl, r=jdm
WebBluetooth Test API and tests

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

This patch depends on the [devices mock device support PR](https://github.com/servo/devices/pull/17).
After it lands, the Cargo files can be updated.
1. Adjust to the changes in [devices mock device support PR](https://github.com/servo/devices/pull/17).
2. WebBluetooth Test API implementation. Based on : https://webbluetoothcg.github.io/web-bluetooth/tests.html
3. Wpt tests for the already landed WebBluetooth functions.

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

<!-- Reviewable:end -->
2016-11-04 07:44:42 -05:00
bors-servo
73c9847ef8 Auto merge of #14036 - frewsxcv:event, r=nox
A couple improvements to `EventTarget` event firing.

<!-- 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/14036)
<!-- Reviewable:end -->
2016-11-04 06:43:56 -05:00
zakorgyula
e15d54edfd WebBluetooth Test API 2016-11-04 12:36:23 +01:00
Ms2ger
81ee81cbb0 Remove the direct azure dependencies from gfx, layout and layout_thread.
This does not cover transitive dependencies through canvas_traits, though that
should not be too hard to solve either.
2016-11-04 12:14:42 +01:00
bors-servo
be58dc36e8 Auto merge of #13816 - servo:msg-crate, r=nox
Move some types out of msg.

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

<!-- Reviewable:end -->
2016-11-04 05:26:27 -05:00
Ms2ger
277c6d0154 Move ReferrerPolicy to net_traits. 2016-11-04 10:43:37 +01:00
bors-servo
651e40f33e Auto merge of #14057 - glennw:update-wr-keys, r=metajack
Update WR, add some key mappings, bind Ctrl-F12 to WR profiler.

<!-- 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/14057)
<!-- Reviewable:end -->
2016-11-04 03:11:32 -05:00
zakorgyula
4eec2c6ddc Apply the new device crate changes 2016-11-04 08:40:50 +01:00
bors-servo
2390503772 Auto merge of #14038 - upsuper:bug1294299, r=heycam
Add Element.style support for stylo

<!-- Please describe your changes on the following line: -->
This is the Servo side change of [bug 1294299](https://bugzilla.mozilla.org/show_bug.cgi?id=1294299) which has been reviewed by @heycam, @emilio, and @SimonSapin.

This should not be merged until the Gecko side change gets merged into mozilla-central.

r? @heycam

---
<!-- 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/14038)
<!-- Reviewable:end -->
2016-11-03 23:42:06 -05:00
Glenn Watson
2843f06933 Add runtime switch for webrender profiler (-Z wr-stats) which
can be toggled by pressing Ctrl-F12.
2016-11-04 12:49:28 +10:00
Glenn Watson
04cd35914a Update WR (resource cache changes, various optimizations). 2016-11-04 12:48:47 +10:00
bors-servo
7b80386047 Auto merge of #14048 - antrik:nosync-ipc_sender, r=mbrubeck
layout/context: Wrap `image_cache_thread` in a `Mutex<>` as well

`SharedLayoutContext.image_cache_thread` didn't get the `Mutex<>`
treatment along with all the other channels in there, because
`ipc-channel::Sender` is presently inherently `Sync`. I believe this to
be an implementation accident though, that should be rectified in the
future -- not something users should actually rely on...

Note that sharing senders (be it `mpsc` or `ipc-channel`) in is probably
not a good idea anyway: just cloning them -- and letting them handle the
sharing internally -- should be both simpler and cheaper. But right now
that's how things are handled here; so let's go with the flow...

<!-- 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/14048)
<!-- Reviewable:end -->
2016-11-03 21:37:17 -05:00
bors-servo
97e205c8ef Auto merge of #14046 - servo:ws-callback, r=jdm
Add a missing newline.

<!-- 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/14046)
<!-- Reviewable:end -->
2016-11-03 20:14:40 -05:00