| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2012, Samsung Electronics. All rights reserved. | 4 * Copyright (C) 2012, Samsung Electronics. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 return false; | 144 return false; |
| 145 return openJavaScriptDialog(frame, prompt, ChromeClient::PromptDialog, | 145 return openJavaScriptDialog(frame, prompt, ChromeClient::PromptDialog, |
| 146 [this, frame, &prompt, &defaultValue, &result]() { | 146 [this, frame, &prompt, &defaultValue, &result]() { |
| 147 return openJavaScriptPromptDelegate( | 147 return openJavaScriptPromptDelegate( |
| 148 frame, prompt, defaultValue, result); | 148 frame, prompt, defaultValue, result); |
| 149 }); | 149 }); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void ChromeClient::mouseDidMoveOverElement(LocalFrame& frame, | 152 void ChromeClient::mouseDidMoveOverElement(LocalFrame& frame, |
| 153 const HitTestResult& result) { | 153 const HitTestResult& result) { |
| 154 if (!result.scrollbar() && result.innerNode() && | 154 if (result.innerNode() && |
| 155 result.innerNode()->document().isDNSPrefetchEnabled()) | 155 result.innerNode()->document().isDNSPrefetchEnabled()) |
| 156 prefetchDNS(result.absoluteLinkURL().host()); | 156 prefetchDNS(result.absoluteLinkURL().host()); |
| 157 | 157 |
| 158 showMouseOverURL(result); | 158 showMouseOverURL(result); |
| 159 | 159 |
| 160 if (result.scrollbar()) | 160 setToolTip(frame, result); |
| 161 clearToolTip(frame); | |
| 162 else | |
| 163 setToolTip(frame, result); | |
| 164 } | 161 } |
| 165 | 162 |
| 166 void ChromeClient::setToolTip(LocalFrame& frame, const HitTestResult& result) { | 163 void ChromeClient::setToolTip(LocalFrame& frame, const HitTestResult& result) { |
| 167 // First priority is a tooltip for element with "title" attribute. | 164 // First priority is a tooltip for element with "title" attribute. |
| 168 TextDirection toolTipDirection; | 165 TextDirection toolTipDirection; |
| 169 String toolTip = result.title(toolTipDirection); | 166 String toolTip = result.title(toolTipDirection); |
| 170 | 167 |
| 171 // Lastly, some elements provide default tooltip strings. e.g. <input | 168 // Lastly, some elements provide default tooltip strings. e.g. <input |
| 172 // type="file" multiple> shows a tooltip for the selected filenames. | 169 // type="file" multiple> shows a tooltip for the selected filenames. |
| 173 if (toolTip.isEmpty()) { | 170 if (toolTip.isEmpty()) { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 // Defer loads in case the client method runs a new event loop that would | 209 // Defer loads in case the client method runs a new event loop that would |
| 213 // otherwise cause the load to continue while we're in the middle of | 210 // otherwise cause the load to continue while we're in the middle of |
| 214 // executing JavaScript. | 211 // executing JavaScript. |
| 215 ScopedPageLoadDeferrer deferrer; | 212 ScopedPageLoadDeferrer deferrer; |
| 216 | 213 |
| 217 printDelegate(frame); | 214 printDelegate(frame); |
| 218 return true; | 215 return true; |
| 219 } | 216 } |
| 220 | 217 |
| 221 } // namespace blink | 218 } // namespace blink |
| OLD | NEW |