diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-10-08 15:34:19 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-10-08 15:35:05 +0200 |
commit | 31ac19543a11a5121b6367e3acf4d8ed2c53358f (patch) | |
tree | 21e413520cc1a7b3204bf4ff9a7cfc723a4aa126 /Libraries/LibHTML/Dump.cpp | |
parent | 19dbfc315365eeeb110c6b11cc387a018b03f7c2 (diff) | |
download | serenity-31ac19543a11a5121b6367e3acf4d8ed2c53358f.zip |
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.
Diffstat (limited to 'Libraries/LibHTML/Dump.cpp')
-rw-r--r-- | Libraries/LibHTML/Dump.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Libraries/LibHTML/Dump.cpp b/Libraries/LibHTML/Dump.cpp index 62619de074..82458f44b0 100644 --- a/Libraries/LibHTML/Dump.cpp +++ b/Libraries/LibHTML/Dump.cpp @@ -114,10 +114,10 @@ void dump_tree(const LayoutNode& layout_node) } } - layout_node.style().for_each_property([&](auto& key, auto& value) { + layout_node.style().for_each_property([&](auto property_id, auto& value) { for (int i = 0; i < indent; ++i) dbgprintf(" "); - dbgprintf(" (%s: %s)\n", key.characters(), value.to_string().characters()); + dbgprintf(" (CSS::PropertyID(%u): %s)\n", (unsigned)property_id, value.to_string().characters()); }); ++indent; @@ -170,7 +170,7 @@ void dump_rule(const StyleRule& rule) } dbgprintf(" Declarations:\n"); for (auto& property : rule.declaration().properties()) { - dbgprintf(" '%s': '%s'\n", property.name.characters(), property.value->to_string().characters()); + dbgprintf(" CSS::PropertyID(%u): '%s'\n", (unsigned)property.property_id, property.value->to_string().characters()); } } |