mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
LibWeb: Make Element attribute getters take a StringView
These functions are deferring to NamedNodeMap::get_attribute which already takes a StringView. This changes also leads to finding some places which were passing though a const char* instead of an entry from Attribute names. Fix that where applicable, and switch to has_attribute in some of those places instead of deprecated_attribute where equivalent. Ideally this should be taking a 'FlyString const&', but to continue porting away from DeprecatedString, just leave a FIXME for now.
This commit is contained in:
committed by
Andreas Kling
parent
dbf8ff64fb
commit
47514e07b4
@@ -25,7 +25,7 @@ public:
|
||||
virtual DeprecatedString aria_level() const override
|
||||
{
|
||||
// TODO: aria-level = the number in the element's tag name
|
||||
return get_attribute("aria-level");
|
||||
return get_attribute("aria-level"sv);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user