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

Unified Diff: chrome/browser/cocoa/autocomplete_text_field_cell.mm

Issue 1605002: [Mac] Fix DCHECK() on page actions in preview. (Closed)
Patch Set: Um, test should really match comment, no? Created 10 years, 9 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: chrome/browser/cocoa/autocomplete_text_field_cell.mm
diff --git a/chrome/browser/cocoa/autocomplete_text_field_cell.mm b/chrome/browser/cocoa/autocomplete_text_field_cell.mm
index c8f2122afbcbed9a6028b9dc207bc17eae77e306..0543bf6e3bebaf8e183d2e36bbbb78514d5a07c6 100644
--- a/chrome/browser/cocoa/autocomplete_text_field_cell.mm
+++ b/chrome/browser/cocoa/autocomplete_text_field_cell.mm
@@ -58,7 +58,9 @@ CGFloat WidthForKeyword(NSAttributedString* keywordString) {
// Convenience to draw |image| in the |rect| portion of |view|.
void DrawImageInRect(NSImage* image, NSView* view, const NSRect& rect) {
- DCHECK(NSEqualSizes([image size], rect.size));
+ // If there is an image, make sure we calculated the target size
+ // correctly.
+ DCHECK(!image || NSEqualSizes([image size], rect.size));
[image setFlipped:[view isFlipped]];
[image drawInRect:rect
fromRect:NSZeroRect // Entire image
« 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