mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Fix is_simple_advance check. Fixes #4614.
This commit is contained in:
parent
225d7d2ece
commit
069f53a25e
4 changed files with 10 additions and 2 deletions
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
2
tests/ref/font_advance.html
Normal file
2
tests/ref/font_advance.html
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
<!-- Not a reftest, but a crashtest for #4614 -->
|
||||||
|
a<div id="test" style="font-size: 100000px">Hello world</div>
|
2
tests/ref/font_advance_ref.html
Normal file
2
tests/ref/font_advance_ref.html
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
<!-- Not a reftest, but a crashtest for #4614 -->
|
||||||
|
a<div id="test" style="font-size: 100000px">Hello world</div>
|
Loading…
Add table
Add a link
Reference in a new issue