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

Unified Diff: third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp

Issue 2437873008: Get rid of flat tree version of createVisibleSelection() taking two VisiblePosition (Closed)
Patch Set: 2016-10-24T13:35:49 Created 4 years, 2 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/svg/SVGTextContentElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp b/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp
index fed038575bf6f775bdba83a56fb23fb3bca43017..150bfa26462ebfff4f670b087ea45dea48440de7 100644
--- a/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp
@@ -225,8 +225,14 @@ void SVGTextContentElement::selectSubString(unsigned charnum,
for (unsigned i = 0; i < nchars; ++i)
end = nextPositionOf(end);
+ // TODO(editing-dev): We assume |start| and |end| are not null and we don't
+ // known when |start| and |end| are null. Once we get a such case, we check
+ // null for |start| and |end|.
document().frame()->selection().setSelection(
- createVisibleSelection(start, end));
+ SelectionInDOMTree::Builder()
+ .setBaseAndExtent(start.deepEquivalent(), end.deepEquivalent())
+ .setAffinity(start.affinity())
+ .build());
}
bool SVGTextContentElement::isPresentationAttribute(

Powered by Google App Engine
This is Rietveld 408576698