| 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..c2b287b8330d9d4973587d90574795a344301f98 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 unless the entire corresponding
|
| + // 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);
|
|
|