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

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

Issue 1504743002: Do not show a tooltip same as the previous one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 5 years 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // FIXME: We should obtain text direction of tooltip from 160 // FIXME: We should obtain text direction of tooltip from
161 // ChromeClient or platform. As of October 2011, all client 161 // ChromeClient or platform. As of October 2011, all client
162 // implementations don't use text direction information for 162 // implementations don't use text direction information for
163 // ChromeClient::setToolTip. We'll work on tooltip text 163 // ChromeClient::setToolTip. We'll work on tooltip text
164 // direction during bidi cleanup in form inputs. 164 // direction during bidi cleanup in form inputs.
165 toolTipDirection = LTR; 165 toolTipDirection = LTR;
166 } 166 }
167 } 167 }
168 } 168 }
169 169
170 if (m_lastToolTipPoint == result.hitTestLocation().point() && m_lastToolTipT ext == toolTip)
171 return;
172 m_lastToolTipPoint = result.hitTestLocation().point();
173 m_lastToolTipText = toolTip;
170 setToolTip(toolTip, toolTipDirection); 174 setToolTip(toolTip, toolTipDirection);
171 } 175 }
172 176
177 void ChromeClient::clearToolTip()
178 {
179 // Do not check m_lastToolTip* and do not update them intentionally.
180 // We don't want to show tooltips with same content after clearToolTip().
181 setToolTip(String(), LTR);
182 }
183
173 void ChromeClient::print(LocalFrame* frame) 184 void ChromeClient::print(LocalFrame* frame)
174 { 185 {
175 // Defer loads in case the client method runs a new event loop that would 186 // Defer loads in case the client method runs a new event loop that would
176 // otherwise cause the load to continue while we're in the middle of 187 // otherwise cause the load to continue while we're in the middle of
177 // executing JavaScript. 188 // executing JavaScript.
178 ScopedPageLoadDeferrer deferrer; 189 ScopedPageLoadDeferrer deferrer;
179 190
180 printDelegate(frame); 191 printDelegate(frame);
181 } 192 }
182 193
183 } // namespace blink 194 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/ChromeClient.h ('k') | third_party/WebKit/Source/core/page/ChromeClientTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698