Index: Source/core/editing/ApplyStyleCommand.cpp |
diff --git a/Source/core/editing/ApplyStyleCommand.cpp b/Source/core/editing/ApplyStyleCommand.cpp |
index eeb18cb903bc437e0a70737c3d25d95f9ff6b7da..c6d44a3181cb5da027ddca6cf0a5a1f4aa470703 100644 |
--- a/Source/core/editing/ApplyStyleCommand.cpp |
+++ b/Source/core/editing/ApplyStyleCommand.cpp |
@@ -496,9 +496,7 @@ void ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock(Node* node, Node* unsp |
if (!block) |
return; |
- Node* parent = 0; |
- for (Node* n = node->parentNode(); n != block && n != unsplitAncestor; n = parent) { |
- parent = n->parentNode(); |
+ for (Node* n = node->parentNode(); n != block && n != unsplitAncestor; n = n->parentNode()) { |
if (!n->isStyledElement()) |
continue; |
@@ -1333,12 +1331,11 @@ void ApplyStyleCommand::surroundNodeRangeWithElement(PassRefPtr<Node> passedStar |
ASSERT(passedStartNode); |
ASSERT(endNode); |
ASSERT(elementToInsert); |
- RefPtr<Node> startNode = passedStartNode; |
+ RefPtr<Node> node = passedStartNode; |
RefPtr<Element> element = elementToInsert; |
- insertNodeBefore(element, startNode); |
+ insertNodeBefore(element, node); |
- RefPtr<Node> node = startNode; |
while (node) { |
RefPtr<Node> next = node->nextSibling(); |
if (node->isContentEditable(Node::UserSelectAllIsAlwaysNonEditable)) { |