mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
LibWeb: Don't verify_cast
where input and output types are the same
This commit is contained in:
parent
deff8df2c7
commit
85863bb0ef
Notes:
github-actions[bot]
2024-08-08 15:51:59 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/85863bb0efc Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1010 Reviewed-by: https://github.com/awesomekling
2 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -229,7 +229,7 @@ void TreeBuilder::create_pseudo_element_if_needed(DOM::Element& element, CSS::Se
|
|||
auto text_node = document.heap().allocate_without_realm<Layout::TextNode>(document, *text);
|
||||
text_node->set_generated_for(generated_for, element);
|
||||
|
||||
push_parent(verify_cast<NodeWithStyle>(*pseudo_element_node));
|
||||
push_parent(*pseudo_element_node);
|
||||
insert_node_into_inline_or_block_ancestor(*text_node, text_node->display(), AppendOrPrepend::Append);
|
||||
pop_parent();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue