diff options
Diffstat (limited to 'WebCore/editing/Editor.cpp')
-rw-r--r-- | WebCore/editing/Editor.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/WebCore/editing/Editor.cpp b/WebCore/editing/Editor.cpp index 5798452..1061dd2 100644 --- a/WebCore/editing/Editor.cpp +++ b/WebCore/editing/Editor.cpp @@ -1004,16 +1004,6 @@ bool Editor::insertParagraphSeparator() return true; } -static bool nodeIsInTextFormControl(Node* node) -{ - if (!node) - return false; - Node* ancestor = node->shadowAncestorNode(); - if (ancestor == node) - return false; - return ancestor->isElementNode() && static_cast<Element*>(ancestor)->isTextFormControl(); -} - void Editor::cut() { if (tryDHTMLCut()) @@ -1024,7 +1014,7 @@ void Editor::cut() } RefPtr<Range> selection = selectedRange(); if (shouldDeleteRange(selection.get())) { - if (nodeIsInTextFormControl(m_frame->selection()->start().node())) + if (isNodeInTextFormControl(m_frame->selection()->start().node())) Pasteboard::generalPasteboard()->writePlainText(m_frame->selectedText()); else Pasteboard::generalPasteboard()->writeSelection(selection.get(), canSmartCopyOrDelete(), m_frame); @@ -1042,7 +1032,7 @@ void Editor::copy() return; } - if (nodeIsInTextFormControl(m_frame->selection()->start().node())) + if (isNodeInTextFormControl(m_frame->selection()->start().node())) Pasteboard::generalPasteboard()->writePlainText(m_frame->selectedText()); else { Document* document = m_frame->document(); |