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 024fdf9aee204db8e67f4eeb67f56691ad75e043..37f5d823bdd0b60d18660605a9f08122c4b717f1 100644 |
| --- a/third_party/WebKit/Source/core/dom/Range.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Range.cpp |
| @@ -1530,7 +1530,11 @@ 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())) { |
| + // Exclude start & end container if unless the entire corresponding |
|
yosin_UTC9
2016/08/16 01:37:01
s/if unless/unless/
|
| + // node is included in the range. |
| + if (!nodeSet.contains(node->parentNode()) |
| + && (startContainer == endContainer |
| + || (!node->contains(startContainer) && !node->contains(endContainer)))) { |
| if (LayoutObject* layoutObject = toElement(node)->layoutObject()) { |
| Vector<FloatQuad> elementQuads; |
| layoutObject->absoluteQuads(elementQuads); |