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

Side by Side Diff: Source/core/css/CSSShaderValue.h

Issue 24932003: Use DEFINE_CSS_VALUE_TYPE_CASTS instead of using manual type cast function for CSSShaderValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/css/CSSValue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 private: 58 private:
59 CSSShaderValue(const String& url); 59 CSSShaderValue(const String& url);
60 60
61 String m_url; 61 String m_url;
62 String m_format; 62 String m_format;
63 RefPtr<StyleShader> m_shader; 63 RefPtr<StyleShader> m_shader;
64 bool m_accessedShader; 64 bool m_accessedShader;
65 }; 65 };
66 66
67 // This will catch anyone doing an unnecessary cast. 67 DEFINE_CSS_VALUE_TYPE_CASTS(ShaderValue);
68 CSSShaderValue* toCSSShaderValue(const CSSShaderValue*);
69
70 inline CSSShaderValue* toCSSShaderValue(CSSValue* value)
71 {
72 return value->isCSSShaderValue() ? static_cast<CSSShaderValue*>(value) : 0;
73 }
74 68
75 } // namespace WebCore 69 } // namespace WebCore
76 70
77 71
78 #endif // CSSShaderValue_h 72 #endif // CSSShaderValue_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/CSSValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698