mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Bug 1374233 - Part 3: Use NonNegativeAu as computed values for font-size related properties.
For font-size and font-size-adjust. MozReview-Commit-ID: 5rrfVSzB7WF
This commit is contained in:
parent
191c2a282b
commit
234d2c1b32
13 changed files with 87 additions and 57 deletions
|
@ -116,7 +116,7 @@ impl FontContext {
|
|||
|
||||
let layout_font_group_cache_key = LayoutFontGroupCacheKey {
|
||||
pointer: style.clone(),
|
||||
size: style.font_size,
|
||||
size: style.font_size.0,
|
||||
};
|
||||
if let Some(ref cached_font_group) = self.layout_font_group_cache.get(
|
||||
&layout_font_group_cache_key) {
|
||||
|
@ -146,7 +146,7 @@ impl FontContext {
|
|||
Some(ref cached_font_ref) => {
|
||||
let cached_font = (*cached_font_ref).borrow();
|
||||
if cached_font.descriptor == desc &&
|
||||
cached_font.requested_pt_size == style.font_size &&
|
||||
cached_font.requested_pt_size == style.font_size.0 &&
|
||||
cached_font.variant == style.font_variant_caps {
|
||||
fonts.push((*cached_font_ref).clone());
|
||||
cache_hit = true;
|
||||
|
@ -164,7 +164,7 @@ impl FontContext {
|
|||
Some(template_info) => {
|
||||
let layout_font = self.create_layout_font(template_info.font_template,
|
||||
desc.clone(),
|
||||
style.font_size,
|
||||
style.font_size.0,
|
||||
style.font_variant_caps,
|
||||
template_info.font_key
|
||||
.expect("No font key present!"));
|
||||
|
@ -198,7 +198,7 @@ impl FontContext {
|
|||
for cached_font_entry in &self.fallback_font_cache {
|
||||
let cached_font = cached_font_entry.font.borrow();
|
||||
if cached_font.descriptor == desc &&
|
||||
cached_font.requested_pt_size == style.font_size &&
|
||||
cached_font.requested_pt_size == style.font_size.0 &&
|
||||
cached_font.variant == style.font_variant_caps {
|
||||
fonts.push(cached_font_entry.font.clone());
|
||||
cache_hit = true;
|
||||
|
@ -210,7 +210,7 @@ impl FontContext {
|
|||
let template_info = self.font_cache_thread.last_resort_font_template(desc.clone());
|
||||
let layout_font = self.create_layout_font(template_info.font_template,
|
||||
desc.clone(),
|
||||
style.font_size,
|
||||
style.font_size.0,
|
||||
style.font_variant_caps,
|
||||
template_info.font_key.expect("No font key present!"));
|
||||
match layout_font {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue