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

Unified Diff: third_party/WebKit/Source/core/css/StylePropertySet.cpp

Issue 2035373002: Made StylePropertySet::getPropertyCSSValue return a const CSSValue* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_fix_cssparser_font_face_descriptor_to_return_const
Patch Set: Rebase Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/StylePropertySet.cpp
diff --git a/third_party/WebKit/Source/core/css/StylePropertySet.cpp b/third_party/WebKit/Source/core/css/StylePropertySet.cpp
index c4641700f28adbe9fe27c58a544fd6d93e126394..9533911666ec128ed30bbdb911936ba9fcebfd1c 100644
--- a/third_party/WebKit/Source/core/css/StylePropertySet.cpp
+++ b/third_party/WebKit/Source/core/css/StylePropertySet.cpp
@@ -164,7 +164,7 @@ static String serializeShorthand(const StylePropertySet&, const AtomicString& cu
template<typename T>
String StylePropertySet::getPropertyValue(T property) const
{
- CSSValue* value = getPropertyCSSValue(property);
+ const CSSValue* value = getPropertyCSSValue(property);
if (value)
return value->cssText();
return serializeShorthand(*this, property);
@@ -173,15 +173,15 @@ template CORE_EXPORT String StylePropertySet::getPropertyValue<CSSPropertyID>(CS
template CORE_EXPORT String StylePropertySet::getPropertyValue<AtomicString>(AtomicString) const;
template<typename T>
-CSSValue* StylePropertySet::getPropertyCSSValue(T property) const
+const CSSValue* StylePropertySet::getPropertyCSSValue(T property) const
{
int foundPropertyIndex = findPropertyIndex(property);
if (foundPropertyIndex == -1)
return nullptr;
return propertyAt(foundPropertyIndex).value();
}
-template CORE_EXPORT CSSValue* StylePropertySet::getPropertyCSSValue<CSSPropertyID>(CSSPropertyID) const;
-template CORE_EXPORT CSSValue* StylePropertySet::getPropertyCSSValue<AtomicString>(AtomicString) const;
+template CORE_EXPORT const CSSValue* StylePropertySet::getPropertyCSSValue<CSSPropertyID>(CSSPropertyID) const;
+template CORE_EXPORT const CSSValue* StylePropertySet::getPropertyCSSValue<AtomicString>(AtomicString) const;
DEFINE_TRACE(StylePropertySet)
{
@@ -501,7 +501,7 @@ MutableStylePropertySet* StylePropertySet::copyPropertiesInSet(const Vector<CSSP
HeapVector<CSSProperty, 256> list;
list.reserveInitialCapacity(properties.size());
for (unsigned i = 0; i < properties.size(); ++i) {
- CSSValue* value = getPropertyCSSValue(properties[i]);
+ const CSSValue* value = getPropertyCSSValue(properties[i]);
if (value)
list.append(CSSProperty(properties[i], *value, false));
}

Powered by Google App Engine
This is Rietveld 408576698