| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 | 620 |
| 621 void ChromeClientImpl::layoutUpdated(LocalFrame* frame) const { | 621 void ChromeClientImpl::layoutUpdated(LocalFrame* frame) const { |
| 622 m_webView->layoutUpdated(WebLocalFrameImpl::fromFrame(frame)); | 622 m_webView->layoutUpdated(WebLocalFrameImpl::fromFrame(frame)); |
| 623 } | 623 } |
| 624 | 624 |
| 625 void ChromeClientImpl::showMouseOverURL(const HitTestResult& result) { | 625 void ChromeClientImpl::showMouseOverURL(const HitTestResult& result) { |
| 626 if (!m_webView->client()) | 626 if (!m_webView->client()) |
| 627 return; | 627 return; |
| 628 | 628 |
| 629 WebURL url; | 629 WebURL url; |
| 630 // Find out if the mouse is over a link, and if so, let our UI know... | 630 |
| 631 if (result.isLiveLink() && !result.absoluteLinkURL().getString().isEmpty()) { | 631 // Ignore URL if hitTest include scrollbar since we might have both a |
| 632 url = result.absoluteLinkURL(); | 632 // scrollbar and an element in the case of overlay scrollbars. |
| 633 } else if (result.innerNode() && (isHTMLObjectElement(*result.innerNode()) || | 633 if (!result.scrollbar()) { |
| 634 isHTMLEmbedElement(*result.innerNode()))) { | 634 // Find out if the mouse is over a link, and if so, let our UI know... |
| 635 LayoutObject* object = result.innerNode()->layoutObject(); | 635 if (result.isLiveLink() && |
| 636 if (object && object->isLayoutPart()) { | 636 !result.absoluteLinkURL().getString().isEmpty()) { |
| 637 Widget* widget = toLayoutPart(object)->widget(); | 637 url = result.absoluteLinkURL(); |
| 638 if (widget && widget->isPluginContainer()) { | 638 } else if (result.innerNode() && |
| 639 WebPluginContainerImpl* plugin = toWebPluginContainerImpl(widget); | 639 (isHTMLObjectElement(*result.innerNode()) || |
| 640 url = plugin->plugin()->linkAtPosition( | 640 isHTMLEmbedElement(*result.innerNode()))) { |
| 641 result.roundedPointInInnerNodeFrame()); | 641 LayoutObject* object = result.innerNode()->layoutObject(); |
| 642 if (object && object->isLayoutPart()) { |
| 643 Widget* widget = toLayoutPart(object)->widget(); |
| 644 if (widget && widget->isPluginContainer()) { |
| 645 WebPluginContainerImpl* plugin = toWebPluginContainerImpl(widget); |
| 646 url = plugin->plugin()->linkAtPosition( |
| 647 result.roundedPointInInnerNodeFrame()); |
| 648 } |
| 642 } | 649 } |
| 643 } | 650 } |
| 644 } | 651 } |
| 645 | 652 |
| 646 m_webView->client()->setMouseOverURL(url); | 653 m_webView->client()->setMouseOverURL(url); |
| 647 } | 654 } |
| 648 | 655 |
| 649 void ChromeClientImpl::setToolTip(LocalFrame& frame, | 656 void ChromeClientImpl::setToolTip(LocalFrame& frame, |
| 650 const String& tooltipText, | 657 const String& tooltipText, |
| 651 TextDirection dir) { | 658 TextDirection dir) { |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1155 if (RuntimeEnabledFeatures::presentationEnabled()) | 1162 if (RuntimeEnabledFeatures::presentationEnabled()) |
| 1156 PresentationController::provideTo(frame, client->presentationClient()); | 1163 PresentationController::provideTo(frame, client->presentationClient()); |
| 1157 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) | 1164 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) |
| 1158 provideAudioOutputDeviceClientTo(frame, | 1165 provideAudioOutputDeviceClientTo(frame, |
| 1159 AudioOutputDeviceClientImpl::create()); | 1166 AudioOutputDeviceClientImpl::create()); |
| 1160 if (RuntimeEnabledFeatures::installedAppEnabled()) | 1167 if (RuntimeEnabledFeatures::installedAppEnabled()) |
| 1161 InstalledAppController::provideTo(frame, client->installedAppClient()); | 1168 InstalledAppController::provideTo(frame, client->installedAppClient()); |
| 1162 } | 1169 } |
| 1163 | 1170 |
| 1164 } // namespace blink | 1171 } // namespace blink |
| OLD | NEW |