| 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 23 matching lines...) Expand all Loading... |
| 34 #include "core/html/HTMLImageElement.h" | 34 #include "core/html/HTMLImageElement.h" |
| 35 #include "core/html/HTMLInputElement.h" | 35 #include "core/html/HTMLInputElement.h" |
| 36 #include "core/html/HTMLMediaElement.h" | 36 #include "core/html/HTMLMediaElement.h" |
| 37 #include "core/html/parser/HTMLParserIdioms.h" | 37 #include "core/html/parser/HTMLParserIdioms.h" |
| 38 #include "core/loader/cache/CachedImage.h" | 38 #include "core/loader/cache/CachedImage.h" |
| 39 #include "core/page/Frame.h" | 39 #include "core/page/Frame.h" |
| 40 #include "core/page/FrameTree.h" | 40 #include "core/page/FrameTree.h" |
| 41 #include "core/platform/Scrollbar.h" | 41 #include "core/platform/Scrollbar.h" |
| 42 #include "core/rendering/HitTestLocation.h" | 42 #include "core/rendering/HitTestLocation.h" |
| 43 #include "core/rendering/RenderImage.h" | 43 #include "core/rendering/RenderImage.h" |
| 44 #include "core/svg/SVGImageElement.h" |
| 44 | 45 |
| 45 namespace WebCore { | 46 namespace WebCore { |
| 46 | 47 |
| 47 using namespace HTMLNames; | 48 using namespace HTMLNames; |
| 48 | 49 |
| 49 HitTestResult::HitTestResult() | 50 HitTestResult::HitTestResult() |
| 50 : m_isOverWidget(false) | 51 : m_isOverWidget(false) |
| 51 { | 52 { |
| 52 } | 53 } |
| 53 | 54 |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 return KURL(); | 283 return KURL(); |
| 283 | 284 |
| 284 if (!(m_innerNonSharedNode->renderer() && m_innerNonSharedNode->renderer()->
isImage())) | 285 if (!(m_innerNonSharedNode->renderer() && m_innerNonSharedNode->renderer()->
isImage())) |
| 285 return KURL(); | 286 return KURL(); |
| 286 | 287 |
| 287 AtomicString urlString; | 288 AtomicString urlString; |
| 288 if (m_innerNonSharedNode->hasTagName(embedTag) | 289 if (m_innerNonSharedNode->hasTagName(embedTag) |
| 289 || m_innerNonSharedNode->hasTagName(imgTag) | 290 || m_innerNonSharedNode->hasTagName(imgTag) |
| 290 || m_innerNonSharedNode->hasTagName(inputTag) | 291 || m_innerNonSharedNode->hasTagName(inputTag) |
| 291 || m_innerNonSharedNode->hasTagName(objectTag) | 292 || m_innerNonSharedNode->hasTagName(objectTag) |
| 292 || m_innerNonSharedNode->hasTagName(SVGNames::imageTag) | 293 || isSVGImageElement(m_innerNonSharedNode.get()) |
| 293 ) { | 294 ) { |
| 294 Element* element = toElement(m_innerNonSharedNode.get()); | 295 Element* element = toElement(m_innerNonSharedNode.get()); |
| 295 urlString = element->imageSourceURL(); | 296 urlString = element->imageSourceURL(); |
| 296 } else | 297 } else |
| 297 return KURL(); | 298 return KURL(); |
| 298 | 299 |
| 299 return m_innerNonSharedNode->document()->completeURL(stripLeadingAndTrailing
HTMLSpaces(urlString)); | 300 return m_innerNonSharedNode->document()->completeURL(stripLeadingAndTrailing
HTMLSpaces(urlString)); |
| 300 } | 301 } |
| 301 | 302 |
| 302 KURL HitTestResult::absoluteMediaURL() const | 303 KURL HitTestResult::absoluteMediaURL() const |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 { | 488 { |
| 488 NodeRenderingTraversal::ParentDetails details; | 489 NodeRenderingTraversal::ParentDetails details; |
| 489 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa
rent(node, &details)) | 490 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa
rent(node, &details)) |
| 490 if (node->isElementNode()) | 491 if (node->isElementNode()) |
| 491 return toElement(node); | 492 return toElement(node); |
| 492 | 493 |
| 493 return 0; | 494 return 0; |
| 494 } | 495 } |
| 495 | 496 |
| 496 } // namespace WebCore | 497 } // namespace WebCore |
| OLD | NEW |