mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-21 01:31:55 +00:00
LibWeb: Make CSS::ComputedProperties GC-allocated
This commit is contained in:
parent
c1cad8fa0e
commit
74469a0c1f
Notes:
github-actions[bot]
2024-12-22 09:13:42 +00:00
Author: https://github.com/awesomekling
Commit: 74469a0c1f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2995
138 changed files with 337 additions and 339 deletions
|
@ -397,13 +397,13 @@ void dump_tree(StringBuilder& builder, Layout::Node const& layout_node, bool sho
|
|||
}
|
||||
}
|
||||
|
||||
if (show_cascaded_properties && layout_node.dom_node() && layout_node.dom_node()->is_element() && verify_cast<DOM::Element>(layout_node.dom_node())->computed_css_values().has_value()) {
|
||||
if (show_cascaded_properties && layout_node.dom_node() && layout_node.dom_node()->is_element() && verify_cast<DOM::Element>(layout_node.dom_node())->computed_properties()) {
|
||||
struct NameAndValue {
|
||||
FlyString name;
|
||||
String value;
|
||||
};
|
||||
Vector<NameAndValue> properties;
|
||||
verify_cast<DOM::Element>(*layout_node.dom_node()).computed_css_values()->for_each_property([&](auto property_id, auto& value) {
|
||||
verify_cast<DOM::Element>(*layout_node.dom_node()).computed_properties()->for_each_property([&](auto property_id, auto& value) {
|
||||
properties.append({ CSS::string_from_property_id(property_id), value.to_string(CSS::CSSStyleValue::SerializationMode::Normal) });
|
||||
});
|
||||
quick_sort(properties, [](auto& a, auto& b) { return a.name < b.name; });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue