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

Unified Diff: third_party/WebKit/Source/core/dom/CharacterData.cpp

Issue 1958093002: CONTINUED Make FrameSelection to hold non-canonicalized positions Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2017-01-16T20:04:35 Created 3 years, 11 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
Index: third_party/WebKit/Source/core/dom/CharacterData.cpp
diff --git a/third_party/WebKit/Source/core/dom/CharacterData.cpp b/third_party/WebKit/Source/core/dom/CharacterData.cpp
index 3024fd7737df8b0ddca23201883caeb624a27449..b945ce571632c0f3af78a6b40b190c9a70f87bbb 100644
--- a/third_party/WebKit/Source/core/dom/CharacterData.cpp
+++ b/third_party/WebKit/Source/core/dom/CharacterData.cpp
@@ -29,7 +29,6 @@
#include "core/dom/MutationRecord.h"
#include "core/dom/ProcessingInstruction.h"
#include "core/dom/Text.h"
-#include "core/editing/FrameSelection.h"
#include "core/events/MutationEvent.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "wtf/CheckedNumeric.h"
@@ -176,29 +175,22 @@ void CharacterData::setDataAndUpdate(const String& newData,
unsigned oldLength,
unsigned newLength,
UpdateSource source) {
- if (source != UpdateFromParser)
- document().dataWillChange(*this);
-
String oldData = m_data;
m_data = newData;
- DCHECK(!layoutObject() || isTextNode());
- if (isTextNode())
- toText(this)->updateTextLayoutObject(offsetOfReplacedData, oldLength);
-
+ document().incDOMTreeVersion();
if (source != UpdateFromParser) {
if (getNodeType() == kProcessingInstructionNode)
toProcessingInstruction(this)->didAttributeChanged();
document().notifyUpdateCharacterData(this, offsetOfReplacedData, oldLength,
newLength);
-
- if (document().frame())
- document().frame()->selection().didUpdateCharacterData(
- this, offsetOfReplacedData, oldLength, newLength);
}
- document().incDOMTreeVersion();
+ DCHECK(!layoutObject() || isTextNode());
+ if (isTextNode())
+ toText(this)->updateTextLayoutObject(offsetOfReplacedData, oldLength);
+
didModifyData(oldData, source);
}

Powered by Google App Engine
This is Rietveld 408576698