REGRESSION (r160908): Unable to unset bold while entering text
[WebKit-https.git] / Source / WebCore / editing / ios / EditorIOS.mm
index 669be88..4265e75 100644 (file)
@@ -185,39 +185,6 @@ bool Editor::insertParagraphSeparatorInQuotedContent()
     return true;
 }
 
-// FIXME: Copied from EditorMac. This should be shared between the two so that
-// the implementation does not differ.
-static RenderStyle* styleForSelectionStart(Frame* frame, Node *&nodeToRemove)
-{
-    nodeToRemove = 0;
-
-    if (frame->selection().isNone())
-        return 0;
-
-    Position position = frame->selection().selection().visibleStart().deepEquivalent();
-    if (!position.isCandidate() || position.isNull())
-        return 0;
-
-    RefPtr<EditingStyle> typingStyle = frame->selection().typingStyle();
-    if (!typingStyle || !typingStyle->style())
-        return &position.deprecatedNode()->renderer()->style();
-
-    RefPtr<Element> styleElement = frame->document()->createElement(spanTag, false);
-
-    String styleText = typingStyle->style()->asText() + " display: inline";
-    styleElement->setAttribute(styleAttr, styleText.impl());
-
-    ExceptionCode ec = 0;
-    styleElement->appendChild(frame->document()->createEditingTextNode(""), ec);
-    ASSERT(!ec);
-
-    position.deprecatedNode()->parentNode()->appendChild(styleElement, ec);
-    ASSERT(!ec);
-
-    nodeToRemove = styleElement.get();
-    return styleElement->renderer() ? &styleElement->renderer()->style() : 0;
-}
-
 const SimpleFontData* Editor::fontForSelection(bool& hasMultipleFonts) const
 {
     hasMultipleFonts = false;