From 7ae2f8602e10a9eb47a1ed5690e06345f4ab4e68 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Thu, 16 Jul 2020 22:04:12 +0000 Subject: [PATCH] style: Defer to -moz-default-appearance when appearance is auto. Differential Revision: https://phabricator.services.mozilla.com/D83429 --- components/style/style_adjuster.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/style/style_adjuster.rs b/components/style/style_adjuster.rs index b33458a0f9b..8ab4aea3d21 100644 --- a/components/style/style_adjuster.rs +++ b/components/style/style_adjuster.rs @@ -766,7 +766,13 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { use crate::properties::longhands::appearance::computed_value::T as Appearance; use crate::properties::longhands::line_height::computed_value::T as LineHeight; - if self.style.get_box().clone_appearance() == Appearance::Menulist { + let box_ = self.style.get_box(); + let appearance = match box_.clone_appearance() { + Appearance::Auto => box_.clone__moz_default_appearance(), + a => a, + }; + + if appearance == Appearance::Menulist { if self.style.get_inherited_text().clone_line_height() == LineHeight::normal() { return; }