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

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

Issue 368003002: Check if drawFocusRingMaskWithFrame:inView: exists when drawing focus ring (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING Created 6 years, 5 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 | Source/platform/mac/ThemeMac.mm » ('j') | Source/platform/mac/ThemeMac.mm » ('J')
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 5f82697c4658147601de74e0afd61dbf681f2e8a..0044c023c67d4b3c7e93851fd97e0a41bd478c22 100644
--- a/Source/core/rendering/RenderThemeChromiumMac.mm
+++ b/Source/core/rendering/RenderThemeChromiumMac.mm
@@ -626,6 +626,8 @@ void RenderThemeChromiumMac::updateEnabledState(NSCell* cell, const RenderObject
void RenderThemeChromiumMac::updateFocusedState(NSCell* cell, const RenderObject* o)
{
+ if ([cell respondsToSelector:@selector(drawFocusRingMaskWithFrame:inView:)])
Robert Sesek 2014/07/21 21:14:38 Add a comment as to why you need to do this? You s
+ return;
bool oldFocused = [cell showsFirstResponder];
bool focused = isFocused(o) && o->style()->outlineStyleIsAuto();
if (focused != oldFocused)
@@ -915,10 +917,8 @@ bool RenderThemeChromiumMac::paintMenuList(RenderObject* o, const PaintInfo& pai
NSView *view = documentViewFor(o);
[popupButton drawWithFrame:inflatedRect inView:view];
-#if !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING
if (isFocused(o) && o->style()->outlineStyleIsAuto())
[popupButton _web_drawFocusRingWithFrame:inflatedRect inView:view];
-#endif
[popupButton setControlView:nil];
return false;
@@ -1270,9 +1270,7 @@ void RenderThemeChromiumMac::setPopupButtonCellState(const RenderObject* o, cons
updateCheckedState(popupButton, o);
updateEnabledState(popupButton, o);
updatePressedState(popupButton, o);
-#if BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING
updateFocusedState(popupButton, o);
-#endif
}
const IntSize* RenderThemeChromiumMac::menuListSizes() const
« no previous file with comments | « no previous file | Source/platform/mac/ThemeMac.mm » ('j') | Source/platform/mac/ThemeMac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698