| 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 17 matching lines...) Expand all Loading... |
| 28 #include "core/dom/shadow/ShadowRoot.h" | 28 #include "core/dom/shadow/ShadowRoot.h" |
| 29 #include "core/editing/FrameSelection.h" | 29 #include "core/editing/FrameSelection.h" |
| 30 #include "core/fetch/ImageResource.h" | 30 #include "core/fetch/ImageResource.h" |
| 31 #include "core/frame/LocalFrame.h" | 31 #include "core/frame/LocalFrame.h" |
| 32 #include "core/html/HTMLAnchorElement.h" | 32 #include "core/html/HTMLAnchorElement.h" |
| 33 #include "core/html/HTMLImageElement.h" | 33 #include "core/html/HTMLImageElement.h" |
| 34 #include "core/html/HTMLInputElement.h" | 34 #include "core/html/HTMLInputElement.h" |
| 35 #include "core/html/HTMLMediaElement.h" | 35 #include "core/html/HTMLMediaElement.h" |
| 36 #include "core/html/HTMLTextAreaElement.h" | 36 #include "core/html/HTMLTextAreaElement.h" |
| 37 #include "core/html/parser/HTMLParserIdioms.h" | 37 #include "core/html/parser/HTMLParserIdioms.h" |
| 38 #include "core/layout/LayoutImage.h" |
| 38 #include "core/page/FrameTree.h" | 39 #include "core/page/FrameTree.h" |
| 39 #include "core/rendering/RenderImage.h" | |
| 40 #include "core/rendering/RenderTextFragment.h" | 40 #include "core/rendering/RenderTextFragment.h" |
| 41 #include "core/svg/SVGElement.h" | 41 #include "core/svg/SVGElement.h" |
| 42 #include "platform/scroll/Scrollbar.h" | 42 #include "platform/scroll/Scrollbar.h" |
| 43 | 43 |
| 44 namespace blink { | 44 namespace blink { |
| 45 | 45 |
| 46 using namespace HTMLNames; | 46 using namespace HTMLNames; |
| 47 | 47 |
| 48 HitTestResult::HitTestResult() | 48 HitTestResult::HitTestResult() |
| 49 : m_isOverWidget(false) | 49 : m_isOverWidget(false) |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 return nullAtom; | 251 return nullAtom; |
| 252 } | 252 } |
| 253 | 253 |
| 254 Image* HitTestResult::image() const | 254 Image* HitTestResult::image() const |
| 255 { | 255 { |
| 256 if (!m_innerNonSharedNode) | 256 if (!m_innerNonSharedNode) |
| 257 return 0; | 257 return 0; |
| 258 | 258 |
| 259 LayoutObject* renderer = m_innerNonSharedNode->renderer(); | 259 LayoutObject* renderer = m_innerNonSharedNode->renderer(); |
| 260 if (renderer && renderer->isImage()) { | 260 if (renderer && renderer->isImage()) { |
| 261 RenderImage* image = toRenderImage(renderer); | 261 LayoutImage* image = toLayoutImage(renderer); |
| 262 if (image->cachedImage() && !image->cachedImage()->errorOccurred()) | 262 if (image->cachedImage() && !image->cachedImage()->errorOccurred()) |
| 263 return image->cachedImage()->imageForRenderer(image); | 263 return image->cachedImage()->imageForRenderer(image); |
| 264 } | 264 } |
| 265 | 265 |
| 266 return 0; | 266 return 0; |
| 267 } | 267 } |
| 268 | 268 |
| 269 IntRect HitTestResult::imageRect() const | 269 IntRect HitTestResult::imageRect() const |
| 270 { | 270 { |
| 271 if (!image()) | 271 if (!image()) |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 { | 466 { |
| 467 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa
rent(*node)) { | 467 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa
rent(*node)) { |
| 468 if (node->isElementNode()) | 468 if (node->isElementNode()) |
| 469 return toElement(node); | 469 return toElement(node); |
| 470 } | 470 } |
| 471 | 471 |
| 472 return 0; | 472 return 0; |
| 473 } | 473 } |
| 474 | 474 |
| 475 } // namespace blink | 475 } // namespace blink |
| OLD | NEW |