Browse Source

LibWeb: Support getting the grid-template-areas from resolved style

Without this, we crash when opening the DOM inspector.
Andreas Kling 2 năm trước cách đây
mục cha
commit
75d603c31b

+ 2 - 0
Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp

@@ -509,6 +509,8 @@ RefPtr<StyleValue const> ResolvedCSSStyleDeclaration::style_value_for_property(L
         return GridTrackSizeListStyleValue::create(layout_node.computed_values().grid_template_columns());
         return GridTrackSizeListStyleValue::create(layout_node.computed_values().grid_template_columns());
     case CSS::PropertyID::GridTemplateRows:
     case CSS::PropertyID::GridTemplateRows:
         return GridTrackSizeListStyleValue::create(layout_node.computed_values().grid_template_rows());
         return GridTrackSizeListStyleValue::create(layout_node.computed_values().grid_template_rows());
+    case CSS::PropertyID::GridTemplateAreas:
+        return GridTemplateAreaStyleValue::create(layout_node.computed_values().grid_template_areas());
     case CSS::PropertyID::Height:
     case CSS::PropertyID::Height:
         return style_value_for_size(layout_node.computed_values().height());
         return style_value_for_size(layout_node.computed_values().height());
     case CSS::PropertyID::ImageRendering:
     case CSS::PropertyID::ImageRendering: