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

Unified Diff: Source/core/page/PageSerializer.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/page/PageSerializer.h ('k') | Source/core/style/StyleFetchedImage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/PageSerializer.cpp
diff --git a/Source/core/page/PageSerializer.cpp b/Source/core/page/PageSerializer.cpp
index 30462b3f66ec911d8577cd6206e25481aa66162a..96cf7eeb3edea9935bcf8bfcac2c007e08e4c950 100644
--- a/Source/core/page/PageSerializer.cpp
+++ b/Source/core/page/PageSerializer.cpp
@@ -521,32 +521,32 @@ void PageSerializer::retrieveResourcesForProperties(const StylePropertySet* styl
// image properties there might be.
unsigned propertyCount = styleDeclaration->propertyCount();
for (unsigned i = 0; i < propertyCount; ++i) {
- RefPtrWillBeRawPtr<CSSValue> cssValue = styleDeclaration->propertyAt(i).value();
- retrieveResourcesForCSSValue(cssValue.get(), document);
+ CSSValue cssValue = styleDeclaration->propertyAt(i).value();
+ retrieveResourcesForCSSValue(cssValue, document);
}
}
-void PageSerializer::retrieveResourcesForCSSValue(CSSValue* cssValue, Document& document)
+void PageSerializer::retrieveResourcesForCSSValue(CSSValue cssValue, Document& document)
{
- if (cssValue->isImageValue()) {
- CSSImageValue* imageValue = toCSSImageValue(cssValue);
- StyleImage* styleImage = imageValue->cachedOrPendingImage();
+ if (cssValue.isImageValue()) {
+ CSSImageValue& imageValue = toCSSImageValue(cssValue);
+ StyleImage* styleImage = imageValue.cachedOrPendingImage();
// Non cached-images are just place-holders and do not contain data.
if (!styleImage || !styleImage->isImageResource())
return;
addImageToResources(styleImage->cachedImage(), nullptr, styleImage->cachedImage()->url());
- } else if (cssValue->isFontFaceSrcValue()) {
- CSSFontFaceSrcValue* fontFaceSrcValue = toCSSFontFaceSrcValue(cssValue);
- if (fontFaceSrcValue->isLocal()) {
+ } else if (cssValue.isFontFaceSrcValue()) {
+ CSSFontFaceSrcValue& fontFaceSrcValue = toCSSFontFaceSrcValue(cssValue);
+ if (fontFaceSrcValue.isLocal()) {
return;
}
- addFontToResources(fontFaceSrcValue->fetch(&document));
- } else if (cssValue->isValueList()) {
- CSSValueList* cssValueList = toCSSValueList(cssValue);
- for (unsigned i = 0; i < cssValueList->length(); i++)
- retrieveResourcesForCSSValue(cssValueList->item(i), document);
+ addFontToResources(fontFaceSrcValue.fetch(&document));
+ } else if (cssValue.isValueList()) {
+ CSSValueList& cssValueList = toCSSValueList(cssValue);
+ for (unsigned i = 0; i < cssValueList.length(); i++)
+ retrieveResourcesForCSSValue(cssValueList.item(i), document);
}
}
« no previous file with comments | « Source/core/page/PageSerializer.h ('k') | Source/core/style/StyleFetchedImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698