OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved. |
3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 if (!title.isEmpty()) { | 241 if (!title.isEmpty()) { |
242 if (RenderObject* renderer = titleNode->renderer()) | 242 if (RenderObject* renderer = titleNode->renderer()) |
243 dir = renderer->style()->direction(); | 243 dir = renderer->style()->direction(); |
244 return title; | 244 return title; |
245 } | 245 } |
246 } | 246 } |
247 } | 247 } |
248 return String(); | 248 return String(); |
249 } | 249 } |
250 | 250 |
251 String HitTestResult::altDisplayString() const | 251 const AtomicString& HitTestResult::altDisplayString() const |
252 { | 252 { |
253 if (!m_innerNonSharedNode) | 253 if (!m_innerNonSharedNode) |
254 return String(); | 254 return nullAtom; |
255 | 255 |
256 if (m_innerNonSharedNode->hasTagName(imgTag)) { | 256 if (m_innerNonSharedNode->hasTagName(imgTag)) { |
257 HTMLImageElement* image = toHTMLImageElement(m_innerNonSharedNode); | 257 HTMLImageElement* image = toHTMLImageElement(m_innerNonSharedNode); |
258 return image->getAttribute(altAttr); | 258 return image->getAttribute(altAttr); |
259 } | 259 } |
260 | 260 |
261 if (m_innerNonSharedNode->hasTagName(inputTag)) { | 261 if (m_innerNonSharedNode->hasTagName(inputTag)) { |
262 HTMLInputElement* input = toHTMLInputElement(m_innerNonSharedNode); | 262 HTMLInputElement* input = toHTMLInputElement(m_innerNonSharedNode); |
263 return input->alt(); | 263 return input->alt(); |
264 } | 264 } |
265 | 265 |
266 return String(); | 266 return nullAtom; |
267 } | 267 } |
268 | 268 |
269 Image* HitTestResult::image() const | 269 Image* HitTestResult::image() const |
270 { | 270 { |
271 if (!m_innerNonSharedNode) | 271 if (!m_innerNonSharedNode) |
272 return 0; | 272 return 0; |
273 | 273 |
274 RenderObject* renderer = m_innerNonSharedNode->renderer(); | 274 RenderObject* renderer = m_innerNonSharedNode->renderer(); |
275 if (renderer && renderer->isImage()) { | 275 if (renderer && renderer->isImage()) { |
276 RenderImage* image = toRenderImage(renderer); | 276 RenderImage* image = toRenderImage(renderer); |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 { | 507 { |
508 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa
rent(node)) { | 508 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa
rent(node)) { |
509 if (node->isElementNode()) | 509 if (node->isElementNode()) |
510 return toElement(node); | 510 return toElement(node); |
511 } | 511 } |
512 | 512 |
513 return 0; | 513 return 0; |
514 } | 514 } |
515 | 515 |
516 } // namespace WebCore | 516 } // namespace WebCore |
OLD | NEW |