mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
Remove/don’t call no-op compute_font_hash method for stylo.
This removes a potentially-costly Arc::mut call.
This commit is contained in:
parent
4ad844f7bd
commit
e0c63efe01
3 changed files with 9 additions and 11 deletions
|
@ -2044,12 +2044,14 @@ pub fn apply_declarations<'a, F, I>(viewport_size: Size2D<Au>,
|
|||
style.set_root_font_size(s);
|
||||
}
|
||||
|
||||
if seen.contains(LonghandId::FontStyle) ||
|
||||
seen.contains(LonghandId::FontWeight) ||
|
||||
seen.contains(LonghandId::FontStretch) ||
|
||||
seen.contains(LonghandId::FontFamily) {
|
||||
style.mutate_font().compute_font_hash();
|
||||
}
|
||||
% if product == "servo":
|
||||
if seen.contains(LonghandId::FontStyle) ||
|
||||
seen.contains(LonghandId::FontWeight) ||
|
||||
seen.contains(LonghandId::FontStretch) ||
|
||||
seen.contains(LonghandId::FontFamily) {
|
||||
style.mutate_font().compute_font_hash();
|
||||
}
|
||||
% endif
|
||||
|
||||
style
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue