mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 20:42:21 +00:00
LibWeb: Convert DOM::Element::m_classes to the new AK::FlyString
This makes selector matching significantly faster by not forcing us to convert from FlyString to DeprecatedFlyString when matching class selectors. :^)
This commit is contained in:
parent
629b6462dc
commit
2042993997
Notes:
sideshowbarker
2024-07-16 23:11:53 +09:00
Author: https://github.com/awesomekling
Commit: 2042993997
Pull-request: https://github.com/SerenityOS/serenity/pull/17763
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/nico
4 changed files with 11 additions and 11 deletions
|
@ -101,8 +101,8 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool has_class(DeprecatedFlyString const&, CaseSensitivity = CaseSensitivity::CaseSensitive) const;
|
||||
Vector<DeprecatedFlyString> const& class_names() const { return m_classes; }
|
||||
bool has_class(FlyString const&, CaseSensitivity = CaseSensitivity::CaseSensitive) const;
|
||||
Vector<FlyString> const& class_names() const { return m_classes; }
|
||||
|
||||
virtual void apply_presentational_hints(CSS::StyleProperties&) const { }
|
||||
virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value);
|
||||
|
@ -284,7 +284,7 @@ private:
|
|||
RefPtr<CSS::StyleProperties> m_computed_css_values;
|
||||
HashMap<DeprecatedFlyString, CSS::StyleProperty> m_custom_properties;
|
||||
|
||||
Vector<DeprecatedFlyString> m_classes;
|
||||
Vector<FlyString> m_classes;
|
||||
|
||||
Array<JS::GCPtr<Layout::Node>, to_underlying(CSS::Selector::PseudoElement::PseudoElementCount)> m_pseudo_element_nodes;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue