mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 03:29:49 +00:00
LibWeb: Make CSSStyleDeclaration an abstract class
This patch moves the CSS property+value storage down to a new subclass of CSSStyleDeclaration called PropertyOwningCSSStyleDeclaration. The JavaScript wrapper for CSSStyleDeclaration now calls virtual functions on the C++ object. This is preparation for supporting computed style CSSStyleDeclaration objects which won't have internal property storage, but rather an internal element pointer. :^)
This commit is contained in:
parent
10679b6df2
commit
0bcab60463
Notes:
sideshowbarker
2024-07-18 04:06:07 +09:00
Author: https://github.com/awesomekling
Commit: 0bcab60463
9 changed files with 106 additions and 69 deletions
|
@ -499,7 +499,7 @@ void dump_style_rule(StringBuilder& builder, CSS::CSSStyleRule const& rule)
|
|||
dump_selector(builder, selector);
|
||||
}
|
||||
builder.append(" Declarations:\n");
|
||||
for (auto& property : rule.declaration().properties()) {
|
||||
for (auto& property : verify_cast<CSS::PropertyOwningCSSStyleDeclaration>(rule.declaration()).properties()) {
|
||||
builder.appendff(" {}: '{}'\n", CSS::string_from_property_id(property.property_id), property.value->to_string());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue