Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutImageResource.cpp

Issue 1774943003: blink: Rename platform/ methods to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-platform: rebase-yayyyyyyyy Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 77 }
78 } 78 }
79 79
80 void LayoutImageResource::resetAnimation() 80 void LayoutImageResource::resetAnimation()
81 { 81 {
82 ASSERT(m_layoutObject); 82 ASSERT(m_layoutObject);
83 83
84 if (!m_cachedImage) 84 if (!m_cachedImage)
85 return; 85 return;
86 86
87 m_cachedImage->image()->resetAnimation(); 87 m_cachedImage->getImage()->resetAnimation();
88 88
89 m_layoutObject->setShouldDoFullPaintInvalidation(); 89 m_layoutObject->setShouldDoFullPaintInvalidation();
90 } 90 }
91 91
92 LayoutSize LayoutImageResource::imageSize(float multiplier) const 92 LayoutSize LayoutImageResource::imageSize(float multiplier) const
93 { 93 {
94 if (!m_cachedImage) 94 if (!m_cachedImage)
95 return LayoutSize(); 95 return LayoutSize();
96 LayoutSize size = m_cachedImage->imageSize(LayoutObject::shouldRespectImageO rientation(m_layoutObject), multiplier); 96 LayoutSize size = m_cachedImage->imageSize(LayoutObject::shouldRespectImageO rientation(m_layoutObject), multiplier);
97 if (m_layoutObject && m_layoutObject->isLayoutImage() && size.width() && siz e.height()) 97 if (m_layoutObject && m_layoutObject->isLayoutImage() && size.width() && siz e.height())
98 size.scale(toLayoutImage(m_layoutObject)->imageDevicePixelRatio()); 98 size.scale(toLayoutImage(m_layoutObject)->imageDevicePixelRatio());
99 return size; 99 return size;
100 } 100 }
101 101
102 PassRefPtr<Image> LayoutImageResource::image(const IntSize& containerSize, float zoom) const 102 PassRefPtr<Image> LayoutImageResource::image(const IntSize& containerSize, float zoom) const
103 { 103 {
104 if (!m_cachedImage) 104 if (!m_cachedImage)
105 return Image::nullImage(); 105 return Image::nullImage();
106 106
107 if (!m_cachedImage->image()->isSVGImage()) 107 if (!m_cachedImage->getImage()->isSVGImage())
108 return m_cachedImage->image(); 108 return m_cachedImage->getImage();
109 109
110 KURL url; 110 KURL url;
111 SVGImage* svgImage = toSVGImage(m_cachedImage->image()); 111 SVGImage* svgImage = toSVGImage(m_cachedImage->getImage());
112 Node* node = m_layoutObject->node(); 112 Node* node = m_layoutObject->node();
113 if (node && node->isElementNode()) { 113 if (node && node->isElementNode()) {
114 const AtomicString& urlString = toElement(node)->imageSourceURL(); 114 const AtomicString& urlString = toElement(node)->imageSourceURL();
115 url = node->document().completeURL(urlString); 115 url = node->document().completeURL(urlString);
116 } 116 }
117 return SVGImageForContainer::create(svgImage, containerSize, zoom, url); 117 return SVGImageForContainer::create(svgImage, containerSize, zoom, url);
118 } 118 }
119 119
120 bool LayoutImageResource::maybeAnimated() const 120 bool LayoutImageResource::maybeAnimated() const
121 { 121 {
122 Image* image = m_cachedImage ? m_cachedImage->image() : Image::nullImage(); 122 Image* image = m_cachedImage ? m_cachedImage->getImage() : Image::nullImage( );
123 return image->maybeAnimated(); 123 return image->maybeAnimated();
124 } 124 }
125 125
126 } // namespace blink 126 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutImage.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698