LibWeb/CSS: Add operator== to StyleSheetIdentifier

Only the rule count isn't part of identifying the style sheet.
This commit is contained in:
Sam Atkins 2025-09-26 17:24:18 +01:00 committed by Andreas Kling
parent f17317b7fc
commit 9ebdb58604

View File

@ -26,6 +26,11 @@ struct StyleSheetIdentifier {
Optional<UniqueNodeID> dom_element_unique_id {};
Optional<String> url {};
size_t rule_count { 0 };
bool operator==(StyleSheetIdentifier const& other) const
{
return type == other.type && dom_element_unique_id == other.dom_element_unique_id && url == other.url;
}
};
StringView style_sheet_identifier_type_to_string(StyleSheetIdentifier::Type);