mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibWeb: Improve relList feature detection support
`DOMTokenList.supports()` is now correct for all possible `rel` attribute values for `link`, `a`, `area` and `form` elements.
This commit is contained in:
parent
234f218803
commit
d946d94e2d
Notes:
github-actions[bot]
2024-12-06 18:10:45 +00:00
Author: https://github.com/tcl3
Commit: d946d94e2d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2810
Reviewed-by: https://github.com/trflynn89 ✅
4 changed files with 121 additions and 9 deletions
|
@ -62,3 +62,22 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
struct SupportedTokenKey {
|
||||
FlyString element_name;
|
||||
FlyString attribute_name;
|
||||
|
||||
constexpr bool operator==(SupportedTokenKey const& other) const = default;
|
||||
};
|
||||
|
||||
namespace AK {
|
||||
|
||||
template<>
|
||||
struct Traits<SupportedTokenKey> : public DefaultTraits<SupportedTokenKey> {
|
||||
static unsigned hash(SupportedTokenKey const& key)
|
||||
{
|
||||
return pair_int_hash(key.element_name.hash(), key.attribute_name.hash());
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue