AK+Everywhere: Add Vector::contains(predicate) and use it

No functional changes.
This commit is contained in:
Jelle Raaijmakers
2026-01-06 14:43:55 +01:00
committed by Sam Atkins
parent d84a0d411c
commit ae20ecf857
Notes: github-actions[bot] 2026-01-08 15:28:34 +00:00
13 changed files with 40 additions and 71 deletions

View File

@@ -5130,7 +5130,7 @@ String HTMLParser::serialize_html_fragment(DOM::Node const& node, SerializableSh
// - serializableShadowRoots is true and shadow's serializable is true; or
// - shadowRoots contains shadow,
if ((serializable_shadow_roots == SerializableShadowRoots::Yes && shadow->serializable())
|| shadow_roots.find_first_index_if([&](auto& entry) { return entry == shadow; }).has_value()) {
|| shadow_roots.contains([&](auto& entry) { return entry == shadow; })) {
// then:
// 1. Append "<template shadowrootmode="".
builder.append("<template shadowrootmode=\""sv);