OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll <knoll@kde.org> | 2 * Copyright (C) 1999 Lars Knoll <knoll@kde.org> |
3 * Copyright (C) 1999 Antti Koivisto <koivisto@kde.org> | 3 * Copyright (C) 1999 Antti Koivisto <koivisto@kde.org> |
4 * Copyright (C) 2000 Dirk Mueller <mueller@kde.org> | 4 * Copyright (C) 2000 Dirk Mueller <mueller@kde.org> |
5 * Copyright (C) 2006 Allan Sandfeld Jensen <kde@carewolf.com> | 5 * Copyright (C) 2006 Allan Sandfeld Jensen <kde@carewolf.com> |
6 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 6 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
8 * Copyright (C) 2010 Google Inc. All rights reserved. | 8 * Copyright (C) 2010 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> | 9 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> |
10 * | 10 * |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 ASSERT(m_layoutObject); | 93 ASSERT(m_layoutObject); |
94 if (m_cachedImage) | 94 if (m_cachedImage) |
95 m_cachedImage->setContainerSizeForLayoutObject(m_layoutObject, imageCont
ainerSize, m_layoutObject->style()->effectiveZoom()); | 95 m_cachedImage->setContainerSizeForLayoutObject(m_layoutObject, imageCont
ainerSize, m_layoutObject->style()->effectiveZoom()); |
96 } | 96 } |
97 | 97 |
98 LayoutSize LayoutImageResource::getImageSize(float multiplier, ImageResource::Si
zeType type) const | 98 LayoutSize LayoutImageResource::getImageSize(float multiplier, ImageResource::Si
zeType type) const |
99 { | 99 { |
100 if (!m_cachedImage) | 100 if (!m_cachedImage) |
101 return LayoutSize(); | 101 return LayoutSize(); |
102 LayoutSize size = m_cachedImage->imageSizeForLayoutObject(m_layoutObject, mu
ltiplier, type); | 102 LayoutSize size = m_cachedImage->imageSizeForLayoutObject(m_layoutObject, mu
ltiplier, type); |
103 if (m_layoutObject && m_layoutObject->isLayoutImage()) | 103 if (m_layoutObject && m_layoutObject->isLayoutImage() && size.width() && siz
e.height()) |
104 size.scale(toLayoutImage(m_layoutObject)->imageDevicePixelRatio()); | 104 size.scale(toLayoutImage(m_layoutObject)->imageDevicePixelRatio()); |
105 return size; | 105 return size; |
106 } | 106 } |
107 | 107 |
108 } // namespace blink | 108 } // namespace blink |
OLD | NEW |