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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 TextDirection toolTipDirection; | 276 TextDirection toolTipDirection; |
277 String toolTip = result.spellingToolTip(toolTipDirection); | 277 String toolTip = result.spellingToolTip(toolTipDirection); |
278 | 278 |
279 // Next we'll consider a tooltip for element with "title" attribute | 279 // Next we'll consider a tooltip for element with "title" attribute |
280 if (toolTip.isEmpty()) | 280 if (toolTip.isEmpty()) |
281 toolTip = result.title(toolTipDirection); | 281 toolTip = result.title(toolTipDirection); |
282 | 282 |
283 // Lastly, for <input type="file"> that allow multiple files, we'll consider
a tooltip for the selected filenames | 283 // Lastly, for <input type="file"> that allow multiple files, we'll consider
a tooltip for the selected filenames |
284 if (toolTip.isEmpty()) { | 284 if (toolTip.isEmpty()) { |
285 if (Node* node = result.innerNonSharedNode()) { | 285 if (Node* node = result.innerNonSharedNode()) { |
286 if (node->hasTagName(inputTag)) { | 286 if (isHTMLInputElement(*node)) { |
287 HTMLInputElement* input = toHTMLInputElement(node); | 287 HTMLInputElement* input = toHTMLInputElement(node); |
288 toolTip = input->defaultToolTip(); | 288 toolTip = input->defaultToolTip(); |
289 | 289 |
290 // FIXME: We should obtain text direction of tooltip from | 290 // FIXME: We should obtain text direction of tooltip from |
291 // ChromeClient or platform. As of October 2011, all client | 291 // ChromeClient or platform. As of October 2011, all client |
292 // implementations don't use text direction information for | 292 // implementations don't use text direction information for |
293 // ChromeClient::setToolTip. We'll work on tooltip text | 293 // ChromeClient::setToolTip. We'll work on tooltip text |
294 // direction during bidi cleanup in form inputs. | 294 // direction during bidi cleanup in form inputs. |
295 toolTipDirection = LTR; | 295 toolTipDirection = LTR; |
296 } | 296 } |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 } | 381 } |
382 | 382 |
383 void Chrome::notifyPopupOpeningObservers() const | 383 void Chrome::notifyPopupOpeningObservers() const |
384 { | 384 { |
385 const Vector<PopupOpeningObserver*> observers(m_popupOpeningObservers); | 385 const Vector<PopupOpeningObserver*> observers(m_popupOpeningObservers); |
386 for (size_t i = 0; i < observers.size(); ++i) | 386 for (size_t i = 0; i < observers.size(); ++i) |
387 observers[i]->willOpenPopup(); | 387 observers[i]->willOpenPopup(); |
388 } | 388 } |
389 | 389 |
390 } // namespace WebCore | 390 } // namespace WebCore |
OLD | NEW |