| 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 | 630 // Find out if the mouse is over a link, and if so, let our UI know... |
| 631 // Ignore URL if hitTest include scrollbar since we might have both a | 631 if (result.isLiveLink() && !result.absoluteLinkURL().getString().isEmpty()) { |
| 632 // scrollbar and an element in the case of overlay scrollbars. | 632 url = result.absoluteLinkURL(); |
| 633 if (!result.scrollbar()) { | 633 } else if (result.innerNode() && (isHTMLObjectElement(*result.innerNode()) || |
| 634 // Find out if the mouse is over a link, and if so, let our UI know... | 634 isHTMLEmbedElement(*result.innerNode()))) { |
| 635 if (result.isLiveLink() && | 635 LayoutObject* object = result.innerNode()->layoutObject(); |
| 636 !result.absoluteLinkURL().getString().isEmpty()) { | 636 if (object && object->isLayoutPart()) { |
| 637 url = result.absoluteLinkURL(); | 637 Widget* widget = toLayoutPart(object)->widget(); |
| 638 } else if (result.innerNode() && | 638 if (widget && widget->isPluginContainer()) { |
| 639 (isHTMLObjectElement(*result.innerNode()) || | 639 WebPluginContainerImpl* plugin = toWebPluginContainerImpl(widget); |
| 640 isHTMLEmbedElement(*result.innerNode()))) { | 640 url = plugin->plugin()->linkAtPosition( |
| 641 LayoutObject* object = result.innerNode()->layoutObject(); | 641 result.roundedPointInInnerNodeFrame()); |
| 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 } | |
| 649 } | 642 } |
| 650 } | 643 } |
| 651 } | 644 } |
| 652 | 645 |
| 653 m_webView->client()->setMouseOverURL(url); | 646 m_webView->client()->setMouseOverURL(url); |
| 654 } | 647 } |
| 655 | 648 |
| 656 void ChromeClientImpl::setToolTip(LocalFrame& frame, | 649 void ChromeClientImpl::setToolTip(LocalFrame& frame, |
| 657 const String& tooltipText, | 650 const String& tooltipText, |
| 658 TextDirection dir) { | 651 TextDirection dir) { |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1162 if (RuntimeEnabledFeatures::presentationEnabled()) | 1155 if (RuntimeEnabledFeatures::presentationEnabled()) |
| 1163 PresentationController::provideTo(frame, client->presentationClient()); | 1156 PresentationController::provideTo(frame, client->presentationClient()); |
| 1164 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) | 1157 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) |
| 1165 provideAudioOutputDeviceClientTo(frame, | 1158 provideAudioOutputDeviceClientTo(frame, |
| 1166 AudioOutputDeviceClientImpl::create()); | 1159 AudioOutputDeviceClientImpl::create()); |
| 1167 if (RuntimeEnabledFeatures::installedAppEnabled()) | 1160 if (RuntimeEnabledFeatures::installedAppEnabled()) |
| 1168 InstalledAppController::provideTo(frame, client->installedAppClient()); | 1161 InstalledAppController::provideTo(frame, client->installedAppClient()); |
| 1169 } | 1162 } |
| 1170 | 1163 |
| 1171 } // namespace blink | 1164 } // namespace blink |
| OLD | NEW |