[webkit-changes] [WebKit/WebKit] 006728: Adopt dynamicDowncast<> in more editing code
Anne van Kesteren
noreply at github.com
Mon Jan 15 05:35:22 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 00672842afaa5ec635ddeb5c4c7b0fa2ac12df8a
https://github.com/WebKit/WebKit/commit/00672842afaa5ec635ddeb5c4c7b0fa2ac12df8a
Author: Anne van Kesteren <annevk at annevk.nl>
Date: 2024-01-15 (Mon, 15 Jan 2024)
Changed paths:
M Source/WebCore/editing/CompositeEditCommand.cpp
M Source/WebCore/editing/Editing.cpp
M Source/WebCore/editing/Editing.h
M Source/WebCore/editing/EditingStyle.cpp
M Source/WebCore/editing/InsertTextCommand.cpp
M Source/WebCore/editing/markup.cpp
Log Message:
-----------
Adopt dynamicDowncast<> in more editing code
https://bugs.webkit.org/show_bug.cgi?id=267498
Reviewed by Darin Adler.
This implements a refactoring suggested during review of 272993 at main.
Namely to turn the tabSpanNode methods into dynamicDowncast<> wrappers.
It also adopts dynamicDowncast<> in the surrounding code, including in
replaceChildrenWithFragment() which will need careful review.
* Source/WebCore/editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::isRemovableBlock):
(WebCore::CompositeEditCommand::insertNodeAt):
(WebCore::CompositeEditCommand::replaceSelectedTextInNode):
(WebCore::CompositeEditCommand::positionOutsideTabSpan):
(WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring):
(WebCore::CompositeEditCommand::deleteInsignificantText):
(WebCore::CompositeEditCommand::moveParagraphs):
* Source/WebCore/editing/Editing.cpp:
(WebCore::tabSpanNode):
(WebCore::parentTabSpanNode):
(WebCore::isTabSpanNode): Deleted.
(WebCore::isTabSpanTextNode): Deleted.
* Source/WebCore/editing/Editing.h:
* Source/WebCore/editing/EditingStyle.cpp:
(WebCore::EditingStyle::init):
(WebCore::EditingStyle::conflictsWithInlineStyleOfElement const):
(WebCore::StyleChange::StyleChange):
* Source/WebCore/editing/InsertTextCommand.cpp:
(WebCore::InsertTextCommand::positionInsideTextNode):
(WebCore::InsertTextCommand::insertTab):
* Source/WebCore/editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::wrapWithNode):
(WebCore::StyledMarkupAccumulator::appendCustomAttributes):
(WebCore::StyledMarkupAccumulator::appendStartTag):
(WebCore::highestAncestorToWrapMarkup):
(WebCore::isPlainTextMarkup):
(WebCore::replaceChildrenWithFragment):
Canonical link: https://commits.webkit.org/273037@main
More information about the webkit-changes
mailing list