Explorar o código

LibHTML: Use the correct inherited color for LayoutListItemMarker

Andreas Kling %!s(int64=5) %!d(string=hai) anos
pai
achega
6cbf8a3426
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      Libraries/LibHTML/Layout/LayoutListItemMarker.cpp

+ 2 - 1
Libraries/LibHTML/Layout/LayoutListItemMarker.cpp

@@ -14,5 +14,6 @@ void LayoutListItemMarker::render(RenderingContext& context)
 {
 {
     Rect bullet_rect { 0, 0, 4, 4 };
     Rect bullet_rect { 0, 0, 4, 4 };
     bullet_rect.center_within(rect());
     bullet_rect.center_within(rect());
-    context.painter().fill_rect(bullet_rect, style().color_or_fallback(CSS::PropertyID::Color, document(), Color::Black));
+    // FIXME: It would be nicer to not have to go via the parent here to get our inherited style.
+    context.painter().fill_rect(bullet_rect, parent()->style().color_or_fallback(CSS::PropertyID::Color, document(), Color::Black));
 }
 }