Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1660 } | 1660 } |
| 1661 | 1661 |
| 1662 NSSearchFieldCell* RenderThemeChromiumMac::search() const | 1662 NSSearchFieldCell* RenderThemeChromiumMac::search() const |
| 1663 { | 1663 { |
| 1664 if (!m_search) { | 1664 if (!m_search) { |
| 1665 m_search.adoptNS([[NSSearchFieldCell alloc] initTextCell:@""]); | 1665 m_search.adoptNS([[NSSearchFieldCell alloc] initTextCell:@""]); |
| 1666 [m_search.get() setBezelStyle:NSTextFieldRoundedBezel]; | 1666 [m_search.get() setBezelStyle:NSTextFieldRoundedBezel]; |
| 1667 [m_search.get() setBezeled:YES]; | 1667 [m_search.get() setBezeled:YES]; |
| 1668 [m_search.get() setEditable:YES]; | 1668 [m_search.get() setEditable:YES]; |
| 1669 [m_search.get() setFocusRingType:NSFocusRingTypeExterior]; | 1669 [m_search.get() setFocusRingType:NSFocusRingTypeExterior]; |
| 1670 SEL sel = @selector(setCenteredLook:); | |
| 1671 if ([m_search.get() respondsToSelector:sel]) { | |
| 1672 BOOL boolValue = NO; | |
| 1673 NSMethodSignature* signature = [NSSearchFieldCell instanceMethodSign atureForSelector:sel]; | |
| 1674 NSInvocation* invocation = [NSInvocation invocationWithMethodSignatu re: 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
| |
| 1675 [invocation setTarget:m_search.get()]; | |
| 1676 [invocation setSelector:sel]; | |
| 1677 [invocation setArgument:&boolValue atIndex:2]; | |
| 1678 [invocation invoke]; | |
| 1679 } | |
| 1670 } | 1680 } |
| 1671 | 1681 |
| 1672 return m_search.get(); | 1682 return m_search.get(); |
| 1673 } | 1683 } |
| 1674 | 1684 |
| 1675 NSMenu* RenderThemeChromiumMac::searchMenuTemplate() const | 1685 NSMenu* RenderThemeChromiumMac::searchMenuTemplate() const |
| 1676 { | 1686 { |
| 1677 if (!m_searchMenuTemplate) | 1687 if (!m_searchMenuTemplate) |
| 1678 m_searchMenuTemplate.adoptNS([[NSMenu alloc] initWithTitle:@""]); | 1688 m_searchMenuTemplate.adoptNS([[NSMenu alloc] initWithTitle:@""]); |
| 1679 | 1689 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1855 | 1865 |
| 1856 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const | 1866 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const |
| 1857 { | 1867 { |
| 1858 ControlPart part = style->appearance(); | 1868 ControlPart part = style->appearance(); |
| 1859 if (part == CheckboxPart || part == RadioPart) | 1869 if (part == CheckboxPart || part == RadioPart) |
| 1860 return style->effectiveZoom() != 1; | 1870 return style->effectiveZoom() != 1; |
| 1861 return false; | 1871 return false; |
| 1862 } | 1872 } |
| 1863 | 1873 |
| 1864 } // namespace blink | 1874 } // namespace blink |
| OLD | NEW |