| 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 Image* HitTestResult::image() const | 310 Image* HitTestResult::image() const |
| 311 { | 311 { |
| 312 Node* innerNodeOrImageMapImage = this->innerNodeOrImageMapImage(); | 312 Node* innerNodeOrImageMapImage = this->innerNodeOrImageMapImage(); |
| 313 if (!innerNodeOrImageMapImage) | 313 if (!innerNodeOrImageMapImage) |
| 314 return nullptr; | 314 return nullptr; |
| 315 | 315 |
| 316 LayoutObject* layoutObject = innerNodeOrImageMapImage->layoutObject(); | 316 LayoutObject* layoutObject = innerNodeOrImageMapImage->layoutObject(); |
| 317 if (layoutObject && layoutObject->isImage()) { | 317 if (layoutObject && layoutObject->isImage()) { |
| 318 LayoutImage* image = toLayoutImage(layoutObject); | 318 LayoutImage* image = toLayoutImage(layoutObject); |
| 319 if (image->cachedImage() && !image->cachedImage()->errorOccurred()) | 319 if (image->cachedImage() && !image->cachedImage()->errorOccurred()) |
| 320 return image->cachedImage()->imageForLayoutObject(image); | 320 return image->cachedImage()->image(); |
| 321 } | 321 } |
| 322 | 322 |
| 323 return nullptr; | 323 return nullptr; |
| 324 } | 324 } |
| 325 | 325 |
| 326 IntRect HitTestResult::imageRect() const | 326 IntRect HitTestResult::imageRect() const |
| 327 { | 327 { |
| 328 if (!image()) | 328 if (!image()) |
| 329 return IntRect(); | 329 return IntRect(); |
| 330 return innerNodeOrImageMapImage()->layoutBox()->absoluteContentQuad().enclos
ingBoundingBox(); | 330 return innerNodeOrImageMapImage()->layoutBox()->absoluteContentQuad().enclos
ingBoundingBox(); |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 else if (isHTMLMapElement(m_innerNode)) | 526 else if (isHTMLMapElement(m_innerNode)) |
| 527 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement(); | 527 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement(); |
| 528 | 528 |
| 529 if (!imageMapImageElement) | 529 if (!imageMapImageElement) |
| 530 return m_innerNode.get(); | 530 return m_innerNode.get(); |
| 531 | 531 |
| 532 return imageMapImageElement; | 532 return imageMapImageElement; |
| 533 } | 533 } |
| 534 | 534 |
| 535 } // namespace blink | 535 } // namespace blink |
| OLD | NEW |