summaryrefslogtreecommitdiffstats
path: root/WebCore/editing/InsertTextCommand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/editing/InsertTextCommand.cpp')
-rw-r--r--WebCore/editing/InsertTextCommand.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/WebCore/editing/InsertTextCommand.cpp b/WebCore/editing/InsertTextCommand.cpp
index 46e9a94..52da5d0 100644
--- a/WebCore/editing/InsertTextCommand.cpp
+++ b/WebCore/editing/InsertTextCommand.cpp
@@ -89,19 +89,19 @@ bool InsertTextCommand::performTrivialReplace(const String& text, bool selectIns
if (start.node() != end.node() || !start.node()->isTextNode() || isTabSpanTextNode(start.node()))
return false;
- replaceTextInNode(static_cast<Text*>(start.node()), start.offset(), end.offset() - start.offset(), text);
+ replaceTextInNode(static_cast<Text*>(start.node()), start.m_offset, end.m_offset - start.m_offset, text);
- Position endPosition(start.node(), start.offset() + text.length());
+ Position endPosition(start.node(), start.m_offset + text.length());
// We could have inserted a part of composed character sequence,
// so we are basically treating ending selection as a range to avoid validation.
// <http://bugs.webkit.org/show_bug.cgi?id=15781>
- Selection forcedEndingSelection;
+ VisibleSelection forcedEndingSelection;
forcedEndingSelection.setWithoutValidation(start, endPosition);
setEndingSelection(forcedEndingSelection);
if (!selectInsertedText)
- setEndingSelection(Selection(endingSelection().visibleEnd()));
+ setEndingSelection(VisibleSelection(endingSelection().visibleEnd()));
return true;
}
@@ -155,7 +155,7 @@ void InsertTextCommand::input(const String& originalText, bool selectInsertedTex
startPosition = prepareForTextInsertion(startPosition);
removePlaceholderAt(VisiblePosition(startPosition));
Text *textNode = static_cast<Text *>(startPosition.node());
- int offset = startPosition.offset();
+ int offset = startPosition.m_offset;
insertTextIntoNode(textNode, offset, text);
endPosition = Position(textNode, offset + text.length());
@@ -172,7 +172,7 @@ void InsertTextCommand::input(const String& originalText, bool selectInsertedTex
// We could have inserted a part of composed character sequence,
// so we are basically treating ending selection as a range to avoid validation.
// <http://bugs.webkit.org/show_bug.cgi?id=15781>
- Selection forcedEndingSelection;
+ VisibleSelection forcedEndingSelection;
forcedEndingSelection.setWithoutValidation(startPosition, endPosition);
setEndingSelection(forcedEndingSelection);
@@ -199,7 +199,7 @@ void InsertTextCommand::input(const String& originalText, bool selectInsertedTex
applyStyle(typingStyle);
if (!selectInsertedText)
- setEndingSelection(Selection(endingSelection().end(), endingSelection().affinity()));
+ setEndingSelection(VisibleSelection(endingSelection().end(), endingSelection().affinity()));
}
Position InsertTextCommand::insertTab(const Position& pos)
@@ -207,7 +207,7 @@ Position InsertTextCommand::insertTab(const Position& pos)
Position insertPos = VisiblePosition(pos, DOWNSTREAM).deepEquivalent();
Node *node = insertPos.node();
- unsigned int offset = insertPos.offset();
+ unsigned int offset = insertPos.m_offset;
// keep tabs coalesced in tab span
if (isTabSpanTextNode(node)) {