Fix is_simple_advance check. Fixes #4614.

This commit is contained in:
dhneio 2015-02-23 04:36:18 -08:00 committed by Josh Matthews
parent 225d7d2ece
commit 069f53a25e
4 changed files with 10 additions and 2 deletions

View file

@ -156,8 +156,11 @@ fn is_simple_glyph_id(id: GlyphId) -> bool {
} }
fn is_simple_advance(advance: Au) -> bool { fn is_simple_advance(advance: Au) -> bool {
let unsigned_au = advance.to_u32().unwrap(); match advance.to_u32() {
(unsigned_au & (GLYPH_ADVANCE_MASK >> GLYPH_ADVANCE_SHIFT as uint)) == unsigned_au Some(unsigned_au) =>
(unsigned_au & (GLYPH_ADVANCE_MASK >> GLYPH_ADVANCE_SHIFT as uint)) == unsigned_au,
None => false
}
} }
type DetailedGlyphCount = u16; type DetailedGlyphCount = u16;

View file

@ -102,6 +102,7 @@ flaky_cpu == append_style_a.html append_style_b.html
== floated_generated_content_a.html floated_generated_content_b.html == floated_generated_content_a.html floated_generated_content_b.html
== floated_list_item_a.html floated_list_item_ref.html == floated_list_item_a.html floated_list_item_ref.html
== floated_table_with_margin_a.html floated_table_with_margin_ref.html == floated_table_with_margin_a.html floated_table_with_margin_ref.html
== font_advance.html font_advance_ref.html
== font_size.html font_size_ref.html == font_size.html font_size_ref.html
== font_style.html font_style_ref.html == font_style.html font_style_ref.html
== height_compute_reset.html height_compute.html == height_compute_reset.html height_compute.html

View file

@ -0,0 +1,2 @@
<!-- Not a reftest, but a crashtest for #4614 -->
a<div id="test" style="font-size: 100000px">Hello world</div>

View file

@ -0,0 +1,2 @@
<!-- Not a reftest, but a crashtest for #4614 -->
a<div id="test" style="font-size: 100000px">Hello world</div>