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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutThemeMac.mm

Issue 2770123003: Replace ASSERT with DCHECK in core/layout/ excluding subdirs (Closed)
Patch Set: Split some DCHECKs and add DCHECK_ops wherever possible Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Google, Inc. 3 * Copyright (C) 2008, 2009 Google, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 return oldAquaFocusRingColor; 192 return oldAquaFocusRingColor;
193 193
194 return systemColor(CSSValueWebkitFocusRingColor); 194 return systemColor(CSSValueWebkitFocusRingColor);
195 } 195 }
196 196
197 Color LayoutThemeMac::platformInactiveListBoxSelectionBackgroundColor() const { 197 Color LayoutThemeMac::platformInactiveListBoxSelectionBackgroundColor() const {
198 return platformInactiveSelectionBackgroundColor(); 198 return platformInactiveSelectionBackgroundColor();
199 } 199 }
200 200
201 static FontWeight toFontWeight(NSInteger appKitFontWeight) { 201 static FontWeight toFontWeight(NSInteger appKitFontWeight) {
202 ASSERT(appKitFontWeight > 0 && appKitFontWeight < 15); 202 DCHECK_GT(appKitFontWeight, 0);
203 DCHECK_LT(appKitFontWeight, 15);
203 if (appKitFontWeight > 14) 204 if (appKitFontWeight > 14)
204 appKitFontWeight = 14; 205 appKitFontWeight = 14;
205 else if (appKitFontWeight < 1) 206 else if (appKitFontWeight < 1)
206 appKitFontWeight = 1; 207 appKitFontWeight = 1;
207 208
208 static FontWeight fontWeights[] = { 209 static FontWeight fontWeights[] = {
209 FontWeight100, FontWeight100, FontWeight200, FontWeight300, FontWeight400, 210 FontWeight100, FontWeight100, FontWeight200, FontWeight300, FontWeight400,
210 FontWeight500, FontWeight600, FontWeight600, FontWeight700, FontWeight800, 211 FontWeight500, FontWeight600, FontWeight600, FontWeight700, FontWeight800,
211 FontWeight800, FontWeight900, FontWeight900, FontWeight900}; 212 FontWeight800, FontWeight900, FontWeight900, FontWeight900};
212 return fontWeights[appKitFontWeight - 1]; 213 return fontWeights[appKitFontWeight - 1];
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 } 1104 }
1104 1105
1105 bool LayoutThemeMac::shouldUseFallbackTheme(const ComputedStyle& style) const { 1106 bool LayoutThemeMac::shouldUseFallbackTheme(const ComputedStyle& style) const {
1106 ControlPart part = style.appearance(); 1107 ControlPart part = style.appearance();
1107 if (part == CheckboxPart || part == RadioPart) 1108 if (part == CheckboxPart || part == RadioPart)
1108 return style.effectiveZoom() != 1; 1109 return style.effectiveZoom() != 1;
1109 return false; 1110 return false;
1110 } 1111 }
1111 1112
1112 } // namespace blink 1113 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTheme.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutThemeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698