mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
style: Make the Gecko font-size calc() code do what it means to do.
It makes no sense to pass a custom base size of zero in presence of rem, ex, or ch units. Bug: 1431031 Reviewed-by: Manishearth MozReview-Commit-ID: 7ZZwRzQKREX
This commit is contained in:
parent
aee0d694cc
commit
212b2f56c7
3 changed files with 61 additions and 29 deletions
|
@ -2505,9 +2505,12 @@ fn static_assert() {
|
|||
|
||||
/// Set font size, taking into account scriptminsize and scriptlevel
|
||||
/// Returns Some(size) if we have to recompute the script unconstrained size
|
||||
pub fn apply_font_size(&mut self, v: FontSize,
|
||||
parent: &Self,
|
||||
device: &Device) -> Option<NonNegativeLength> {
|
||||
pub fn apply_font_size(
|
||||
&mut self,
|
||||
v: FontSize,
|
||||
parent: &Self,
|
||||
device: &Device,
|
||||
) -> Option<NonNegativeLength> {
|
||||
let (adjusted_size, adjusted_unconstrained_size) =
|
||||
self.calculate_script_level_size(parent, device);
|
||||
// In this case, we have been unaffected by scriptminsize, ignore it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue