Commit graph

1527 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
79d64f2a38
style: Use progress consistently instead of time. 2016-10-12 10:35:29 +02:00
Emilio Cobos Álvarez
b79689361b
Introduce AnimationValue to manage animated properties in Gecko. 2016-10-12 10:31:22 +02:00
bors-servo
cd2f950de3 Auto merge of #13056 - KiChjang:transition-event, r=mbrubeck
Implement transition event and infrastructure

Fixes #10245.

<!-- 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/13056)
<!-- Reviewable:end -->
2016-10-12 02:08:37 -05:00
bors-servo
f12b770079 Auto merge of #13692 - heycam:into-box, r=Manishearth
Fix return types of Owned<T>::into_box Gecko sugar types.

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

We're not transmuting to the right type.  The only current use of `into_box` is to drop a `PerDocumentStyleData`, so we weren't accidentally doing anything terribly bad, just not calling the `Drop` impl for that type.

---
<!-- 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
- [ ] 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/13692)
<!-- Reviewable:end -->
2016-10-12 01:15:12 -05:00
bors-servo
7e192ce644 Auto merge of #13700 - Manishearth:bindgen-testing, r=emilio
Run bindings tests with whole crate

We currently run bindgen's autogenerated `#[test]` blocks directly on the structs files.

That is, after generating them, we run `rustc --test` on them. This works fine for now, but
if you want to refer to types defined outside of these files (e.g. in https://bugzilla.mozilla.org/show_bug.cgi?id=1309165),
the tests are broken.

This puts a `cargo test -p style` in `./mach test-stylo`. I disabled doctests because they were failing (unable to find the `ns!()` and `atom!()` macros), and I couldn't figure out why -- will investigate in a later bug.

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/13700)
<!-- Reviewable:end -->
2016-10-12 00:14:35 -05:00
Manish Goregaokar
3d7c997a4f Run bindings tests with whole crate 2016-10-12 10:00:31 +05:30
Keith Yeung
668163ec5c Emit TransitionEnd events in the layout thread and process it in the script thread 2016-10-11 19:36:06 -07:00
bors-servo
4ca7ce6329 Auto merge of #13695 - heycam:layer-init, r=Manishearth
avoid initializing image layers after repeat/origin values have already been written

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

@bors-servo r=manishearth

given in https://bugzilla.mozilla.org/show_bug.cgi?id=1309081

---
<!-- 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/13695)
<!-- Reviewable:end -->
2016-10-11 18:37:39 -05:00
Bobby Holley
63ac0d2540 Use AtomicRefCell for RawServoStyleSet.
MozReview-Commit-ID: 27JeRluDAo3
2016-10-11 09:31:52 -07:00
Cameron McCormack
1a24469398 Avoid initializing image layers after repeat/origin values have been written.
MozReview-Commit-ID: LeetT5lKKKB
2016-10-11 17:49:45 +08:00
Cameron McCormack
c50402946b Regenerate bindings.
MozReview-Commit-ID: 6Msio9WdI5M
2016-10-11 17:49:36 +08:00
Cameron McCormack
ef357f5372 Fix return types of Owned<T>::into_box Gecko sugar types. 2016-10-11 17:20:45 +08:00
Bobby Holley
226e4cf7c0 Deny warnings in stylo crates.
MozReview-Commit-ID: 3lQNUzX77PX
2016-10-11 14:05:31 +05:30
Bobby Holley
a5aed43cd8 Fix bindings.rs warnings.
MozReview-Commit-ID: G03MWTQMkWt
2016-10-11 14:05:29 +05:30
Bobby Holley
4398512c12 Fix property warnings.
MozReview-Commit-ID: BmT9CmbDZlX
2016-10-11 14:05:28 +05:30
Bobby Holley
8abc1bd275 Eliminate warning about unsafe references to extern static variables.
MozReview-Commit-ID: 7UJNBaEWnH7
2016-10-11 14:05:27 +05:30
bors-servo
abcc4aeaf2 Auto merge of #13656 - bholley:existing_style, r=emilio
Refactor style logic to avoid direct access to the node data during the cascade

The new restyle architecture doesn't store these things in consistent places, so we need a more abstract API.

<!-- 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/13656)
<!-- Reviewable:end -->
2016-10-10 23:22:05 -05:00
Bobby Holley
bfbbef6ecd Remove borrow_data and mutate_data from TNode.
The new restyle architecture doesn't store these things in consistent
places, so we need a more abstract API.
2016-10-10 20:36:31 -07:00
bors-servo
ef7423bf00 Auto merge of #13676 - servo:no-siphasher, r=pcwalton
Remove usage of deprecated `SipHasher`.

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

<s>Hashing in `SimpleHashCache` is not randomized anymore. Does this matter?</s>

r? @pcwalton

---
<!-- 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/13676)
<!-- Reviewable:end -->
2016-10-10 11:39:06 -05:00
Simon Sapin
33c7915032 Remove usage of deprecated SipHasher. 2016-10-10 18:35:07 +02:00
Simon Sapin
0eed39c198 Move CSSStyleDeclaration.SetPropertyPriority logic to style 2016-10-10 16:48:23 +02:00
Simon Sapin
c740a76410 Move (some) CSSStyleDeclaration.SetProperty logic to style 2016-10-10 16:42:23 +02:00
Manish Goregaokar
4271167f82 Implement column-count for stylo 2016-10-10 20:07:16 +05:30
Simon Sapin
bd4a4c38c8 Move CSSStyleDeclaration.RemoveProperty logic to style 2016-10-10 16:20:44 +02:00
Simon Sapin
fc6a536b3a Move CSSStyleDeclaration.GetPropertyPriority logic to style 2016-10-10 16:01:23 +02:00
Simon Sapin
bd37f4e694 Move CSSStyleDeclaration.GetPropertyValue logic to style 2016-10-10 15:54:24 +02:00
bors-servo
960d884fd4 Auto merge of #13673 - Manishearth:no-prefs-geckolib, r=emilio
Don't pref-gate properties in geckolib mode

This led to me wasting a lot of time trying to figure out why my column-count implementation in gecko didn't work.

We might eventually want to hook into the Gecko prefs, but the mechanism would probably be different

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/13673)
<!-- Reviewable:end -->
2016-10-10 08:11:32 -05:00
Manish Goregaokar
3772b4881b Don't pref-gate properties in geckolib mode 2016-10-10 17:55:59 +05:30
bors-servo
37340d0c26 Auto merge of #13672 - Manishearth:regen, r=emilio
Regen bindings

From https://hg.mozilla.org/mozilla-central/rev/d72cf6ecebaf

<!-- 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/13672)
<!-- Reviewable:end -->
2016-10-10 06:21:18 -05:00
Manish Goregaokar
9812034b96 Regen bindings 2016-10-10 15:34:49 +05:30
Emilio Cobos Álvarez
72d7732937
stylo: Fix GeckoNode::is_element implementation.
Because I'm stupid.
2016-10-10 10:58:08 +02:00
bors-servo
b110eb394e Auto merge of #13663 - shubheksha:fix/13657, r=Manishearth
changed set_value() to set() in gecko.mako.rs

<!-- Please describe your changes on the following line: -->
Changed `set_value()` to `set()` in gecko.mako.rs

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because just the `set_value()` call was changed to `set()`

<!-- 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/13663)
<!-- Reviewable:end -->
2016-10-09 21:15:28 -05:00
bors-servo
39d3fce1af Auto merge of #13649 - servo:rustup, r=larsbergstrom
Update to Rust 1.14.0-nightly (19ac57926 2016-10-08)

<!-- 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/13649)
<!-- Reviewable:end -->
2016-10-09 20:12:38 -05:00
bors-servo
fe6fac4ee2 Auto merge of #13604 - canaltinova:gradient, r=Manishearth
Implement all gradients

<!-- Please describe your changes on the following line: -->
Implementation of all gradients.
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] These changes fix #13549 (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/13604)
<!-- Reviewable:end -->
2016-10-09 16:40:18 -05:00
Bobby Holley
ddbc016f51 Refactor cascade to limit and clarify the mutability of the old style.
The current semantics make it very difficult to figure out when the existing
style is mutated and what code depends on it. This is problematic for the
new incremental restyle architecture, where the cascade logic no longer has
direct access to |data|.
2016-10-09 14:19:16 -07:00
Aniruddh Agarwal
67630c3418 Implement -moz-text-align-last property 2016-10-09 16:25:42 -04:00
Nazım Can Altınova
7300d9ab54 Implement all gradients in stylo 2016-10-09 22:53:17 +03:00
Nazım Can Altınova
26c98edd68 Implement parsing of all gradients 2016-10-09 22:53:15 +03:00
Shubheksha Jalan
3ece937184 changed set_value() to set() in gecko.mako.rs 2016-10-10 01:15:46 +05:30
Ravi Shankar
664db1b5fa Regen bindings to include the constants 2016-10-10 00:10:58 +05:30
Ravi Shankar
2b4d301fbf Import NS_FONT_* constants for font-* glue 2016-10-09 22:40:51 +05:30
Anthony Ramine
1854566683 Update to Rust 1.14.0-nightly (19ac57926 2016-10-08)
A cargo bump and a switch to serde_derive is needed to do this rustup.
2016-10-09 18:53:47 +02:00
bors-servo
804317c885 Auto merge of #13553 - birtles:animvalues, r=Manishearth
Support creating StyleAnimationValue objects from Servo

These are the servo-side changes for [bug 1302949](https://bugzilla.mozilla.org/show_bug.cgi?id=1302949#c59). @Manishearth has already reviewed them there.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1302949](https://bugzilla.mozilla.org/show_bug.cgi?id=1302949#c59)
- [X] These changes do not require tests because there are existing tests for this in mozilla-central

<!-- 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/13553)
<!-- Reviewable:end -->
2016-10-09 08:53:28 -05:00
Brian Birtles
45e0b90d63 Bug 1302949 - Add a method to restyle with an added declaration; r=Manishearth
MozReview-Commit-ID: AbX0PCjjEM6
2016-10-09 18:33:52 +05:30
Brian Birtles
1c78e1cb20 Bug 1302949 - Add a method to serialize a declaration block as a single value; r=Manishearth
MozReview-Commit-ID: 59CCT0P4CBm
2016-10-09 18:33:51 +05:30
Brian Birtles
61bcc3a2ef Bug 1302949 - Add a method to Gecko bindings for comparing declaration blocks; r=Manishearth
MozReview-Commit-ID: EtX2oLXdGNm
2016-10-09 18:33:50 +05:30
Brian Birtles
56e70aec51 Bug 1302949 - Add a method to parse a property-value pair into a declaration block; r=Manishearth
The property may be a shorthand property in which case the declaration block
will contain the expanded longhand properties and values.

MozReview-Commit-ID: KxqlYgbIZqL
2016-10-09 18:33:49 +05:30
bors-servo
5955f4a754 Auto merge of #13651 - Manishearth:au-togeckostyle, r=emilio
impl GeckoStyleCoordConvertible for Au

r? @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/13651)
<!-- Reviewable:end -->
2016-10-09 07:52:51 -05:00
bors-servo
a0e404c79e Auto merge of #13620 - Manishearth:type-assert, r=emilio
Test that Servo_* functions have the right signatures

Fixes #12992

Needs #13617

Not very happy with this solution (and perhaps it should be done in pure Rust, though that can be split out as another easy bug).

But it works. The bindings changes are from running a regen on [bug 1308234](https://bugzilla.mozilla.org/show_bug.cgi?id=1308234)

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/13620)
<!-- Reviewable:end -->
2016-10-09 03:56:34 -05:00
Manish Goregaokar
af57a98694 Test that Servo_* functions have the right signatures
Fixes #12992
2016-10-09 09:59:00 +05:30