servo/components/style
bors-servo e912400bc3 Auto merge of #15305 - dbaron:reset-more-for-font, r=Manishearth
Make additional properties be reset by the 'font' shorthand.

A number of properties are supposed to be reset to initial values by the
'font' shorthand.  This does so for all such properties that Servo
currently supports (conditional on when they're supported).

Fixes #15033.

It's not clear to me that the use of <code>None</code> is correct for resetting to initial values, but it seems to match what at least some other shorthands do (I think I was looking at the code for border), and it appears to fix the tests as expected.  I haven't probed into it more than that.

/cc @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 (I haven't quite gotten the servo build to work, but stylo build works)
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15033 (github issue number if applicable).

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

This has test coverage when running stylo.  In particular, it fixes a bunch of sets of mochitest failures in layout/style/test/test_value_storage.html, with the set for each value of the 'font' shorthand listed in property_database.js looking like:
```
 TEST-PASS | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font'
 TEST-PASS | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-style')
 TEST-PASS | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-variant')
 TEST-PASS | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-weight')
 TEST-PASS | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-size')
 TEST-PASS | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'line-height')
 TEST-PASS | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-family')
 TEST-PASS | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-stretch')
-TEST-UNEXPECTED-FAIL | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-size-adjust') - didn't expect "", but got it
+TEST-PASS | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-size-adjust')
 TEST-UNEXPECTED-FAIL | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-feature-settings') - didn't expect "", but got it
 TEST-UNEXPECTED-FAIL | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-language-override') - didn't expect "", but got it
-TEST-UNEXPECTED-FAIL | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-kerning') - didn't expect "", but got it
+TEST-PASS | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-kerning')
 TEST-UNEXPECTED-FAIL | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-synthesis') - didn't expect "", but got it
 TEST-UNEXPECTED-FAIL | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-variant-alternates') - didn't expect "", but got it
-TEST-UNEXPECTED-FAIL | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-variant-caps') - didn't expect "", but got it
+TEST-PASS | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-variant-caps')
 TEST-UNEXPECTED-FAIL | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-variant-east-asian') - didn't expect "", but got it
 TEST-UNEXPECTED-FAIL | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-variant-ligatures') - didn't expect "", but got it
 TEST-UNEXPECTED-FAIL | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-variant-numeric') - didn't expect "", but got it
-TEST-UNEXPECTED-FAIL | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-variant-position') - didn't expect "", but got it
+TEST-PASS | layout/style/test/test_value_storage.html | setting 'medium serif' on 'font' (for 'font-variant-position')
```

I'm not sure if separate Servo test coverage is needed.
<!-- 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/15305)
<!-- Reviewable:end -->
2017-02-02 16:43:26 -08:00
..
binding_tools Avoid write atoms files when not necessary 2016-12-28 17:49:34 +11:00
gecko Bug 1335863 - Inline common case parent access. r=emilio 2017-02-02 14:32:23 -08:00
gecko_bindings Update bindings. 2017-02-02 14:32:22 -08:00
gecko_string_cache style: Document gecko_string_cache. 2017-01-02 12:58:07 +01:00
properties Auto merge of #15305 - dbaron:reset-more-for-font, r=Manishearth 2017-02-02 16:43:26 -08:00
rule_tree style: Refactor the traversal so it's more easy to read and straight-forward. 2017-02-02 11:58:36 +01:00
servo Convert text-orientation to a Gecko-only property 2017-01-27 21:12:38 -08:00
values Ensure that gradients have at least 2 stops 2017-01-31 22:23:00 -08:00
animation.rs Convert animation-iteration-count longhand into vector_longhand 2017-01-08 17:19:09 +03:00
attr.rs script: Don't avoid all the mutation notification methods when the style attribute changes. 2017-01-30 19:24:42 +01:00
bezier.rs More docs in style. 2017-01-02 10:40:20 +01:00
bloom.rs style: Document the bloom filter. 2016-12-31 23:24:18 +01:00
build.rs Bindgenup. 2017-01-25 10:42:44 +01:00
build_gecko.rs Bug 1335863 - Inline Gecko_IsHTMLElementInHTMLDocument. r=emilio 2017-02-02 14:32:23 -08:00
cache.rs style: Document and remove dead code from cache.rs 2016-12-31 04:53:37 +01:00
Cargo.toml Update clap, clippy, deflate, flate2, open, unicode-segmentation, owning_ref, parking_lot, phf, quote, walkdir 2017-02-02 11:18:33 -08:00
cascade_info.rs style: Document cascade_info. 2016-12-31 23:24:19 +01:00
context.rs Bug 1331856 - Add style performance statistics to Servo. r=emilio 2017-01-19 15:05:19 -08:00
custom_properties.rs style: Simplify the cascade function in the custom_properties module. 2017-01-02 12:57:56 +01:00
data.rs style: Refactor the traversal so it's more easy to read and straight-forward. 2017-02-02 11:58:36 +01:00
dom.rs Bug 1317209 - Part 5: Support transition cascade level. r=emilio 2017-01-24 18:44:07 +08:00
element_state.rs Change order of element state bits 2017-01-06 10:04:49 +11:00
error_reporting.rs style: Document the error_reporting module. 2016-12-31 23:24:19 +01:00
font_face.rs style: Document the font_face module. 2017-01-02 12:57:57 +01:00
font_metrics.rs style: Document the font_metrics module. 2016-12-31 23:24:19 +01:00
keyframes.rs Assert if there is an important declaration while collecting animated properties in keyframes. 2017-02-01 07:33:37 +09:00
lib.rs changed quickersort with pdqsort 2017-01-27 18:42:22 +00:00
logical_geometry.rs Convert text-orientation to a Gecko-only property 2017-01-27 21:12:38 -08:00
matching.rs style: Refactor the traversal so it's more easy to read and straight-forward. 2017-02-02 11:58:36 +01:00
media_queries.rs Bug 1331213: Bootstrap a Gecko-side Device, and track it's dirtiness manually in the per-doc data. r=heycam 2017-01-17 14:05:23 +01:00
owning_handle.rs style: Document the owning_handle module. 2017-01-02 12:57:53 +01:00
parallel.rs style: Expose the traversal kind to the style system. 2017-01-24 08:41:29 +01:00
parser.rs CSSOM bits for @supports: CSSConditionRule and CSSSupportsRule, with conditionText attribute 2017-01-07 23:17:52 -08:00
README.md docs: Add style overview. 2016-05-04 00:34:03 +02:00
restyle_hints.rs style: Refactor the traversal so it's more easy to read and straight-forward. 2017-02-02 11:58:36 +01:00
scoped_tls.rs Bug 1331856 - Add style performance statistics to Servo. r=emilio 2017-01-19 15:05:19 -08:00
selector_parser.rs style: Document the restyle hints code, and make it operate on TElement. 2017-01-02 12:57:52 +01:00
sequential.rs style: Expose the traversal kind to the style system. 2017-01-24 08:41:29 +01:00
sink.rs style: document the sink module. 2017-01-02 12:57:49 +01:00
str.rs Auto merge of #14796 - jlevesy:jl-match-to-if-let, r=Wafflespeanut 2016-12-31 21:28:41 -08:00
stylesheets.rs Support @supports (fixes #14786) 2017-01-07 23:17:50 -08:00
stylist.rs Allow empty keyframe and keyframes with non-animatable properties. 2017-02-01 07:06:38 +09:00
supports.rs Fix too many parens in @supports serialization. 2017-01-09 19:35:00 +01:00
thread_state.rs Tidy up rust code with regard to new rule (no = in beginning of line) 2017-01-06 20:57:16 +01:00
timer.rs style: Document the timer module. 2016-12-31 12:17:04 +01:00
traversal.rs style: Refactor the traversal so it's more easy to read and straight-forward. 2017-02-02 11:58:36 +01:00
viewport.rs Change LengthOrPercentageOrAuto to make use of NoCalcLength 2017-01-29 02:30:34 +05:30

servo-style

Style system for Servo, using rust-cssparser for parsing.