| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |