mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
LibWeb: Don't add shorthand CSS properties to cascaded values
We already expand shorthands in the cascade, so there's no need to preserve them in the output. This patch reorganizes the CSS::PropertyID enum values so that we can easily iterate over all shorthand or longhand properties.
This commit is contained in:
parent
e07cf6f41b
commit
ca45d34055
2 changed files with 33 additions and 9 deletions
|
@ -629,7 +629,7 @@ void StyleResolver::compute_defaulted_values(StyleProperties& style, DOM::Elemen
|
|||
// Walk the list of all known CSS properties and:
|
||||
// - Add them to `style` if they are missing.
|
||||
// - Resolve `inherit` and `initial` as needed.
|
||||
for (auto i = to_underlying(CSS::first_property_id); i <= to_underlying(CSS::last_property_id); ++i) {
|
||||
for (auto i = to_underlying(CSS::first_longhand_property_id); i <= to_underlying(CSS::last_longhand_property_id); ++i) {
|
||||
auto property_id = (CSS::PropertyID)i;
|
||||
auto it = style.m_property_values.find(property_id);
|
||||
if (it == style.m_property_values.end()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue