Chromium Code Reviews| 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..511affe33374697dbb6360147eed25c7df21b05e 100644 |
| --- a/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp |
| +++ b/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp |
| @@ -225,8 +225,18 @@ void SVGTextContentElement::selectSubString(unsigned charnum, |
| for (unsigned i = 0; i < nchars; ++i) |
| end = nextPositionOf(end); |
| + SelectionInDOMTree::Builder builder; |
|
Xiaocheng
2016/10/21 11:18:36
How about just setBaseAndExtentDeprecated?
Since
yosin_UTC9
2016/10/24 06:19:44
Done.
|
| + if (start.isNotNull() && end.isNotNull()) { |
| + builder.collapse(start.toPositionWithAffinity()) |
| + .extend(end.deepEquivalent()); |
| + } else if (start.isNotNull()) { |
| + builder.collapse(start.toPositionWithAffinity()); |
| + } else if (end.isNotNull()) { |
| + builder.collapse(end.toPositionWithAffinity()); |
| + } |
| + |
| document().frame()->selection().setSelection( |
|
Xiaocheng
2016/10/21 11:18:36
We should use the FrameSelection::setSelection(Sel
yosin_UTC9
2016/10/24 06:19:44
Good catch!
|
| - createVisibleSelection(start, end)); |
| + createVisibleSelection(builder.build())); |
| } |
| bool SVGTextContentElement::isPresentationAttribute( |