LibWeb: Don't verify_cast where input and output types are the same

This commit is contained in:
Tim Ledbetter 2024-08-08 14:19:14 +01:00 committed by Andreas Kling
commit 85863bb0ef
Notes: github-actions[bot] 2024-08-08 15:51:59 +00:00
2 changed files with 3 additions and 2 deletions

View file

@ -74,9 +74,10 @@ WebIDL::ExceptionOr<void> ShadowRoot::set_inner_html(StringView value)
// 2. Let context be this's host.
auto context = this->host();
VERIFY(context);
// 3. Let fragment be the result of invoking the fragment parsing algorithm steps with context and compliantString. FIXME: Use compliantString instead of markup.
auto fragment = TRY(verify_cast<Element>(*context).parse_fragment(value));
auto fragment = TRY(context->parse_fragment(value));
// 4. Replace all with fragment within this.
this->replace_all(fragment);