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

Unified Diff: Source/core/rendering/RenderThemeChromiumMac.mm

Issue 586413002: Yosemite: Don't show the default placeholder of NSSearchFieldCell. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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: Source/core/rendering/RenderThemeChromiumMac.mm
diff --git a/Source/core/rendering/RenderThemeChromiumMac.mm b/Source/core/rendering/RenderThemeChromiumMac.mm
index 920251ec9e6af5d2ce52c90ff1ae2412eebe7dd5..8cd2b9e21ab60b3b2e1a836b427a5b9ea4a0d488 100644
--- a/Source/core/rendering/RenderThemeChromiumMac.mm
+++ b/Source/core/rendering/RenderThemeChromiumMac.mm
@@ -1667,6 +1667,16 @@ NSSearchFieldCell* RenderThemeChromiumMac::search() const
[m_search.get() setBezeled:YES];
[m_search.get() setEditable:YES];
[m_search.get() setFocusRingType:NSFocusRingTypeExterior];
+ SEL sel = @selector(setCenteredLook:);
+ if ([m_search.get() respondsToSelector:sel]) {
+ BOOL boolValue = NO;
+ NSMethodSignature* signature = [NSSearchFieldCell instanceMethodSignatureForSelector:sel];
+ NSInvocation* invocation = [NSInvocation invocationWithMethodSignature: signature];
keishi 2014/09/22 06:13:05 I think you should be able to do NSNumber *boolVa
tkent 2014/09/22 08:00:34 I confirmed it didn't work. It threw no exception
keishi 2014/09/22 08:56:58 Strange.
Robert Sesek 2014/09/22 14:42:49 Right, this shouldn't work because one NSNumber is
Robert Sesek 2014/09/22 14:42:49 nit: no space after :
Robert Sesek 2014/09/22 20:58:31 You didn't address this comment.
tkent 2014/09/23 22:39:10 Oops, I overlooked the comment. Will address it i
+ [invocation setTarget:m_search.get()];
+ [invocation setSelector:sel];
+ [invocation setArgument:&boolValue atIndex:2];
+ [invocation invoke];
+ }
}
return m_search.get();
« 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