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

Unified Diff: third_party/WebKit/Source/core/style/StylePendingImage.h

Issue 1387113002: Change StyleResolverState.styleImage() to take a const CSSValue& (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TODOs to replace the members with const members Created 5 years, 2 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 | « third_party/WebKit/Source/core/style/StyleGeneratedImage.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/StylePendingImage.h
diff --git a/third_party/WebKit/Source/core/style/StylePendingImage.h b/third_party/WebKit/Source/core/style/StylePendingImage.h
index e1e50d2aaecb813ab13427237a4a124e5c59a5cf..458a732a8dccdd8d1fb69d2fe425158bcb5bf7b4 100644
--- a/third_party/WebKit/Source/core/style/StylePendingImage.h
+++ b/third_party/WebKit/Source/core/style/StylePendingImage.h
@@ -41,7 +41,7 @@ namespace blink {
class StylePendingImage final : public StyleImage {
public:
- static PassRefPtrWillBeRawPtr<StylePendingImage> create(CSSValue* value)
+ static PassRefPtrWillBeRawPtr<StylePendingImage> create(const CSSValue& value)
alancutter (OOO until 2018) 2015/10/07 03:28:28 I don't think we should break the pattern of creat
{
return adoptRefWillBeNoop(new StylePendingImage(value));
}
@@ -83,12 +83,14 @@ public:
}
private:
- explicit StylePendingImage(CSSValue* value)
- : m_value(value)
+ explicit StylePendingImage(const CSSValue& value)
+ : m_value(const_cast<CSSValue*>(&value))
{
m_isPendingImage = true;
}
+ // TODO(sashab): Replace this with <const CSSValue> once RefPtrWillBeMember<>
+ // supports const types.
RefPtrWillBeMember<CSSValue> m_value;
};
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleGeneratedImage.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698