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

Unified Diff: Source/core/css/CSSImageSetValue.cpp

Issue 1164573002: CSSValue Immediates: Change CSSValue to an object instead of a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 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
« no previous file with comments | « Source/core/css/CSSImageGeneratorValue.cpp ('k') | Source/core/css/CSSImageValue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSImageSetValue.cpp
diff --git a/Source/core/css/CSSImageSetValue.cpp b/Source/core/css/CSSImageSetValue.cpp
index 414aab2ec2a7a1df20c2b05b1a31c91f746fb80c..d5d95b7e02967a71e29be306676be12167c27c7c 100644
--- a/Source/core/css/CSSImageSetValue.cpp
+++ b/Source/core/css/CSSImageSetValue.cpp
@@ -60,17 +60,17 @@ void CSSImageSetValue::fillImageSet()
size_t length = this->length();
size_t i = 0;
while (i < length) {
- CSSImageValue* imageValue = toCSSImageValue(item(i));
- String imageURL = imageValue->url();
+ CSSImageValue& imageValue = toCSSImageValue(item(i));
+ String imageURL = imageValue.url();
++i;
ASSERT_WITH_SECURITY_IMPLICATION(i < length);
- CSSValue* scaleFactorValue = item(i);
- float scaleFactor = toCSSPrimitiveValue(scaleFactorValue)->getFloatValue();
+ CSSValue scaleFactorValue = item(i);
+ float scaleFactor = toCSSPrimitiveValue(scaleFactorValue).getFloatValue();
ImageWithScale image;
image.imageURL = imageURL;
- image.referrer = SecurityPolicy::generateReferrer(imageValue->referrer().referrerPolicy, KURL(ParsedURLString, imageURL), imageValue->referrer().referrer);
+ image.referrer = SecurityPolicy::generateReferrer(imageValue.referrer().referrerPolicy, KURL(ParsedURLString, imageURL), imageValue.referrer().referrer);
image.scaleFactor = scaleFactor;
m_imagesInSet.append(image);
++i;
@@ -152,14 +152,14 @@ String CSSImageSetValue::customCSSText() const
if (i > 0)
result.appendLiteral(", ");
- const CSSValue* imageValue = item(i);
- result.append(imageValue->cssText());
+ const CSSValue imageValue = item(i);
+ result.append(imageValue.cssText());
result.append(' ');
++i;
ASSERT_WITH_SECURITY_IMPLICATION(i < length);
- const CSSValue* scaleFactorValue = item(i);
- result.append(scaleFactorValue->cssText());
+ const CSSValue scaleFactorValue = item(i);
+ result.append(scaleFactorValue.cssText());
// FIXME: Eventually the scale factor should contain it's own unit http://wkb.ug/100120.
// For now 'x' is hard-coded in the parser, so we hard-code it here too.
result.append('x');
« no previous file with comments | « Source/core/css/CSSImageGeneratorValue.cpp ('k') | Source/core/css/CSSImageValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698