Commit graph

1345 commits

Author SHA1 Message Date
Patrick Walton
8b138e5e75 style: Remove modify_style_for_anonymous_table_object, now that the
cascade takes care of it.
2016-10-26 14:14:08 -07:00
Patrick Walton
fb2d1e1020 layout: Add a new cascading mode that inherits all properties, even
non-inheritable ones.

This works like the `modify_style_for_*` functions and will allow us to
easily migrate from them to real cascading.
2016-10-26 14:14:01 -07:00
Patrick Walton
93e41ba4aa style: Add some new Servo-specific pseudo-classes for anonymous flows.
This allows us to remove `modify_style_for_anonymous_table_object`.
2016-10-26 14:04:16 -07:00
bors-servo
c8b6ece97b Auto merge of #13913 - bholley:styling_mode, r=emilio
incremental restyle: Introduce StylingMode and deprecate explicit dirtiness

This is another chunk of work to move us toward the new incremental restyle architecture.

Eventually, we'll make a fine-grained decision at each node about what style to recompute based on the RestyleHint on the node data (along with other things). For now, we use the existence of RestyleData as a coarse-grained approximation of this.

<!-- 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/13913)
<!-- Reviewable:end -->
2016-10-26 06:36:06 -05:00
bors-servo
3c16dde1f2 Auto merge of #13902 - Wafflespeanut:keyword, r=emilio
Prefer auto-generation for some keyword props

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

r? @Manishearth or @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/13902)
<!-- Reviewable:end -->
2016-10-26 02:27:13 -05:00
Ravi Shankar
e7cbd10ece Auto-generate 'image-rendering' using 'single_keyword' 2016-10-26 12:56:11 +05:30
Bobby Holley
05c1f1e016 Introduce StylingMode and deprecate explicit dirtiness.
MozReview-Commit-ID: 5tF075EJKBa
2016-10-26 00:23:18 -07:00
Ravi Shankar
12f429e23b Keyword argument for custom constant mapping 2016-10-26 11:56:54 +05:30
Ravi Shankar
1c34162220 Make use of existing codegen methods for font-* 2016-10-26 11:56:53 +05:30
Ravi Shankar
af8899edf0 Merge keyword and predefined type longhands 2016-10-26 11:56:52 +05:30
Xidorn Quan
3303a978b9 Use nsACString to pass string params for bindings 2016-10-25 18:22:45 +11:00
Xidorn Quan
eeada5ac51 Add as_str_unchecked() to nsACString 2016-10-25 10:21:01 +11:00
Xidorn Quan
109bf2a755 Move RawGecko{Node,Element,Document} to bindings 2016-10-24 20:43:42 +11:00
bors-servo
672545430f Auto merge of #13889 - upsuper:regen-output, r=emilio
Use str for bindgen output directly

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/13889)
<!-- Reviewable:end -->
2016-10-23 18:10:03 -05:00
bors-servo
bfd966f819 Auto merge of #13860 - canaltinova:text-emphasis-style, r=Manishearth,emilio
Implement parsing/serialization and gecko glue for text-emphasis-style

<!-- Please describe your changes on the following line: -->
Implementation of parsing/serialization and gecko glue for text-emphasis-style.

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

<!-- 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/13860)
<!-- Reviewable:end -->
2016-10-22 19:47:07 -05:00
Nazım Can Altınova
6dc2c36310 Change KeywordValue to enum 2016-10-23 03:08:20 +03:00
Nazım Can Altınova
769129f5c2 Add gecko glue for text-emphasis-style 2016-10-22 19:37:48 +03:00
bors-servo
97feac079c Auto merge of #13890 - Wafflespeanut:glue, r=Manishearth
Auto-generate some glue

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

r? @Manishearth or @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/13890)
<!-- Reviewable:end -->
2016-10-22 03:58:36 -05:00
Ravi Shankar
b446f0e28a Auto-generate color glue 2016-10-22 14:27:01 +05:30
Ravi Shankar
caa745cb81 Minor codegen refactor for auto-generating some predefined types 2016-10-22 14:20:06 +05:30
Xidorn Quan
b7fffb3829 Use str for bindgen output directly. 2016-10-22 13:59:20 +11:00
Bobby Holley
adf0fe9b9a Rearrange some data structures in preparation for the new incremental restyle algorithm.
MozReview-Commit-ID: 8iOALQylOuK
2016-10-21 13:00:01 -07:00
Nazım Can Altınova
6102159a4b Implement parsing/serialization for text-emphasis-style 2016-10-21 21:25:17 +03:00
Bobby Holley
b493565cc1 Stop ticking animations on non-dirty nodes during traversal. 2016-10-20 19:25:04 -07:00
bors-servo
2e9aaa45dc Auto merge of #13841 - bholley:has_changed, r=emilio
Simplify TNode a bit, removing has_changed from style

A couple of changes here:
* Remove the option to unset with the dirty bit settes.
* Add an explicit API for setting text node style.
* Hoist has_changed handling into the restyle damage setter and text node style setter.
* Make set_style take a non-Option.

<!-- 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/13841)
<!-- Reviewable:end -->
2016-10-20 12:40:58 -05:00
Bobby Holley
cc96b292c2 Simplify TNode a bit.
A couple of changes here:
* Remove the option to unset with the dirty bit setters.
* Add an explicit API for setting text node style.
* Hoist has_changed handling into the restyle damage setter and text node style setter.
* Make set_style take a non-Option.
2016-10-20 09:47:54 -07:00
bors-servo
4e5ad268b1 Auto merge of #13839 - servo:locked-style, r=mbrubeck
Add RwLock in more Arc’d things in stylesheets.

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

CSSOM needs hold potentially multiple references (through `Arc`) to these objects, and then mutate them.

CC @upsuper
r? @mbrubeck

---
<!-- 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/13839)
<!-- Reviewable:end -->
2016-10-20 11:29:27 -05:00
bors-servo
ee713bc7d9 Auto merge of #13795 - shinglyu:stylo-filter, r=Manishearth
Implement CSS filter for Stylo

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

This patch is part of https://bugzilla.mozilla.org/show_bug.cgi?id=1310117

---
<!-- 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: -->
- [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/13795)
<!-- Reviewable:end -->
2016-10-20 09:40:35 -05:00
Cameron McCormack
44a02c9da4 Regenerate bindings. 2016-10-20 17:52:41 +08:00
bors-servo
6c28d4446a Auto merge of #13834 - upsuper:unprefix-text-align-last, r=emilio
Unprefix text-align-last for geckolib

<!-- Please describe your changes on the following line: -->
[`text-align-last` has been unprefixed](https://bugzilla.mozilla.org/show_bug.cgi?id=1039541) since Firefox 49.

---
<!-- 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/13834)
<!-- Reviewable:end -->
2016-10-19 13:46:13 -05:00
Simon Sapin
742681a623 Add RwLock in more Arc’d things in stylesheets. 2016-10-19 19:55:05 +02:00
bors-servo
31891b2377 Auto merge of #13833 - heycam:bindings-update-2, r=Manishearth
Update bindings.rs

<!-- Please describe your changes on the following line: -->
I forgot to copy this file over in #13812. :(

---
<!-- 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/13833)
<!-- Reviewable:end -->
2016-10-19 10:00:14 -05:00
bors-servo
9e3cf3189b Auto merge of #13804 - canaltinova:gradient-parsing, r=Manishearth
Fix radial gradient's <size>/<ending-shape> parsing

<!-- Please describe your changes on the following line: -->
Parsing now handles sizes and shapes in various order.
I had to delete `EndingShape`'s parse implementation and mix it with `Position` in `parse_radial`. It became a bit complicated to read but I couldn't make it simpler.
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 #13664 (github issue number if applicable).

<!-- 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/13804)
<!-- Reviewable:end -->
2016-10-19 09:10:15 -05:00
Xidorn Quan
ba70fcaa18 Unprefix text-align-last for geckolib. 2016-10-19 22:13:03 +11:00
Nazım Can Altınova
89850e6efa Fix radial gradient's <size>/<ending-shape> parsing 2016-10-19 13:15:28 +03:00
Cameron McCormack
bfb50f4b90 Update bindings.rs 2016-10-19 17:53:09 +08:00
Shing Lyu
ff7bb691d7 Implement CSS filter for Stylo 2016-10-19 12:24:17 +05:30
Cameron McCormack
605c2e0100 Regenerate bindings. 2016-10-19 12:19:41 +08:00
Xidorn Quan
0b5c6fb701 Remove the extra level of GeckoDeclarationBlock. 2016-10-18 16:48:50 +11:00
Manish Goregaokar
f967647226 Declare nullable strong borrowed ref type for RawServoDeclarationBlock. 2016-10-18 16:48:27 +11:00
Xidorn Quan
edeeafe5a7 Rename ServoDeclarationBlock to RawServoDeclarationBlock. 2016-10-18 15:48:36 +11:00
Xidorn Quan
3ade2b6de3 Use mutable reference for Gecko_GetNextStyleChild. 2016-10-18 15:40:23 +11:00
bors-servo
d80bf2ada7 Auto merge of #13793 - heycam:cleanup-2, r=Manishearth
Make use statements in gecko.mako.rs neater.

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

Similarly to #13792 I find the grouped `use` statements in gecko.mako.rs hard to deal with.  Splitting these out to one per line should help avoid rebasing problems (which I sometimes get), is easier to read, and easier to keep sorted.  r? @emilio

---
<!-- 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/13793)
<!-- Reviewable:end -->
2016-10-16 22:46:56 -05:00
Cameron McCormack
c9eae16ece Make use statements in gecko.mako.rs neater. 2016-10-17 11:24:00 +08:00
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