Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/Document.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp |
| index c44b227186644837c5a4a628e8e496940d1075d4..69ee81fdce70d8373b2aa83a2dcc761fe321cb48 100644 |
| --- a/third_party/WebKit/Source/core/dom/Document.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp |
| @@ -6019,13 +6019,15 @@ static LayoutObject* nearestCommonHoverAncestor(LayoutObject* obj1, |
| void Document::updateHoverActiveState(const HitTestRequest& request, |
| Element* innerElement, |
| - bool hitScrollbar) { |
| + Scrollbar* hitScrollbar) { |
| DCHECK(!request.readOnly()); |
| - if (request.active() && m_frame && !hitScrollbar) |
| + bool hitNativeScrollbar = hitScrollbar && !hitScrollbar->isCustomScrollbar(); |
|
bokan
2016/11/23 17:09:51
Please add a comment here on why custom scrollbars
|
| + |
| + if (request.active() && m_frame && !hitNativeScrollbar) |
| m_frame->eventHandler().notifyElementActivated(); |
| - Element* innerElementInDocument = hitScrollbar ? nullptr : innerElement; |
| + Element* innerElementInDocument = hitNativeScrollbar ? nullptr : innerElement; |
| while (innerElementInDocument && innerElementInDocument->document() != this) { |
| innerElementInDocument->document().updateHoverActiveState( |
| request, innerElementInDocument, hitScrollbar); |
| @@ -6034,7 +6036,7 @@ void Document::updateHoverActiveState(const HitTestRequest& request, |
| updateDistribution(); |
| Element* oldActiveElement = activeHoverElement(); |
| - if (oldActiveElement && (!request.active() || hitScrollbar)) { |
| + if (oldActiveElement && (!request.active() || hitNativeScrollbar)) { |
| // The oldActiveElement layoutObject is null, dropped on :active by setting |
| // display: none, for instance. We still need to clear the ActiveChain as |
| // the mouse is released. |