Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Side by Side Diff: third_party/WebKit/Source/core/page/ChromeClient.cpp

Issue 2389073002: Fix link's hover state if the link under scrollbar (Closed)
Patch Set: Merge patch-2467693002 to fix testcase failed in OSX Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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.innerNode() && 154 if (!result.scrollbar() && 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 setToolTip(frame, result); 160 if (result.scrollbar())
161 clearToolTip(frame);
162 else
163 setToolTip(frame, result);
161 } 164 }
162 165
163 void ChromeClient::setToolTip(LocalFrame& frame, const HitTestResult& result) { 166 void ChromeClient::setToolTip(LocalFrame& frame, const HitTestResult& result) {
164 // First priority is a tooltip for element with "title" attribute. 167 // First priority is a tooltip for element with "title" attribute.
165 TextDirection toolTipDirection; 168 TextDirection toolTipDirection;
166 String toolTip = result.title(toolTipDirection); 169 String toolTip = result.title(toolTipDirection);
167 170
168 // Lastly, some elements provide default tooltip strings. e.g. <input 171 // Lastly, some elements provide default tooltip strings. e.g. <input
169 // type="file" multiple> shows a tooltip for the selected filenames. 172 // type="file" multiple> shows a tooltip for the selected filenames.
170 if (toolTip.isEmpty()) { 173 if (toolTip.isEmpty()) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // Defer loads in case the client method runs a new event loop that would 212 // Defer loads in case the client method runs a new event loop that would
210 // otherwise cause the load to continue while we're in the middle of 213 // otherwise cause the load to continue while we're in the middle of
211 // executing JavaScript. 214 // executing JavaScript.
212 ScopedPageLoadDeferrer deferrer; 215 ScopedPageLoadDeferrer deferrer;
213 216
214 printDelegate(frame); 217 printDelegate(frame);
215 return true; 218 return true;
216 } 219 }
217 220
218 } // namespace blink 221 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | third_party/WebKit/Source/web/ChromeClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698