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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSCursorImageValue.cpp

Issue 1387113002: Change StyleResolverState.styleImage() to take a const CSSValue& (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TODOs to replace the members with const members Created 5 years, 2 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) 2006 Rob Buis <buis@kde.org> 2 * Copyright (C) 2006 Rob Buis <buis@kde.org>
3 * (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> 3 * (C) 2008 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 118
119 bool CSSCursorImageValue::isCachePending(float deviceScaleFactor) const 119 bool CSSCursorImageValue::isCachePending(float deviceScaleFactor) const
120 { 120 {
121 // Need to delegate completely so that changes in device scale factor can be handled appropriately. 121 // Need to delegate completely so that changes in device scale factor can be handled appropriately.
122 if (m_imageValue->isImageSetValue()) 122 if (m_imageValue->isImageSetValue())
123 return toCSSImageSetValue(*m_imageValue).isCachePending(deviceScaleFacto r); 123 return toCSSImageSetValue(*m_imageValue).isCachePending(deviceScaleFacto r);
124 return m_isCachePending; 124 return m_isCachePending;
125 } 125 }
126 126
127 StyleImage* CSSCursorImageValue::cachedImage(float deviceScaleFactor) 127 StyleImage* CSSCursorImageValue::cachedImage(float deviceScaleFactor) const
128 { 128 {
129 ASSERT(!isCachePending(deviceScaleFactor)); 129 ASSERT(!isCachePending(deviceScaleFactor));
130 130
131 if (m_imageValue->isImageSetValue()) 131 if (m_imageValue->isImageSetValue())
132 return toCSSImageSetValue(*m_imageValue).cachedImageSet(deviceScaleFacto r); 132 return toCSSImageSetValue(*m_imageValue).cachedImageSet(deviceScaleFacto r);
133 return m_cachedImage.get(); 133 return m_cachedImage.get();
134 } 134 }
135 135
136 StyleImage* CSSCursorImageValue::cacheImage(Document* document, float deviceScal eFactor) 136 StyleImage* CSSCursorImageValue::cacheImage(Document* document, float deviceScal eFactor)
137 { 137 {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 } 201 }
202 202
203 DEFINE_TRACE_AFTER_DISPATCH(CSSCursorImageValue) 203 DEFINE_TRACE_AFTER_DISPATCH(CSSCursorImageValue)
204 { 204 {
205 visitor->trace(m_imageValue); 205 visitor->trace(m_imageValue);
206 visitor->trace(m_cachedImage); 206 visitor->trace(m_cachedImage);
207 CSSValue::traceAfterDispatch(visitor); 207 CSSValue::traceAfterDispatch(visitor);
208 } 208 }
209 209
210 } // namespace blink 210 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698