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

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

Issue 544007: [Mac] Fixes regression where the I-Beam was not being shown when hovering ove... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 11 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.mm
===================================================================
--- chrome/browser/cocoa/autocomplete_text_field.mm (revision 35902)
+++ chrome/browser/cocoa/autocomplete_text_field.mm (working copy)
@@ -195,16 +195,19 @@
[undoManager_ removeAllActions];
}
-// Any image within the field (Page Actions or the security icon) should have
-// the arrow cursor shown instead of the I-beam.
+// Show the I-beam cursor unless the mouse is over an image within the field
+// (Page Actions or the security icon) in which case show the arrow cursor.
- (void)resetCursorRects {
+ NSRect fieldBounds = [self bounds];
+ [self addCursorRect:fieldBounds cursor:[NSCursor IBeamCursor]];
+
AutocompleteTextFieldCell* cell = [self autocompleteTextFieldCell];
- NSRect iconRect = [cell securityImageFrameForFrame:[self bounds]];
+ NSRect iconRect = [cell securityImageFrameForFrame:fieldBounds];
[self addCursorRect:iconRect cursor:[NSCursor arrowCursor]];
const size_t pageActionCount = [cell pageActionCount];
for (size_t i = 0; i < pageActionCount; ++i) {
- iconRect = [cell pageActionFrameForIndex:i inFrame:[self bounds]];
+ iconRect = [cell pageActionFrameForIndex:i inFrame:fieldBounds];
[self addCursorRect:iconRect cursor:[NSCursor arrowCursor]];
}
}
« 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