| 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 6366ad7e02ade36f65937688ddca1d8b59f5c748..6643b522c8654e18c93e0e3822dd875ca377a551 100644
 | 
| --- a/third_party/WebKit/Source/core/dom/Document.cpp
 | 
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp
 | 
| @@ -6089,14 +6089,22 @@ void Document::updateHoverActiveState(const HitTestRequest& request,
 | 
|                                        Scrollbar* hitScrollbar) {
 | 
|    DCHECK(!request.readOnly());
 | 
|  
 | 
| -  // Only cancel hover state when hitting native scrollbar because custom
 | 
| -  // scrollbar's style depends on the owner element's hover state.
 | 
| -  bool hitNativeScrollbar = hitScrollbar && !hitScrollbar->isCustomScrollbar();
 | 
| -
 | 
| -  if (request.active() && m_frame && !hitNativeScrollbar)
 | 
| +  if (request.active() && m_frame)
 | 
|      m_frame->eventHandler().notifyElementActivated();
 | 
|  
 | 
| -  Element* innerElementInDocument = hitNativeScrollbar ? nullptr : innerElement;
 | 
| +  Element* innerElementInDocument = hitScrollbar ? nullptr : innerElement;
 | 
| +  // Replace the innerElementInDocument to be srollbar's parent when hit
 | 
| +  // scrollbar
 | 
| +  if (hitScrollbar) {
 | 
| +    ScrollableArea* scrollableArea = hitScrollbar->getScrollableArea();
 | 
| +    if (scrollableArea && scrollableArea->layoutBox() &&
 | 
| +        scrollableArea->layoutBox()->node() &&
 | 
| +        scrollableArea->layoutBox()->node()->isElementNode()) {
 | 
| +      innerElementInDocument =
 | 
| +          toElement(hitScrollbar->getScrollableArea()->layoutBox()->node());
 | 
| +    }
 | 
| +  }
 | 
| +
 | 
|    while (innerElementInDocument && innerElementInDocument->document() != this) {
 | 
|      innerElementInDocument->document().updateHoverActiveState(
 | 
|          request, innerElementInDocument, hitScrollbar);
 | 
| @@ -6105,7 +6113,7 @@ void Document::updateHoverActiveState(const HitTestRequest& request,
 | 
|  
 | 
|    updateDistribution();
 | 
|    Element* oldActiveElement = activeHoverElement();
 | 
| -  if (oldActiveElement && (!request.active() || hitNativeScrollbar)) {
 | 
| +  if (oldActiveElement && !request.active()) {
 | 
|      // 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.
 | 
| 
 |