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

Side by Side Diff: third_party/WebKit/Source/core/style/StyleFetchedImageSet.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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 return m_imageSetValue; 73 return m_imageSetValue;
74 } 74 }
75 75
76 PassRefPtrWillBeRawPtr<CSSValue> StyleFetchedImageSet::computedCSSValue() const 76 PassRefPtrWillBeRawPtr<CSSValue> StyleFetchedImageSet::computedCSSValue() const
77 { 77 {
78 return m_imageSetValue->valueWithURLsMadeAbsolute(); 78 return m_imageSetValue->valueWithURLsMadeAbsolute();
79 } 79 }
80 80
81 bool StyleFetchedImageSet::canRender() const 81 bool StyleFetchedImageSet::canRender() const
82 { 82 {
83 return !m_bestFitImage->errorOccurred() && !m_bestFitImage->image()->isNull( ); 83 return !m_bestFitImage->errorOccurred() && !m_bestFitImage->getImage()->isNu ll();
84 } 84 }
85 85
86 bool StyleFetchedImageSet::isLoaded() const 86 bool StyleFetchedImageSet::isLoaded() const
87 { 87 {
88 return m_bestFitImage->isLoaded(); 88 return m_bestFitImage->isLoaded();
89 } 89 }
90 90
91 bool StyleFetchedImageSet::errorOccurred() const 91 bool StyleFetchedImageSet::errorOccurred() const
92 { 92 {
93 return m_bestFitImage->errorOccurred(); 93 return m_bestFitImage->errorOccurred();
94 } 94 }
95 95
96 LayoutSize StyleFetchedImageSet::imageSize(const LayoutObject*, float multiplier , const LayoutSize& defaultObjectSize) const 96 LayoutSize StyleFetchedImageSet::imageSize(const LayoutObject*, float multiplier , const LayoutSize& defaultObjectSize) const
97 { 97 {
98 if (m_bestFitImage->image() && m_bestFitImage->image()->isSVGImage()) 98 if (m_bestFitImage->getImage() && m_bestFitImage->getImage()->isSVGImage())
99 return imageSizeForSVGImage(toSVGImage(m_bestFitImage->image()), multipl ier, defaultObjectSize); 99 return imageSizeForSVGImage(toSVGImage(m_bestFitImage->getImage()), mult iplier, defaultObjectSize);
100 100
101 // Image orientation should only be respected for content images, 101 // Image orientation should only be respected for content images,
102 // not decorative ones such as StyleImage (backgrounds, 102 // not decorative ones such as StyleImage (backgrounds,
103 // border-image, etc.) 103 // border-image, etc.)
104 // 104 //
105 // https://drafts.csswg.org/css-images-3/#the-image-orientation 105 // https://drafts.csswg.org/css-images-3/#the-image-orientation
106 LayoutSize scaledImageSize = m_bestFitImage->imageSize(DoNotRespectImageOrie ntation, multiplier); 106 LayoutSize scaledImageSize = m_bestFitImage->imageSize(DoNotRespectImageOrie ntation, multiplier);
107 scaledImageSize.scale(1 / m_imageScaleFactor); 107 scaledImageSize.scale(1 / m_imageScaleFactor);
108 return scaledImageSize; 108 return scaledImageSize;
109 } 109 }
(...skipping 13 matching lines...) Expand all
123 m_bestFitImage->addClient(layoutObject); 123 m_bestFitImage->addClient(layoutObject);
124 } 124 }
125 125
126 void StyleFetchedImageSet::removeClient(LayoutObject* layoutObject) 126 void StyleFetchedImageSet::removeClient(LayoutObject* layoutObject)
127 { 127 {
128 m_bestFitImage->removeClient(layoutObject); 128 m_bestFitImage->removeClient(layoutObject);
129 } 129 }
130 130
131 PassRefPtr<Image> StyleFetchedImageSet::image(const LayoutObject*, const IntSize & containerSize, float zoom) const 131 PassRefPtr<Image> StyleFetchedImageSet::image(const LayoutObject*, const IntSize & containerSize, float zoom) const
132 { 132 {
133 if (!m_bestFitImage->image()->isSVGImage()) 133 if (!m_bestFitImage->getImage()->isSVGImage())
134 return m_bestFitImage->image(); 134 return m_bestFitImage->getImage();
135 135
136 return SVGImageForContainer::create(toSVGImage(m_bestFitImage->image()), con tainerSize, zoom, m_url); 136 return SVGImageForContainer::create(toSVGImage(m_bestFitImage->getImage()), containerSize, zoom, m_url);
137 } 137 }
138 138
139 bool StyleFetchedImageSet::knownToBeOpaque(const LayoutObject* layoutObject) con st 139 bool StyleFetchedImageSet::knownToBeOpaque(const LayoutObject* layoutObject) con st
140 { 140 {
141 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", " data", InspectorPaintImageEvent::data(layoutObject, *m_bestFitImage.get())); 141 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", " data", InspectorPaintImageEvent::data(layoutObject, *m_bestFitImage.get()));
142 return m_bestFitImage->image()->currentFrameKnownToBeOpaque(Image::PreCacheM etadata); 142 return m_bestFitImage->getImage()->currentFrameKnownToBeOpaque(Image::PreCac heMetadata);
143 } 143 }
144 144
145 DEFINE_TRACE(StyleFetchedImageSet) 145 DEFINE_TRACE(StyleFetchedImageSet)
146 { 146 {
147 visitor->trace(m_bestFitImage); 147 visitor->trace(m_bestFitImage);
148 visitor->trace(m_imageSetValue); 148 visitor->trace(m_imageSetValue);
149 StyleImage::trace(visitor); 149 StyleImage::trace(visitor);
150 } 150 }
151 151
152 } // namespace blink 152 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698