Remove unnecessary null check in FrameSelection::nodeWillBeRemoved()
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Nov 2014 00:02:57 +0000 (00:02 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Nov 2014 00:02:57 +0000 (00:02 +0000)
commitdd5e987b87441c19c3a739d8fd7052b0fc8f47d6
treeff4fdbff0be20f9d3fbe1330397a6db4f524fdf5
parent2ed57b0d23061793227d094a509dba42dc1afee9
Remove unnecessary null check in FrameSelection::nodeWillBeRemoved()
https://bugs.webkit.org/show_bug.cgi?id=138578

Reviewed by Andreas Kling.

Remove unnecessary null check in FrameSelection::nodeWillBeRemoved()
and turn the argument into a reference to make it clear it cannot be
null.

No new tests, no behavior change.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::willRemoveChild):
* dom/Document.cpp:
(WebCore::Document::nodeChildrenWillBeRemoved):
(WebCore::Document::nodeWillBeRemoved):
* dom/Document.h:
* dom/NodeIterator.cpp:
(WebCore::NodeIterator::nodeWillBeRemoved):
(WebCore::NodeIterator::updateForNodeRemoval):
* dom/NodeIterator.h:
* dom/Range.cpp:
(WebCore::Range::insertNode):
(WebCore::boundaryNodeWillBeRemoved):
(WebCore::Range::nodeWillBeRemoved):
* dom/Range.h:
* dom/RangeBoundaryPoint.h:
(WebCore::RangeBoundaryPoint::setToBeforeChild):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::updatePositionForNodeRemovalPreservingChildren):
* editing/CompositeEditCommand.h:
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::removeNode):
(WebCore::DeleteSelectionCommand::handleGeneralDelete):
(WebCore::DeleteSelectionCommand::removeRedundantBlocks):
* editing/FrameSelection.cpp:
(WebCore::removingNodeRemovesPosition):
(WebCore::DragCaretController::nodeWillBeRemoved):
(WebCore::FrameSelection::nodeWillBeRemoved):
(WebCore::FrameSelection::respondToNodeModification):
* editing/FrameSelection.h:
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
* editing/htmlediting.cpp:
(WebCore::updatePositionForNodeRemoval):
* editing/htmlediting.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::nodeWillBeRemoved):
* page/EventHandler.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@175836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/ContainerNode.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/NodeIterator.cpp
Source/WebCore/dom/NodeIterator.h
Source/WebCore/dom/Range.cpp
Source/WebCore/dom/Range.h
Source/WebCore/dom/RangeBoundaryPoint.h
Source/WebCore/editing/CompositeEditCommand.cpp
Source/WebCore/editing/CompositeEditCommand.h
Source/WebCore/editing/DeleteSelectionCommand.cpp
Source/WebCore/editing/FrameSelection.cpp
Source/WebCore/editing/FrameSelection.h
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/editing/htmlediting.cpp
Source/WebCore/editing/htmlediting.h
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/EventHandler.h