Get rid of Position::computedStyle
[WebKit-https.git] / Source / WebCore / editing / ApplyStyleCommand.cpp
index 75b7cd57f3290e88354af411a664b492f156fce8..5cec38a7fd511978a1a3bddffab0617d890ea8b0 100644 (file)
@@ -1409,11 +1409,10 @@ void ApplyStyleCommand::addInlineStyleIfNeeded(EditingStyle* style, PassRefPtr<N
 Position ApplyStyleCommand::positionToComputeInlineStyleChange(PassRefPtr<Node> startNode, RefPtr<Node>& dummyElement)
 {
     // It's okay to obtain the style at the startNode because we've removed all relevant styles from the current run.
-    Position positionForStyleComparison;
     if (!startNode->isElementNode()) {
         dummyElement = createStyleSpanElement(document());
         insertNodeAt(dummyElement, positionBeforeNode(startNode.get()));
-        return positionBeforeNode(dummyElement.get());
+        return firstPositionInOrBeforeNode(dummyElement.get());
     }
 
     return firstPositionInOrBeforeNode(startNode.get());