Auto merge of #17972 - heycam:ignore-existing, r=bholley

style: Allow styles to be computed ignoring existing element data.

From https://bugzilla.mozilla.org/show_bug.cgi?id=1384824.

<!-- 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/17972)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-08-04 21:33:59 -05:00 committed by GitHub
commit ac37f81c1f
8 changed files with 64 additions and 31 deletions

View file

@ -5,7 +5,7 @@
use cssparser::SourceLocation;
use gfx::font_cache_thread::FontCacheThread;
use ipc_channel::ipc;
use style::computed_values::font_family::FamilyName;
use style::computed_values::font_family::{FamilyName, FamilyNameSyntax};
use style::font_face::{FontFaceRuleData, Source};
#[test]
@ -15,11 +15,11 @@ fn test_local_web_font() {
let font_cache_thread = FontCacheThread::new(inp_chan, None);
let family_name = FamilyName {
name: From::from("test family"),
quoted: true,
syntax: FamilyNameSyntax::Quoted,
};
let variant_name = FamilyName {
name: From::from("test font face"),
quoted: true,
syntax: FamilyNameSyntax::Quoted,
};
let font_face_rule = FontFaceRuleData {
family: Some(family_name.clone()),

View file

@ -14,7 +14,7 @@ use servo_url::ServoUrl;
use std::borrow::ToOwned;
use std::sync::Mutex;
use std::sync::atomic::AtomicBool;
use style::computed_values::font_family::FamilyName;
use style::computed_values::font_family::{FamilyName, FamilyNameSyntax};
use style::context::QuirksMode;
use style::error_reporting::{ParseErrorReporter, ContextualParseError};
use style::media_queries::MediaList;
@ -254,7 +254,7 @@ fn test_parse_stylesheet() {
CssRule::FontFeatureValues(Arc::new(stylesheet.shared_lock.wrap(FontFeatureValuesRule {
family_names: vec![FamilyName {
name: Atom::from("test"),
quoted: false,
syntax: FamilyNameSyntax::Identifiers(vec![Atom::from("test")]),
}],
swash: vec![
FFVDeclaration {