Auto merge of #15356 - servo:font-face-descriptors, r=Manishearth

Add support for more @font-face descriptors

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

Part of https://bugzilla.mozilla.org/show_bug.cgi?id=1290237. I’ll add conversions to `nsCSSValue` separately because that requires new C++ functions in the stylo repository.

r? @bholley

---
<!-- 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/15356)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-02-03 05:09:30 -08:00 committed by GitHub
commit 48f3cc8325
10 changed files with 370 additions and 162 deletions

View file

@ -4,7 +4,7 @@
use gfx::font_cache_thread::FontCacheThread;
use ipc_channel::ipc;
use style::computed_values::font_family::FontFamily;
use style::computed_values::font_family::{FontFamily, FamilyName};
use style::font_face::{FontFaceRule, Source};
#[test]
@ -12,8 +12,8 @@ fn test_local_web_font() {
let (inp_chan, _) = ipc::channel().unwrap();
let (out_chan, out_receiver) = ipc::channel().unwrap();
let font_cache_thread = FontCacheThread::new(inp_chan, None);
let family_name = FontFamily::FamilyName(From::from("test family"));
let variant_name = FontFamily::FamilyName(From::from("test font face"));
let family_name = FamilyName(From::from("test family"));
let variant_name = FamilyName(From::from("test font face"));
let font_face_rule = FontFaceRule {
family: family_name.clone(),
sources: vec![Source::Local(variant_name)],