mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 10:27:36 +00:00
LibWeb: Port custom properties to FlyString
This commit is contained in:
parent
346825bd78
commit
ea2b733862
10 changed files with 31 additions and 32 deletions
|
@ -1918,7 +1918,7 @@ void Element::set_computed_css_values(RefPtr<CSS::StyleProperties> style)
|
|||
m_computed_css_values = move(style);
|
||||
}
|
||||
|
||||
void Element::set_custom_properties(Optional<CSS::Selector::PseudoElement> pseudo_element, HashMap<DeprecatedFlyString, CSS::StyleProperty> custom_properties)
|
||||
void Element::set_custom_properties(Optional<CSS::Selector::PseudoElement> pseudo_element, HashMap<FlyString, CSS::StyleProperty> custom_properties)
|
||||
{
|
||||
if (!pseudo_element.has_value()) {
|
||||
m_custom_properties = move(custom_properties);
|
||||
|
@ -1927,7 +1927,7 @@ void Element::set_custom_properties(Optional<CSS::Selector::PseudoElement> pseud
|
|||
m_pseudo_element_custom_properties[to_underlying(pseudo_element.value())] = move(custom_properties);
|
||||
}
|
||||
|
||||
HashMap<DeprecatedFlyString, CSS::StyleProperty> const& Element::custom_properties(Optional<CSS::Selector::PseudoElement> pseudo_element) const
|
||||
HashMap<FlyString, CSS::StyleProperty> const& Element::custom_properties(Optional<CSS::Selector::PseudoElement> pseudo_element) const
|
||||
{
|
||||
if (!pseudo_element.has_value())
|
||||
return m_custom_properties;
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedFlyString.h>
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <LibWeb/ARIA/ARIAMixin.h>
|
||||
#include <LibWeb/Bindings/ElementPrototype.h>
|
||||
|
@ -205,8 +204,8 @@ public:
|
|||
ShadowRoot const* shadow_root_internal() const { return m_shadow_root.ptr(); }
|
||||
void set_shadow_root(JS::GCPtr<ShadowRoot>);
|
||||
|
||||
void set_custom_properties(Optional<CSS::Selector::PseudoElement>, HashMap<DeprecatedFlyString, CSS::StyleProperty> custom_properties);
|
||||
[[nodiscard]] HashMap<DeprecatedFlyString, CSS::StyleProperty> const& custom_properties(Optional<CSS::Selector::PseudoElement>) const;
|
||||
void set_custom_properties(Optional<CSS::Selector::PseudoElement>, HashMap<FlyString, CSS::StyleProperty> custom_properties);
|
||||
[[nodiscard]] HashMap<FlyString, CSS::StyleProperty> const& custom_properties(Optional<CSS::Selector::PseudoElement>) const;
|
||||
|
||||
int queue_an_element_task(HTML::Task::Source, JS::SafeFunction<void()>);
|
||||
|
||||
|
@ -400,8 +399,8 @@ private:
|
|||
JS::GCPtr<ShadowRoot> m_shadow_root;
|
||||
|
||||
RefPtr<CSS::StyleProperties> m_computed_css_values;
|
||||
HashMap<DeprecatedFlyString, CSS::StyleProperty> m_custom_properties;
|
||||
Array<HashMap<DeprecatedFlyString, CSS::StyleProperty>, to_underlying(CSS::Selector::PseudoElement::PseudoElementCount)> m_pseudo_element_custom_properties;
|
||||
HashMap<FlyString, CSS::StyleProperty> m_custom_properties;
|
||||
Array<HashMap<FlyString, CSS::StyleProperty>, to_underlying(CSS::Selector::PseudoElement::PseudoElementCount)> m_pseudo_element_custom_properties;
|
||||
|
||||
Vector<FlyString> m_classes;
|
||||
Optional<Dir> m_dir;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue