Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(475)

Unified Diff: third_party/WebKit/Source/core/editing/Editor.cpp

Issue 2712243002: Make Editor::respondToChangedContents take a Position (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/editing/Editor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/Editor.cpp
diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp
index 147b10fa09c203c7d4978f25893ff29ef469de4d..b7c614c5b0c926b7db18d0cb76091942849e00a1 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -734,9 +734,9 @@ bool Editor::canDeleteRange(const EphemeralRange& range) const {
return hasEditableStyle(*startContainer) && hasEditableStyle(*endContainer);
}
-void Editor::respondToChangedContents(const VisibleSelection& endingSelection) {
+void Editor::respondToChangedContents(const Position& position) {
if (frame().settings() && frame().settings()->getAccessibilityEnabled()) {
- Node* node = endingSelection.start().anchorNode();
+ Node* node = position.anchorNode();
if (AXObjectCache* cache = frame().document()->existingAXObjectCache())
cache->handleEditableTextContentChanged(node);
}
@@ -917,7 +917,7 @@ void Editor::appliedEditing(CompositeEditCommand* cmd) {
m_undoStack->registerUndoStep(m_lastEditCommand->ensureUndoStep());
}
- respondToChangedContents(newSelection);
+ respondToChangedContents(newSelection.start());
}
static VisibleSelection correctedVisibleSelection(
@@ -958,7 +958,7 @@ void Editor::unappliedEditing(UndoStep* cmd) {
m_lastEditCommand = nullptr;
m_undoStack->registerRedoStep(cmd);
- respondToChangedContents(newSelection);
+ respondToChangedContents(newSelection.start());
}
void Editor::reappliedEditing(UndoStep* cmd) {
@@ -987,7 +987,7 @@ void Editor::reappliedEditing(UndoStep* cmd) {
m_lastEditCommand = nullptr;
m_undoStack->registerUndoStep(cmd);
- respondToChangedContents(newSelection);
+ respondToChangedContents(newSelection.start());
}
Editor* Editor::create(LocalFrame& frame) {
« no previous file with comments | « third_party/WebKit/Source/core/editing/Editor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698