| Index: third_party/WebKit/Source/core/dom/Node.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
|
| index 8098447905d670f11e408c344c4b703a729d2ba7..eb30a1a12e65c1efdbf7d0520acc10500b031165 100644
|
| --- a/third_party/WebKit/Source/core/dom/Node.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Node.cpp
|
| @@ -2171,11 +2171,17 @@ void Node::defaultEventHandler(Event* event) {
|
| // LayoutTextControlSingleLine::scrollHeight
|
| document().updateStyleAndLayoutIgnorePendingStylesheets();
|
| LayoutObject* layoutObject = this->layoutObject();
|
| - while (layoutObject &&
|
| - (!layoutObject->isBox() ||
|
| - !toLayoutBox(layoutObject)->canBeScrolledAndHasScrollableArea()))
|
| - layoutObject = layoutObject->parent();
|
| -
|
| + while (
|
| + layoutObject &&
|
| + (!layoutObject->isBox() ||
|
| + !toLayoutBox(layoutObject)->canBeScrolledAndHasScrollableArea())) {
|
| + if (layoutObject->node() && layoutObject->node()->isDocumentNode()) {
|
| + Element* owner = toDocument(layoutObject->node())->localOwner();
|
| + layoutObject = owner ? owner->layoutObject() : nullptr;
|
| + } else {
|
| + layoutObject = layoutObject->parent();
|
| + }
|
| + }
|
| if (layoutObject) {
|
| if (LocalFrame* frame = document().frame())
|
| frame->eventHandler().startMiddleClickAutoscroll(layoutObject);
|
|
|