OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. |
5 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 if (!complete() || !cachedImage()) { | 596 if (!complete() || !cachedImage()) { |
597 *status = IncompleteSourceImageStatus; | 597 *status = IncompleteSourceImageStatus; |
598 return nullptr; | 598 return nullptr; |
599 } | 599 } |
600 | 600 |
601 if (cachedImage()->errorOccurred()) { | 601 if (cachedImage()->errorOccurred()) { |
602 *status = UndecodableSourceImageStatus; | 602 *status = UndecodableSourceImageStatus; |
603 return nullptr; | 603 return nullptr; |
604 } | 604 } |
605 | 605 |
606 RefPtr<Image> sourceImage = cachedImage()->imageForLayoutObject(layoutObject
()); | 606 RefPtr<Image> sourceImage = cachedImage()->image(); |
607 | 607 |
608 // We need to synthesize a container size if a layoutObject is not available
to provide one. | 608 // We need to synthesize a container size if a layoutObject is not available
to provide one. |
609 if (!layoutObject() && sourceImage->usesContainerSize()) | 609 if (!layoutObject() && sourceImage->usesContainerSize()) |
610 sourceImage->setContainerSize(sourceImage->size()); | 610 sourceImage->setContainerSize(sourceImage->size()); |
611 | 611 |
612 *status = NormalSourceImageStatus; | 612 *status = NormalSourceImageStatus; |
613 return sourceImage->imageForDefaultFrame(); | 613 return sourceImage->imageForDefaultFrame(); |
614 } | 614 } |
615 | 615 |
616 bool HTMLImageElement::wouldTaintOrigin(SecurityOrigin* destinationSecurityOrigi
n) const | 616 bool HTMLImageElement::wouldTaintOrigin(SecurityOrigin* destinationSecurityOrigi
n) const |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 ensureUserAgentShadowRoot(); | 769 ensureUserAgentShadowRoot(); |
770 } | 770 } |
771 | 771 |
772 bool HTMLImageElement::isOpaque() const | 772 bool HTMLImageElement::isOpaque() const |
773 { | 773 { |
774 Image* image = const_cast<HTMLImageElement*>(this)->imageContents(); | 774 Image* image = const_cast<HTMLImageElement*>(this)->imageContents(); |
775 return image && image->currentFrameKnownToBeOpaque(); | 775 return image && image->currentFrameKnownToBeOpaque(); |
776 } | 776 } |
777 | 777 |
778 } | 778 } |
OLD | NEW |