Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/Range.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/Range.cpp b/third_party/WebKit/Source/core/dom/Range.cpp |
| index d1489f442ba9e1a93b31ee4b57d8d46fbf7aa89f..66768e7296187bdb821bb9e55d7edc4be7cc05a8 100644 |
| --- a/third_party/WebKit/Source/core/dom/Range.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Range.cpp |
| @@ -1530,7 +1530,9 @@ void Range::getBorderAndTextQuads(Vector<FloatQuad>& quads) const |
| for (Node* node = firstNode(); node != stopNode; node = NodeTraversal::next(*node)) { |
| if (node->isElementNode()) { |
| - if (!nodeSet.contains(node->parentNode())) { |
| + if (!nodeSet.contains(node->parentNode()) |
| + && !node->contains(startContainer) |
|
yosin_UTC9
2016/08/03 01:25:04
Since |nodeSet| is used only here, we have two opt
eae
2016/08/03 01:49:48
Oh, that's a good idea. Thanks for the suggestions
|
| + && !node->contains(endContainer)) { |
| if (LayoutObject* layoutObject = toElement(node)->layoutObject()) { |
| Vector<FloatQuad> elementQuads; |
| layoutObject->absoluteQuads(elementQuads); |