| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 return String(); | 254 return String(); |
| 255 } | 255 } |
| 256 | 256 |
| 257 Image* HitTestResult::image() const | 257 Image* HitTestResult::image() const |
| 258 { | 258 { |
| 259 if (!m_innerNonSharedNode) | 259 if (!m_innerNonSharedNode) |
| 260 return 0; | 260 return 0; |
| 261 | 261 |
| 262 RenderObject* renderer = m_innerNonSharedNode->renderer(); | 262 RenderObject* renderer = m_innerNonSharedNode->renderer(); |
| 263 if (renderer && renderer->isImage()) { | 263 if (renderer && renderer->isImage()) { |
| 264 RenderImage* image = static_cast<WebCore::RenderImage*>(renderer); | 264 RenderImage* image = toRenderImage(renderer); |
| 265 if (image->cachedImage() && !image->cachedImage()->errorOccurred()) | 265 if (image->cachedImage() && !image->cachedImage()->errorOccurred()) |
| 266 return image->cachedImage()->imageForRenderer(image); | 266 return image->cachedImage()->imageForRenderer(image); |
| 267 } | 267 } |
| 268 | 268 |
| 269 return 0; | 269 return 0; |
| 270 } | 270 } |
| 271 | 271 |
| 272 IntRect HitTestResult::imageRect() const | 272 IntRect HitTestResult::imageRect() const |
| 273 { | 273 { |
| 274 if (!image()) | 274 if (!image()) |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 Element* HitTestResult::innerElement() const | 486 Element* HitTestResult::innerElement() const |
| 487 { | 487 { |
| 488 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa
rent(node)) | 488 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa
rent(node)) |
| 489 if (node->isElementNode()) | 489 if (node->isElementNode()) |
| 490 return toElement(node); | 490 return toElement(node); |
| 491 | 491 |
| 492 return 0; | 492 return 0; |
| 493 } | 493 } |
| 494 | 494 |
| 495 } // namespace WebCore | 495 } // namespace WebCore |
| OLD | NEW |