Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| index 7b7996ca542c27b32613429569ccd690bd5d2d9f..b86045ea20a4e8284f30ef6f4520d6aaeb13ac77 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| @@ -3279,6 +3279,16 @@ Element* LayoutObject::offsetParent() const |
| return node && node->isElementNode() ? toElement(node) : nullptr; |
| } |
| +Element* LayoutObject::offsetParentForBinding() const |
|
eae
2016/06/09 13:19:42
How about a more descriptive name like nearestUncl
kochi
2016/06/09 16:04:27
I chose "unclosedOffsetParent()", as it still retu
|
| +{ |
| + Element* element = offsetParent(); |
| + |
| + while (element && (!element->isUnclosedNodeOf(*node()) || (element->isInShadowTree() && element->containingShadowRoot()->type() == ShadowRootType::UserAgent))) |
| + element = element->layoutObject()->offsetParent(); |
| + |
| + return element; |
| +} |
| + |
| PositionWithAffinity LayoutObject::createPositionWithAffinity(int offset, TextAffinity affinity) |
| { |
| // If this is a non-anonymous layoutObject in an editable area, then it's simple. |