Commit graph

1301 commits

Author SHA1 Message Date
Cameron McCormack
3c20d12824 Make some lists in regen.py neater. 2016-10-17 10:05:50 +08:00
Cameron McCormack
47b4648e62 Make list-style-image use UrlOrNone.
MozReview-Commit-ID: 6E82Tq5nrfC
2016-10-16 11:32:57 +08:00
Cameron McCormack
75e97c02dc Factor out a UrlOrNone value type and make -moz-binding use it.
MozReview-Commit-ID: L57QEf40e2m
2016-10-16 11:32:57 +08:00
Cameron McCormack
333afb61f6 Use UrlExtraData::make_from to avoid manually cloning the ParserContextExtraData contents.
MozReview-Commit-ID: FoCmI6swp5Q
2016-10-16 11:31:57 +08:00
bors-servo
0f4209644c Auto merge of #13759 - bholley:owning_handle, r=SimonSapin
Implement OwningHandle in style

I've also PR-ed this against upstream [1], but I don't want to block on that in case it takes a while to be merged / published.

[1] https://github.com/Kimundi/owning-ref-rs/pull/15

<!-- 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/13759)
<!-- Reviewable:end -->
2016-10-14 10:42:10 -05:00
bors-servo
b94f074b52 Auto merge of #13751 - joewalker:font-kerning, r=Manishearth
Add support for 'font-kerning' in geckolib

Add support for 'font-kerning' in geckolib
These changes fix #13667

    $ ./mach build -d
    It looks like you passed an unrecognized argument into mach.

    $ ./mach test-tidy
    It looks like you are trying to run an unknown mach command: test-tidy

I'm clearly doing something wrong here, but I'm not sure what

- [x] These changes do not require tests because "[For stylo it's okay to not have tests since many of the reftests fail due to unrelated reasons](https://github.com/servo/servo/pull/13570#issuecomment-251354116)" :)

<!-- 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/13751)
<!-- Reviewable:end -->
2016-10-14 08:56:54 -05:00
Joe Walker
a2d3ea57dd Add support for 'font-kerning' in geckolib 2016-10-14 14:50:05 +01:00
Bobby Holley
d73047584c Implement OwningHandle in style.
I've also PR-ed this against upstream [1], but I don't want to block on that
in case it takes a while to be merged / published.

[1] https://github.com/Kimundi/owning-ref-rs/pull/15
2016-10-13 16:53:37 -06:00
Manish Goregaokar
bb736f41d3 implement |quotes| property
MozReview-Commit-ID: 5eAaJGXSkob
2016-10-14 00:44:08 +05:30
Manish Goregaokar
17a46418dc Add bindings for constructing nsStyleQuoteValues
MozReview-Commit-ID: EjuzgZKMpPp
2016-10-14 00:44:07 +05:30
Manish Goregaokar
2bde9462b1 Add safer bindings for RefPtr 2016-10-14 00:44:06 +05:30
bors-servo
2bb7cc227b Auto merge of #13722 - Manishearth:test-stylo, r=jdm
Remove test-geckolib, run test-stylo on travis

test-geckolib used to do things, but almost all of geckolib has been moved to the style crate, with the tests in `tests/unit/stylo`. (`./mach test-stylo) Now test-geckolib does nothing.

Fixes #13721
r? @jdm

<!-- 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/13722)
<!-- Reviewable:end -->
2016-10-13 01:50:37 -05:00
bors-servo
d9bb663421 Auto merge of #13723 - Manishearth:resync, r=bholley
Regen bindings, warning fix

The warning only happens on the latest stable (which we use in the incubator), so there's an `#[allow()]` there for now as well.

Don't signal r+ to bors, I'll do that myself when the incubator side lands.

r? @bholley

<!-- 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/13723)
<!-- Reviewable:end -->
2016-10-12 22:01:20 -05:00
bors-servo
46fe1c320d Auto merge of #13724 - NamsooCho:font_variant_position, r=Manishearth
font_variant_position

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

added 'font-variant-position' property to font.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
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #13669 (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/13724)
<!-- Reviewable:end -->
2016-10-12 20:05:11 -05:00
bors-servo
8c392dd3e7 Auto merge of #13698 - awesomeaniruddh:implement-moz-text-align-last, r=Wafflespeanut
Implement -moz-text-align-last property

<!-- 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
- [X] These changes fix #13638  (github issue number if applicable).

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

The test page in Firefox:
<img width="1392" alt="firefox" src="https://cloud.githubusercontent.com/assets/5279150/19276203/a43b486c-8fa3-11e6-9b56-a4cf45217e52.png">

The test page in Stylo:
<img width="1392" alt="servo" src="https://cloud.githubusercontent.com/assets/5279150/19276213/a9c7704e-8fa3-11e6-858b-d6e5f67d3a6c.png">

<!-- 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/13698)
<!-- Reviewable:end -->
2016-10-12 15:15:20 -05:00
bors-servo
626d093245 Auto merge of #13640 - servo:CSSStyleDeclaration_in_style, r=mbrubeck
Move some of the CSSStyleDeclaration logic to the style crate

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

… so that Stylo can re-use it.

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1295865

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

<!-- 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/13640)
<!-- Reviewable:end -->
2016-10-12 14:21:34 -05:00
NamSoo Cho
b942e6c21c font_variant_position 2016-10-13 01:55:05 +09:00
Manish Goregaokar
647f8e9c5d Remove test functions from nsstring_vendor
These tests are run on the real nsstring anyway. They cause linux builds to
fail since the test functions are defined twice.
2016-10-12 21:51:06 +05:30
bors-servo
f80623fd93 Auto merge of #13694 - emilio:style-animation, r=Manishearth,birtles
Introduce AnimationValue to manage animated properties in Gecko.

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

Doesn't compile because there are a bunch of `from_computed_value` missing, and I need to take care of fixing that before, but open for discussion.

@birtles: is an interface like this something like what you were looking for?

cc @Manishearth

<!-- 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/13694)
<!-- Reviewable:end -->
2016-10-12 10:34:10 -05:00
Manish Goregaokar
b74d07bc78 Use unsafe block on access of column count constant 2016-10-12 20:50:56 +05:30
Manish Goregaokar
cac0def060 Resync bindings 2016-10-12 20:49:16 +05:30
Manish Goregaokar
bfee89a690 Fix unused crate error 2016-10-12 19:14:27 +05:30
Manish Goregaokar
0c793d7277 Implement text-overflow using nsstring bindings
MozReview-Commit-ID: BxoFVigIOyV
2016-10-12 18:12:53 +05:30
Manish Goregaokar
398a6343b3 Vendor m-c's nsstring in-tree
It is called nsstring_vendor since libgkrust already depends on nsstring, and
we can't have two crates with the same name in-tree. We can't directly depend
on the in-tree one since this will stop independent `./mach build-geckolib` builds from working.

MozReview-Commit-ID: CR4tHgzXWFZ
2016-10-12 18:12:52 +05:30
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