Changeset 294691 in webkit


Ignore:
Timestamp:
May 23, 2022, 3:53:13 PM (3 years ago)
Author:
commit-queue@webkit.org
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/editing/IndentOutdentCommand.cpp

    r292810 r294691  
    165165                if (splitPointParent->hasTagName(blockquoteTag)
    166166                    && !splitPoint->hasTagName(blockquoteTag)
     167                    && splitPointParent->parentNode()
    167168                    && splitPointParent->parentNode()->hasEditableStyle()) // We can't outdent if there is no place to go!
    168169                    splitElement(downcast<Element>(*splitPointParent), *splitPoint);
Note: See TracChangeset for help on using the changeset viewer.