Skip to content

Commit 9ebdb58

Browse files
AtkinsSJawesomekling
authored andcommitted
LibWeb/CSS: Add operator== to StyleSheetIdentifier
Only the rule count isn't part of identifying the style sheet.
1 parent f17317b commit 9ebdb58

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Libraries/LibWeb/CSS/StyleSheetIdentifier.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ struct StyleSheetIdentifier {
2626
Optional<UniqueNodeID> dom_element_unique_id {};
2727
Optional<String> url {};
2828
size_t rule_count { 0 };
29+
30+
bool operator==(StyleSheetIdentifier const& other) const
31+
{
32+
return type == other.type && dom_element_unique_id == other.dom_element_unique_id && url == other.url;
33+
}
2934
};
3035

3136
StringView style_sheet_identifier_type_to_string(StyleSheetIdentifier::Type);

0 commit comments

Comments
 (0)