Skip to content
Permalink
Browse files
Null check split node parent in outdentParagraph
https://bugs.webkit.org/show_bug.cgi?id=240806

Patch by Rob Buis <rbuis@igalia.com> on 2022-05-23
Reviewed by Wenson Hsieh.

The split node parent needs an extra null check to access its parent
before safely calling hasEditableStyle.

* Source/WebCore/editing/IndentOutdentCommand.cpp:
(WebCore::IndentOutdentCommand::outdentParagraph):

Canonical link: https://commits.webkit.org/250895@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
rwlbuis authored and webkit-commit-queue committed May 23, 2022
1 parent e00d2ca commit 9c4deed04fd3a307da74b625131ac728d81ea4b1
Showing 1 changed file with 1 addition and 0 deletions.
@@ -164,6 +164,7 @@ void IndentOutdentCommand::outdentParagraph()
if (ContainerNode* splitPointParent = splitPoint->parentNode()) {
if (splitPointParent->hasTagName(blockquoteTag)
&& !splitPoint->hasTagName(blockquoteTag)
&& splitPointParent->parentNode()
&& splitPointParent->parentNode()->hasEditableStyle()) // We can't outdent if there is no place to go!
splitElement(downcast<Element>(*splitPointParent), *splitPoint);
}

0 comments on commit 9c4deed

Please sign in to comment.