mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
LibHTML: Use an enum for CSS property ID's
Instead of using string everywhere, have the CSS parser produce enum values, since they are a lot nicer to work with. In the future we should generate most of this code based on a list of supported CSS properties.
This commit is contained in:
parent
19dbfc3153
commit
31ac19543a
Notes:
sideshowbarker
2024-07-19 11:45:17 +09:00
Author: https://github.com/awesomekling
Commit: 31ac19543a
18 changed files with 207 additions and 94 deletions
|
@ -59,7 +59,7 @@ RefPtr<LayoutNode> HTMLImageElement::create_layout_node(const StyleResolver& res
|
|||
{
|
||||
auto style = resolver.resolve_style(*this, parent_style);
|
||||
|
||||
auto display_property = style->property("display");
|
||||
auto display_property = style->property(CSS::PropertyID::Display);
|
||||
String display = display_property.has_value() ? display_property.release_value()->to_string() : "inline";
|
||||
|
||||
if (display == "none")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue