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 15 matching lines...) Expand all Loading... |
26 */ | 26 */ |
27 | 27 |
28 #include "config.h" | 28 #include "config.h" |
29 #include "core/layout/LayoutImageResource.h" | 29 #include "core/layout/LayoutImageResource.h" |
30 | 30 |
31 #include "core/layout/LayoutImage.h" | 31 #include "core/layout/LayoutImage.h" |
32 | 32 |
33 namespace blink { | 33 namespace blink { |
34 | 34 |
35 LayoutImageResource::LayoutImageResource() | 35 LayoutImageResource::LayoutImageResource() |
36 : m_layoutObject(0) | 36 : m_layoutObject(nullptr) |
37 , m_cachedImage(0) | 37 , m_cachedImage(nullptr) |
38 { | 38 { |
39 } | 39 } |
40 | 40 |
41 LayoutImageResource::~LayoutImageResource() | 41 LayoutImageResource::~LayoutImageResource() |
42 { | 42 { |
43 } | 43 } |
44 | 44 |
45 void LayoutImageResource::initialize(LayoutObject* layoutObject) | 45 void LayoutImageResource::initialize(LayoutObject* layoutObject) |
46 { | 46 { |
47 ASSERT(!m_layoutObject); | 47 ASSERT(!m_layoutObject); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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()) |
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 |