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

Unified Diff: third_party/WebKit/Source/core/editing/serializers/Serialization.cpp

Issue 2725603002: createFragmentFromMarkupWithContext() should use EphemeralRange. (Closed)
Patch Set: Addressed Review Comments Created 3 years, 9 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/EphemeralRangeTest.cpp ('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/serializers/Serialization.cpp
diff --git a/third_party/WebKit/Source/core/editing/serializers/Serialization.cpp b/third_party/WebKit/Source/core/editing/serializers/Serialization.cpp
index 5619d25c099c6d1bfb4f5ada3ac584a06c1d6ef3..fa369240ba9f3a5b84159761043146a217832b09 100644
--- a/third_party/WebKit/Source/core/editing/serializers/Serialization.cpp
+++ b/third_party/WebKit/Source/core/editing/serializers/Serialization.cpp
@@ -408,12 +408,11 @@ DocumentFragment* createFragmentFromMarkupWithContext(
root->appendChild(taggedFragment);
taggedDocument->appendChild(root);
- Range* range = Range::create(
- *taggedDocument,
+ const EphemeralRange range(
Position::afterNode(nodeBeforeContext).parentAnchoredEquivalent(),
Position::beforeNode(nodeAfterContext).parentAnchoredEquivalent());
- Node* commonAncestor = range->commonAncestorContainer();
+ Node* commonAncestor = range.commonAncestorContainer();
HTMLElement* specialCommonAncestor =
ancestorToRetainStructureAndAppearanceWithNoLayoutObject(commonAncestor);
« no previous file with comments | « third_party/WebKit/Source/core/editing/EphemeralRangeTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698