Chromium Code Reviews| Index: third_party/WebKit/Source/web/ChromeClientImpl.cpp |
| diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp |
| index 9a15330d50765bcedde5fba60c91fe238ad266b7..6cbab168a9849f588a461293a82584d73cafa085 100644 |
| --- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp |
| +++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp |
| @@ -627,18 +627,24 @@ void ChromeClientImpl::showMouseOverURL(const HitTestResult& result) { |
| return; |
| WebURL url; |
| - // Find out if the mouse is over a link, and if so, let our UI know... |
| - if (result.isLiveLink() && !result.absoluteLinkURL().getString().isEmpty()) { |
| - url = result.absoluteLinkURL(); |
| - } else if (result.innerNode() && (isHTMLObjectElement(*result.innerNode()) || |
| - isHTMLEmbedElement(*result.innerNode()))) { |
| - LayoutObject* object = result.innerNode()->layoutObject(); |
| - if (object && object->isLayoutPart()) { |
| - Widget* widget = toLayoutPart(object)->widget(); |
| - if (widget && widget->isPluginContainer()) { |
| - WebPluginContainerImpl* plugin = toWebPluginContainerImpl(widget); |
| - url = plugin->plugin()->linkAtPosition( |
| - result.roundedPointInInnerNodeFrame()); |
| + |
| + // Ignore URL if hitTest include scrollbar |
|
bokan
2016/11/01 21:09:37
I'add add to this comment " since we might have bo
|
| + if (!result.scrollbar()) { |
| + // Find out if the mouse is over a link, and if so, let our UI know... |
| + if (result.isLiveLink() && |
| + !result.absoluteLinkURL().getString().isEmpty()) { |
| + url = result.absoluteLinkURL(); |
| + } else if (result.innerNode() && |
| + (isHTMLObjectElement(*result.innerNode()) || |
| + isHTMLEmbedElement(*result.innerNode()))) { |
| + LayoutObject* object = result.innerNode()->layoutObject(); |
| + if (object && object->isLayoutPart()) { |
| + Widget* widget = toLayoutPart(object)->widget(); |
| + if (widget && widget->isPluginContainer()) { |
| + WebPluginContainerImpl* plugin = toWebPluginContainerImpl(widget); |
| + url = plugin->plugin()->linkAtPosition( |
| + result.roundedPointInInnerNodeFrame()); |
| + } |
| } |
| } |
| } |