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

Unified Diff: third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp

Issue 2160483002: Make CSSStyleValue::toCSSValue() return a const CSSValue* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_make_cssvaluepair_take_const
Patch Set: 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/cssom/InlineStylePropertyMap.cpp
diff --git a/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp b/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp
index 0a1c69be6f52d72d113d6420309ef58fd57587e8..b0fa9cbcf240ff5bfcee938c5760ac1e627d4cdf 100644
--- a/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp
@@ -21,7 +21,7 @@ namespace blink {
namespace {
-CSSValue* styleValueToCSSValue(CSSPropertyID propertyID, const CSSStyleValue& styleValue)
+const CSSValue* styleValueToCSSValue(CSSPropertyID propertyID, const CSSStyleValue& styleValue)
{
if (!CSSOMTypes::propertyCanTake(propertyID, styleValue))
return nullptr;
@@ -62,7 +62,7 @@ Vector<String> InlineStylePropertyMap::getProperties()
void InlineStylePropertyMap::set(CSSPropertyID propertyID, CSSStyleValueOrCSSStyleValueSequenceOrString& item, ExceptionState& exceptionState)
{
if (item.isCSSStyleValue()) {
- CSSValue* cssValue = styleValueToCSSValue(propertyID, *item.getAsCSSStyleValue());
+ const CSSValue* cssValue = styleValueToCSSValue(propertyID, *item.getAsCSSStyleValue());
if (!cssValue) {
exceptionState.throwTypeError("Invalid type for property");
return;
@@ -78,7 +78,7 @@ void InlineStylePropertyMap::set(CSSPropertyID propertyID, CSSStyleValueOrCSSSty
CSSValueList* valueList = CSSValueList::createSpaceSeparated();
CSSStyleValueVector styleValueVector = item.getAsCSSStyleValueSequence();
for (const Member<CSSStyleValue> value : styleValueVector) {
- CSSValue* cssValue = styleValueToCSSValue(propertyID, *value);
+ const CSSValue* cssValue = styleValueToCSSValue(propertyID, *value);
if (!cssValue) {
exceptionState.throwTypeError("Invalid type for property");
return;
@@ -113,7 +113,7 @@ void InlineStylePropertyMap::append(CSSPropertyID propertyID, CSSStyleValueOrCSS
}
if (item.isCSSStyleValue()) {
- CSSValue* cssValue = styleValueToCSSValue(propertyID, *item.getAsCSSStyleValue());
+ const CSSValue* cssValue = styleValueToCSSValue(propertyID, *item.getAsCSSStyleValue());
if (!cssValue) {
exceptionState.throwTypeError("Invalid type for property");
return;
@@ -121,7 +121,7 @@ void InlineStylePropertyMap::append(CSSPropertyID propertyID, CSSStyleValueOrCSS
cssValueList->append(*cssValue);
} else if (item.isCSSStyleValueSequence()) {
for (CSSStyleValue* styleValue : item.getAsCSSStyleValueSequence()) {
- CSSValue* cssValue = styleValueToCSSValue(propertyID, *styleValue);
+ const CSSValue* cssValue = styleValueToCSSValue(propertyID, *styleValue);
if (!cssValue) {
exceptionState.throwTypeError("Invalid type for property");
return;
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/CSSUnsupportedStyleValue.cpp ('k') | third_party/WebKit/Source/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698