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

Side by Side Diff: third_party/WebKit/Source/core/style/StyleFetchedImage.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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 return CSSImageValue::create(m_image->url(), const_cast<StyleFetchedImage*>( this)); 71 return CSSImageValue::create(m_image->url(), const_cast<StyleFetchedImage*>( this));
72 } 72 }
73 73
74 PassRefPtrWillBeRawPtr<CSSValue> StyleFetchedImage::computedCSSValue() const 74 PassRefPtrWillBeRawPtr<CSSValue> StyleFetchedImage::computedCSSValue() const
75 { 75 {
76 return cssValue(); 76 return cssValue();
77 } 77 }
78 78
79 bool StyleFetchedImage::canRender() const 79 bool StyleFetchedImage::canRender() const
80 { 80 {
81 return !m_image->errorOccurred() && !m_image->image()->isNull(); 81 return !m_image->errorOccurred() && !m_image->getImage()->isNull();
82 } 82 }
83 83
84 bool StyleFetchedImage::isLoaded() const 84 bool StyleFetchedImage::isLoaded() const
85 { 85 {
86 return m_image->isLoaded(); 86 return m_image->isLoaded();
87 } 87 }
88 88
89 bool StyleFetchedImage::errorOccurred() const 89 bool StyleFetchedImage::errorOccurred() const
90 { 90 {
91 return m_image->errorOccurred(); 91 return m_image->errorOccurred();
92 } 92 }
93 93
94 LayoutSize StyleFetchedImage::imageSize(const LayoutObject* layoutObject, float multiplier, const LayoutSize& defaultObjectSize) const 94 LayoutSize StyleFetchedImage::imageSize(const LayoutObject* layoutObject, float multiplier, const LayoutSize& defaultObjectSize) const
95 { 95 {
96 if (m_image->image() && m_image->image()->isSVGImage()) 96 if (m_image->getImage() && m_image->getImage()->isSVGImage())
97 return imageSizeForSVGImage(toSVGImage(m_image->image()), multiplier, de faultObjectSize); 97 return imageSizeForSVGImage(toSVGImage(m_image->getImage()), multiplier, defaultObjectSize);
98 98
99 // Image orientation should only be respected for content images, 99 // Image orientation should only be respected for content images,
100 // not decorative images such as StyleImage (backgrounds, 100 // not decorative images such as StyleImage (backgrounds,
101 // border-image, etc.) 101 // border-image, etc.)
102 // 102 //
103 // https://drafts.csswg.org/css-images-3/#the-image-orientation 103 // https://drafts.csswg.org/css-images-3/#the-image-orientation
104 return m_image->imageSize(DoNotRespectImageOrientation, multiplier); 104 return m_image->imageSize(DoNotRespectImageOrientation, multiplier);
105 } 105 }
106 106
107 bool StyleFetchedImage::imageHasRelativeSize() const 107 bool StyleFetchedImage::imageHasRelativeSize() const
(...skipping 11 matching lines...) Expand all
119 m_image->addClient(layoutObject); 119 m_image->addClient(layoutObject);
120 } 120 }
121 121
122 void StyleFetchedImage::removeClient(LayoutObject* layoutObject) 122 void StyleFetchedImage::removeClient(LayoutObject* layoutObject)
123 { 123 {
124 m_image->removeClient(layoutObject); 124 m_image->removeClient(layoutObject);
125 } 125 }
126 126
127 void StyleFetchedImage::notifyFinished(Resource* resource) 127 void StyleFetchedImage::notifyFinished(Resource* resource)
128 { 128 {
129 if (m_document && m_image && m_image->image() && m_image->image()->isSVGImag e()) 129 if (m_document && m_image && m_image->getImage() && m_image->getImage()->isS VGImage())
130 toSVGImage(m_image->image())->updateUseCounters(*m_document); 130 toSVGImage(m_image->getImage())->updateUseCounters(*m_document);
131 // Oilpan: do not prolong the Document's lifetime. 131 // Oilpan: do not prolong the Document's lifetime.
132 m_document.clear(); 132 m_document.clear();
133 } 133 }
134 134
135 PassRefPtr<Image> StyleFetchedImage::image(const LayoutObject*, const IntSize& c ontainerSize, float zoom) const 135 PassRefPtr<Image> StyleFetchedImage::image(const LayoutObject*, const IntSize& c ontainerSize, float zoom) const
136 { 136 {
137 if (!m_image->image()->isSVGImage()) 137 if (!m_image->getImage()->isSVGImage())
138 return m_image->image(); 138 return m_image->getImage();
139 139
140 return SVGImageForContainer::create(toSVGImage(m_image->image()), containerS ize, zoom, m_url); 140 return SVGImageForContainer::create(toSVGImage(m_image->getImage()), contain erSize, zoom, m_url);
141 } 141 }
142 142
143 bool StyleFetchedImage::knownToBeOpaque(const LayoutObject* layoutObject) const 143 bool StyleFetchedImage::knownToBeOpaque(const LayoutObject* layoutObject) const
144 { 144 {
145 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", " data", InspectorPaintImageEvent::data(layoutObject, *m_image.get())); 145 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", " data", InspectorPaintImageEvent::data(layoutObject, *m_image.get()));
146 return m_image->image()->currentFrameKnownToBeOpaque(Image::PreCacheMetadata ); 146 return m_image->getImage()->currentFrameKnownToBeOpaque(Image::PreCacheMetad ata);
147 } 147 }
148 148
149 DEFINE_TRACE(StyleFetchedImage) 149 DEFINE_TRACE(StyleFetchedImage)
150 { 150 {
151 visitor->trace(m_image); 151 visitor->trace(m_image);
152 visitor->trace(m_document); 152 visitor->trace(m_document);
153 StyleImage::trace(visitor); 153 StyleImage::trace(visitor);
154 } 154 }
155 155
156 } // namespace blink 156 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.cpp ('k') | third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698