summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-04 18:21:12 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-04 18:21:12 +0000
commitd60655b86f1d6a15e88ca51a77ccb7d3a3945612 (patch)
treeef45576279e8b904b3ffb50a25df5401d9098ec4 /chrome/browser/autocomplete
parente9b084c2af3b8831f1d872691184da32e7df5b92 (diff)
downloadchromium_src-d60655b86f1d6a15e88ca51a77ccb7d3a3945612.zip
chromium_src-d60655b86f1d6a15e88ca51a77ccb7d3a3945612.tar.gz
chromium_src-d60655b86f1d6a15e88ca51a77ccb7d3a3945612.tar.bz2
[Mac] Image-drawing which doesn't require image-flipping.
Snow Leopard deprecated -[NSImage setFlipped:] for good reasons. This implements a method similar to the new -[NSImage drawInRect:*:respectFlipped:] method, which allows images to be drawn so that they always look right visually regardless of the -isFlipped status of the view being drawn. BUG=38943 TEST=Autocomplete, download, and reload button look right. Review URL: http://codereview.chromium.org/2587003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48954 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_mac.mm5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
index c0e4f93..5d31764 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
@@ -11,6 +11,7 @@
#include "chrome/browser/autocomplete/autocomplete_edit_view_mac.h"
#include "chrome/browser/autocomplete/autocomplete_popup_model.h"
#include "chrome/browser/cocoa/event_utils.h"
+#include "chrome/browser/cocoa/image_utils.h"
#include "gfx/rect.h"
#include "grit/theme_resources.h"
#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
@@ -484,11 +485,11 @@ void AutocompletePopupViewMac::OpenURLForRow(int row, bool force_background) {
imageRect.origin.y +=
floor((NSHeight(cellFrame) - NSHeight(imageRect)) / 2);
imageRect.origin.x += kLeftRightMargin;
- [image setFlipped:[controlView isFlipped]];
[image drawInRect:imageRect
fromRect:NSZeroRect // Entire image
operation:NSCompositeSourceOver
- fraction:1.0];
+ fraction:1.0
+ neverFlipped:YES];
}
// Adjust the title position to be lined up under the field's text.