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( |