LibDevTools: Compare StyleSheetIdentifiers using operator==

We were ignoring the dom_element_unique_id field, which meant if we had
more than one inline style sheet on a page, we would not distinguish
between them. This had the effect of halting the style sheet loading
process in the dev tools, with none appearing.
This commit is contained in:
Sam Atkins 2025-09-26 17:26:01 +01:00 committed by Andreas Kling
parent 9ebdb58604
commit 3d141ac6a1
Notes: github-actions[bot] 2025-09-26 20:32:01 +00:00

View file

@ -69,9 +69,7 @@ void StyleSheetsActor::set_style_sheets(Vector<Web::CSS::StyleSheetIdentifier> s
void StyleSheetsActor::style_sheet_source_received(Web::CSS::StyleSheetIdentifier const& style_sheet, String source)
{
auto index = m_style_sheets.find_first_index_if([&](auto const& candidate) {
return candidate.type == style_sheet.type && candidate.url == style_sheet.url;
});
auto index = m_style_sheets.find_first_index(style_sheet);
if (!index.has_value())
return;