gecko-dev/servo/components/style
L. David Baron b6632cb157 servo: Merge #15305 - Make additional properties be reset by the 'font' shorthand (from dbaron:reset-more-for-font); r=Manishearth
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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: e912400bc3d963ecd16bde60e18f00e89be61c9a

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 0c721959a2388e737b32c5d3e651f9333dac4399
2017-02-02 16:43:26 -08:00
..
binding_tools servo: Merge #14753 - Avoid write atoms files when not necessary (from upsuper:atom-gen-update); r=Wafflespeanut 2016-12-27 23:05:43 -08:00
gecko servo: Merge #15353 - stylo: Optimize some FFI calls (from bholley:inline_more_ffi); r=emilio 2017-02-02 14:32:54 -08:00
gecko_bindings servo: Merge #15353 - stylo: Optimize some FFI calls (from bholley:inline_more_ffi); r=emilio 2017-02-02 14:32:54 -08:00
gecko_string_cache servo: Merge #14819 - Document most of the remaining parts of the style system, make docs-by-default for the whole style system (from emilio:no-missing-docs); r=Manishearth 2017-01-02 04:10:56 -08:00
properties servo: Merge #15305 - Make additional properties be reset by the 'font' shorthand (from dbaron:reset-more-for-font); r=Manishearth 2017-02-02 16:43:26 -08:00
rule_tree servo: Merge #15317 - style: Avoid selector-matching when only the style attribute is changed (from emilio:style-attr-restyle); r=bholley 2017-02-02 03:00:22 -08:00
servo servo: Merge #15268 - Make text-orientation:sideways-right an alias for sideways in Gecko (from mbrubeck:sideways); r=upsuper 2017-01-28 17:24:47 -08:00
values servo: Merge #15323 - Ensure that gradients have at least 2 stops (from Manishearth:gradient-stop); r=heycam 2017-02-01 11:17:13 -08:00
animation.rs servo: Merge #14913 - Refactor box longhands (from canaltinova:box-longhands); r=Manishearth 2017-01-08 06:24:02 -08:00
attr.rs servo: Merge #15288 - Refactor more stuff in preparation for special handling for restyling using the style attribute (from emilio:style-attr-restyle); r=SimonSapin 2017-01-30 14:54:26 -08:00
bezier.rs servo: Merge #14821 - More docs in style (from servo:docs-in-style); r=emilio 2017-01-02 02:08:01 -08:00
bloom.rs servo: Merge #14802 - Document more style modules (from emilio:no-missing-docs); r=Wafflespeanut 2016-12-31 15:34:51 -08:00
build_gecko.rs servo: Merge #15353 - stylo: Optimize some FFI calls (from bholley:inline_more_ffi); r=emilio 2017-02-02 14:32:54 -08:00
build.rs servo: Merge #15216 - Bindgenup (from emilio:bindgenup_); r=heycam 2017-01-25 22:41:24 -08:00
cache.rs servo: Merge #14801 - style: Document and force documentation in a big chunk of the style crate (from emilio:no-missing-docs); r=mbrubeck,Manishearth,Wafflespeanut 2016-12-31 03:19:02 -08:00
Cargo.toml servo: Merge #15355 - Update clap, clippy, deflate, flate2, open, unicode-segmentation, owning_ref, parking_lot, phf, quote, walkdir (from mbrubeck:always-be-updating); r=jdm 2017-02-02 11:44:01 -08:00
cascade_info.rs servo: Merge #14802 - Document more style modules (from emilio:no-missing-docs); r=Wafflespeanut 2016-12-31 15:34:51 -08:00
context.rs servo: Merge #15119 - Add style performance statistics to Servo (from bholley:traversal_stats); r=emilio 2017-01-19 15:27:34 -08:00
custom_properties.rs servo: Merge #14819 - Document most of the remaining parts of the style system, make docs-by-default for the whole style system (from emilio:no-missing-docs); r=Manishearth 2017-01-02 04:10:56 -08:00
data.rs servo: Merge #15317 - style: Avoid selector-matching when only the style attribute is changed (from emilio:style-attr-restyle); r=bholley 2017-02-02 03:00:22 -08:00
dom.rs servo: Merge #15175 - Interpolate servo animation values and add them to the cascade (from BorisChiou:animation/interpolate_and_cascade); r=heycam 2017-01-25 23:36:33 -08:00
element_state.rs servo: Merge #14872 - stylo: Map more Gecko state bits to Servo state bits (from upsuper:bug1328806); r=bholley 2017-01-06 00:09:32 -08:00
error_reporting.rs servo: Merge #14802 - Document more style modules (from emilio:no-missing-docs); r=Wafflespeanut 2016-12-31 15:34:51 -08:00
font_face.rs servo: Merge #14819 - Document most of the remaining parts of the style system, make docs-by-default for the whole style system (from emilio:no-missing-docs); r=Manishearth 2017-01-02 04:10:56 -08:00
font_metrics.rs servo: Merge #14802 - Document more style modules (from emilio:no-missing-docs); r=Wafflespeanut 2016-12-31 15:34:51 -08:00
keyframes.rs servo: Merge #15299 - Create KeyframeAnimation for empty keyframe rules (from hiikezoe:empty-keyframe); r=emilio,pcwalton 2017-01-31 14:42:06 -08:00
lib.rs servo: Merge #15269 - Substituing quickersort with pdqsort (from Maaarcocr:master); r=emilio 2017-01-27 15:11:42 -08:00
logical_geometry.rs servo: Merge #15268 - Make text-orientation:sideways-right an alias for sideways in Gecko (from mbrubeck:sideways); r=upsuper 2017-01-28 17:24:47 -08:00
matching.rs servo: Merge #15317 - style: Avoid selector-matching when only the style attribute is changed (from emilio:style-attr-restyle); r=bholley 2017-02-02 03:00:22 -08:00
media_queries.rs servo: Merge #15077 - Media query parsing and evaluation in stylo using nsMediaFeatures (from emilio:stylo-medialist); r=heycam,Manishearth,upsuper 2017-01-18 05:39:57 -08:00
owning_handle.rs servo: Merge #14819 - Document most of the remaining parts of the style system, make docs-by-default for the whole style system (from emilio:no-missing-docs); r=Manishearth 2017-01-02 04:10:56 -08:00
parallel.rs servo: Merge #15160 - style: Expose the traversal kind to the style system (from emilio:expose-traversal-kind); r=bholley 2017-01-24 17:02:41 -08:00
parser.rs servo: Merge #14789 - Support @supports (from Manishearth:supports); r=SimonSapin 2017-01-09 10:54:38 -08:00
README.md servo: Merge #10934 - style: Add infrastructure to support lazy pseudo-elements (from emilio:other-gecko-pseudos); r=bholley,mbrubeck 2016-05-04 03:42:23 -07:00
restyle_hints.rs servo: Merge #15317 - style: Avoid selector-matching when only the style attribute is changed (from emilio:style-attr-restyle); r=bholley 2017-02-02 03:00:22 -08:00
scoped_tls.rs servo: Merge #15119 - Add style performance statistics to Servo (from bholley:traversal_stats); r=emilio 2017-01-19 15:27:34 -08:00
selector_parser.rs servo: Merge #14819 - Document most of the remaining parts of the style system, make docs-by-default for the whole style system (from emilio:no-missing-docs); r=Manishearth 2017-01-02 04:10:56 -08:00
sequential.rs servo: Merge #15160 - style: Expose the traversal kind to the style system (from emilio:expose-traversal-kind); r=bholley 2017-01-24 17:02:41 -08:00
sink.rs servo: Merge #14819 - Document most of the remaining parts of the style system, make docs-by-default for the whole style system (from emilio:no-missing-docs); r=Manishearth 2017-01-02 04:10:56 -08:00
str.rs servo: Merge #14796 - replace match by if let statements if possible (from jlevesy:jl-match-to-if-let); r=Wafflespeanut 2016-12-31 21:28:41 -08:00
stylesheets.rs servo: Merge #14789 - Support @supports (from Manishearth:supports); r=SimonSapin 2017-01-09 10:54:38 -08:00
stylist.rs servo: Merge #15299 - Create KeyframeAnimation for empty keyframe rules (from hiikezoe:empty-keyframe); r=emilio,pcwalton 2017-01-31 14:42:06 -08:00
supports.rs servo: Merge #14789 - Support @supports (from Manishearth:supports); r=SimonSapin 2017-01-09 10:54:38 -08:00
thread_state.rs servo: Merge #14896 - Tidy assignments (from g1smo:tidy-assignments); r=jdm 2017-01-07 09:40:46 -08:00
timer.rs servo: Merge #14801 - style: Document and force documentation in a big chunk of the style crate (from emilio:no-missing-docs); r=mbrubeck,Manishearth,Wafflespeanut 2016-12-31 03:19:02 -08:00
traversal.rs servo: Merge #15317 - style: Avoid selector-matching when only the style attribute is changed (from emilio:style-attr-restyle); r=bholley 2017-02-02 03:00:22 -08:00
viewport.rs servo: Merge #15115 - Introduce the NoCalcLength (from Wafflespeanut:lop); r=emilio 2017-01-28 14:08:38 -08:00

servo-style

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