Stylo: Bug 1350175 - Support getting line / column number of CSS rules

Fix font_cache_thread test
This commit is contained in:
Fernando Jiménez Moreno 2017-05-12 13:46:00 +02:00
parent 58253f545b
commit bc156cfe1c
12 changed files with 151 additions and 56 deletions

View file

@ -10,6 +10,7 @@ path = "lib.rs"
doctest = false
[dependencies]
cssparser = "0.13.3"
gfx = {path = "../../../components/gfx"}
ipc-channel = "0.7"
style = {path = "../../../components/style"}

View file

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::SourceLocation;
use gfx::font_cache_thread::FontCacheThread;
use ipc_channel::ipc;
use style::computed_values::font_family::FamilyName;
@ -23,6 +24,10 @@ fn test_local_web_font() {
let font_face_rule = FontFaceRuleData {
family: Some(family_name.clone()),
sources: Some(vec![Source::Local(variant_name)]),
source_location: SourceLocation {
line: 0,
column: 0,
},
};
font_cache_thread.add_web_font(

View file

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
extern crate cssparser;
extern crate gfx;
extern crate ipc_channel;
extern crate style;