style: Remove font-size calc() hack to propagate keyword information.

It does not make any sense with min() / max() / clamp. So just forget the
keyword info when calc() is used. This also removes a bit of complex / hacky
code.

Differential Revision: https://phabricator.services.mozilla.com/D60663
This commit is contained in:
Emilio Cobos Álvarez 2020-01-22 23:46:24 +00:00
parent 83daa7484d
commit e7e6e62ed3
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
3 changed files with 8 additions and 51 deletions

View file

@ -956,9 +956,8 @@ impl FontMetricsProvider for GeckoFontMetricsProvider {
let (wm, font) = match base_size {
FontBaseSize::CurrentStyle => (style.writing_mode, style.get_font()),
// These are only used for font-size computation, and the first is
// really dubious...
FontBaseSize::InheritedStyleButStripEmUnits | FontBaseSize::InheritedStyle => {
// This is only used for font-size computation.
FontBaseSize::InheritedStyle => {
(*style.inherited_writing_mode(), style.get_parent_font())
},
};