Commit Graph

7 Commits

Author SHA1 Message Date
Callum Law
2203c0d6aa LibWeb: Always store display as DisplayStyleValue
Previously values set via Typed-OM would be stored as
`KeywordStyleValue` which fell back to `inline` within
`ComputedProperties::display()`.
2026-05-01 18:46:14 +02:00
Callum Law
c84c944f20 LibWeb: Implement reification of DisplayStyleValue
Values which can be represented by a single keyword are reified as
`CSSKeywordValue` and those which can't are reified as `CSSStyleValue`
as before
2026-05-01 18:46:14 +02:00
Callum Law
1e8cc6bead LibWeb: Treat display: math as display: inline math
And serialize `inline math` as `math`. This matches the behavior of
other browsers.
2026-05-01 18:46:14 +02:00
Andreas Kling
a4d949ff55 LibWeb: Inline trivial CSS::Display query methods
Move all the simple bool query methods (is_table_inside,
is_table_cell, is_none, is_block_outside, etc.) from Display.cpp into
Display.h as inline definitions. These are trivial one-liners called
in very hot painting and layout paths.

Keep only to_string() and from_short() out-of-line.
2026-02-21 15:53:22 +01:00
Callum Law
f0434655f9 LibWeb: Reduce recompilation from editing Enums.json
Reduces the recompilation caused by editing `Enums.json` from ~1528 to
~327
2026-02-19 11:27:06 +00:00
Andreas Kling
ce23efc5f6 LibWeb: Make CSS display serialization match other engines
The spec just says to follow "most backwards-compatible, then shortest"
when serializing these (and it does so in a very hand-wavy fashion).

By omitting some keywords when they are implied, we end up matching
other engines and pass a bunch of WPT tests.
2024-11-15 14:46:09 +01:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00