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

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

Issue 2637013002: CONTINUED Make FrameSelection to hold non-canonicalized positions (Closed)
Patch Set: 2017-02-08T18:56:19 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
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 22c3fd2debd78c9d4fcfd2e34043f3b043f75281..e896ac884444533169605c2deab58bbf525482a8 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,10 +175,7 @@ void CharacterData::setDataAndUpdate(const String& newData,
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();
@@ -188,7 +184,10 @@ void CharacterData::setDataAndUpdate(const String& newData,
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