mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibWeb: Use CSSKeywordValue for CSS-wide keywords
We previously had 4 single-instance StyleValues for these keywords. CSS-Typed-OM expects them keywords to be exposed as CSSKeywordValue, so it's simpler to treat them the same. The single-instance behaviour is kept by having StyleValue::create() use a cached instance for each of these.
This commit is contained in:
parent
6a74b01644
commit
f518811f73
Notes:
github-actions[bot]
2024-08-15 12:59:29 +00:00
Author: https://github.com/AtkinsSJ
Commit: f518811f73
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1076
12 changed files with 38 additions and 203 deletions
|
@ -61,7 +61,6 @@
|
|||
#include <LibWeb/CSS/StyleValues/TransformationStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/TransitionStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/UnresolvedStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/UnsetStyleValue.h>
|
||||
#include <LibWeb/DOM/Attr.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
|
@ -1869,7 +1868,7 @@ NonnullRefPtr<CSSStyleValue const> StyleComputer::get_inherit_value(JS::Realm& i
|
|||
|
||||
void StyleComputer::compute_defaulted_property_value(StyleProperties& style, DOM::Element const* element, CSS::PropertyID property_id, Optional<CSS::Selector::PseudoElement::Type> pseudo_element) const
|
||||
{
|
||||
// FIXME: If we don't know the correct initial value for a property, we fall back to InitialStyleValue.
|
||||
// FIXME: If we don't know the correct initial value for a property, we fall back to `initial`.
|
||||
|
||||
auto& value_slot = style.m_property_values[to_underlying(property_id)];
|
||||
if (!value_slot) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue