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

Unified Diff: PRESUBMIT.py

Issue 448483003: [Mac] Check for colour constants that do not specify a colourspace. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 72aa2484806a446c78d142089b436148c76ae705..f43916a6d208c4505b63e88d26d534116601fb5a 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -143,6 +143,28 @@ _BANNED_OBJC_FUNCTIONS = (
),
True,
),
+ (
+ # This is a C++ function, but it returns an NSObject so is only likely
+ # to appear in .mm files.
+ 'SkColorToCalibratedNSColor',
+ (
+ '"Calibrated" colors are probably not what you want. Consider using',
+ 'SkColorToSRGBNSColor instead of SkColorToCalibratedNSColor.',
+ 'http://dev.chromium.org/developers/coding-style/cocoa-dos-and-donts',
+ ),
+ False,
+ ),
+ (
+ # Catch all of [NSColor colorWithCalibrated(Hue|Red|White).*.
+ 'colorWithCalibrated',
+ (
+ '"Calibrated" colors are probably not what you want. Consider using',
+ 'the +[NSColor colorWithSRGBRed:green:blue:alpha: or the ',
+ '+[NSColor colorWithGenericGamma22White:alpha: method.',
+ 'http://dev.chromium.org/developers/coding-style/cocoa-dos-and-donts',
+ ),
+ False,
+ ),
)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698