Skip to content

Commit

Permalink
Remove redundant call in Editor::findEventTargetFrom
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=271622

Reviewed by Sihui Liu.

This patch removes redundant call for returning `nullptr`, if there is
no target while in above `if`, it returns value properly, so this is
noop condition.

* Source/WebCore/editing/Editor.cpp:
(WebCore::Editor::findEventTargetFrom const):

Canonical link: https://commits.webkit.org/276641@main
  • Loading branch information
Ahmad Saleem committed Mar 25, 2024
1 parent 246a668 commit 9b57d85
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Source/WebCore/editing/Editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -983,8 +983,6 @@ RefPtr<Element> Editor::findEventTargetFrom(const VisibleSelection& selection) c
RefPtr target { selection.start().anchorElementAncestor() };
if (!target)
target = document().bodyOrFrameset();
if (!target)
return nullptr;

return target;
}
Expand Down

0 comments on commit 9b57d85

Please sign in to comment.