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

Unified Diff: Source/core/css/resolver/StyleResourceLoader.cpp

Issue 106763012: Code cleanup: Removing redundant function calls from loadPendingImage(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing lint errors Created 6 years, 12 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 | « no previous file | Source/core/rendering/RenderImageResource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResourceLoader.cpp
diff --git a/Source/core/css/resolver/StyleResourceLoader.cpp b/Source/core/css/resolver/StyleResourceLoader.cpp
index 04405c340a70040d910f743dd85e2a0c76b64aec..14ce9f06e52582666f08123ea9edf8fabd69e6cf 100644
--- a/Source/core/css/resolver/StyleResourceLoader.cpp
+++ b/Source/core/css/resolver/StyleResourceLoader.cpp
@@ -79,26 +79,21 @@ void StyleResourceLoader::loadPendingSVGDocuments(RenderStyle* renderStyle, cons
PassRefPtr<StyleImage> StyleResourceLoader::loadPendingImage(StylePendingImage* pendingImage, float deviceScaleFactor)
{
- if (pendingImage->cssImageValue()) {
- CSSImageValue* imageValue = pendingImage->cssImageValue();
+ if (CSSImageValue* imageValue = pendingImage->cssImageValue())
return imageValue->cachedImage(m_fetcher);
- }
- if (pendingImage->cssImageGeneratorValue()) {
- CSSImageGeneratorValue* imageGeneratorValue = pendingImage->cssImageGeneratorValue();
+ if (CSSImageGeneratorValue* imageGeneratorValue
+ = pendingImage->cssImageGeneratorValue()) {
imageGeneratorValue->loadSubimages(m_fetcher);
return StyleGeneratedImage::create(imageGeneratorValue);
}
- if (pendingImage->cssCursorImageValue()) {
- CSSCursorImageValue* cursorImageValue = pendingImage->cssCursorImageValue();
+ if (CSSCursorImageValue* cursorImageValue
+ = pendingImage->cssCursorImageValue())
return cursorImageValue->cachedImage(m_fetcher, deviceScaleFactor);
- }
- if (pendingImage->cssImageSetValue()) {
- CSSImageSetValue* imageSetValue = pendingImage->cssImageSetValue();
+ if (CSSImageSetValue* imageSetValue = pendingImage->cssImageSetValue())
return imageSetValue->cachedImageSet(m_fetcher, deviceScaleFactor);
- }
return 0;
}
« no previous file with comments | « no previous file | Source/core/rendering/RenderImageResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698