summaryrefslogtreecommitdiff
path: root/Libraries/LibHTML/Dump.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-10-08 15:34:19 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-10-08 15:35:05 +0200
commit31ac19543a11a5121b6367e3acf4d8ed2c53358f (patch)
tree21e413520cc1a7b3204bf4ff9a7cfc723a4aa126 /Libraries/LibHTML/Dump.cpp
parent19dbfc315365eeeb110c6b11cc387a018b03f7c2 (diff)
downloadserenity-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.cpp6
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());
}
}