mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-30 16:28:48 +00:00
LibWeb: Use static_cast<HTMLTemplateElement> right after an is<> check
The double verify_cast here was just barely visible in a profile.
This commit is contained in:
parent
f9f11dc51d
commit
7dacd6be89
Notes:
github-actions[bot]
2024-07-20 13:36:22 +00:00
Author: https://github.com/awesomekling
Commit: 7dacd6be89
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/735
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 1 additions and 1 deletions
|
@ -664,7 +664,7 @@ HTMLParser::AdjustedInsertionLocation HTMLParser::find_appropriate_place_for_ins
|
|||
// 3. If the adjusted insertion location is inside a template element,
|
||||
// let it instead be inside the template element's template contents, after its last child (if any).
|
||||
if (is<HTMLTemplateElement>(*adjusted_insertion_location.parent))
|
||||
adjusted_insertion_location = { verify_cast<HTMLTemplateElement>(*adjusted_insertion_location.parent).content().ptr(), nullptr };
|
||||
adjusted_insertion_location = { static_cast<HTMLTemplateElement const&>(*adjusted_insertion_location.parent).content().ptr(), nullptr };
|
||||
|
||||
// 4. Return the adjusted insertion location.
|
||||
return adjusted_insertion_location;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue