浏览代码

LibWeb: Don't assign style to LayoutWidgets

The only CSS property we care about for widgets is "display:none".
For everything else, we ignore it and use a native look & feel. :^)
Andreas Kling 5 年之前
父节点
当前提交
83cda9e79e
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      Libraries/LibWeb/DOM/Element.cpp

+ 5 - 0
Libraries/LibWeb/DOM/Element.cpp

@@ -196,6 +196,11 @@ void Element::recompute_style()
         tree_builder.build(*this);
         return;
     }
+
+    // Don't bother with style on widgets. NATIVE LOOK & FEEL BABY!
+    if (layout_node()->is_widget())
+        return;
+
     auto diff = compute_style_difference(layout_node()->style(), *style, document());
     if (diff == StyleDifference::None)
         return;