https://bugs.webkit.org/show_bug.cgi?id=117475
Reviewed by Andreas Kling.
Removed.
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151449
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-06-11 Ryosuke Niwa <rniwa@webkit.org>
+
+ There are unused variables in ApplyStyleCommand::mergeEndWithNextIfIdentical and ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds
+ https://bugs.webkit.org/show_bug.cgi?id=117475
+
+ Reviewed by Andreas Kling.
+
+ Removed.
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
+ * editing/ReplaceSelectionCommand.cpp:
+ (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
+
2013-06-11 Robert Hogan <robert@webkit.org>
Fix typo in r151445
bool ApplyStyleCommand::mergeEndWithNextIfIdentical(const Position& start, const Position& end)
{
Node* endNode = end.containerNode();
- int endOffset = end.computeOffsetInContainerNode();
if (isAtomicNode(endNode)) {
- if (offsetIsBeforeLastNodeOffset(endOffset, endNode))
- return false;
-
- unsigned parentLastOffset = end.deprecatedNode()->parentNode()->childNodeCount() - 1;
- if (end.deprecatedNode()->nextSibling())
+ int endOffset = end.computeOffsetInContainerNode();
+ if (offsetIsBeforeLastNodeOffset(endOffset, endNode) || end.deprecatedNode()->nextSibling())
return false;
endNode = end.deprecatedNode()->parentNode();
- endOffset = parentLastOffset;
}
if (!endNode->isElementNode() || endNode->hasTagName(brTag))
removeNode(lastLeafInserted);
}
- // We don't have to make sure that firstNodeInserted isn't inside a select or script element, because
- // it is a top level node in the fragment and the user can't insert into those elements.
+ // We don't have to make sure that firstNodeInserted isn't inside a select or script element
+ // because it is a top level node in the fragment and the user can't insert into those elements.
Node* firstNodeInserted = insertedNodes.firstNodeInserted();
- lastLeafInserted = insertedNodes.lastLeafInserted();
if (firstNodeInserted && firstNodeInserted->isTextNode() && !nodeHasVisibleRenderText(toText(firstNodeInserted))) {
insertedNodes.willRemoveNode(firstNodeInserted);
removeNode(firstNodeInserted);