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

Side by Side Diff: Source/core/paint/ThemePainterMac.mm

Issue 368003002: Check if drawFocusRingMaskWithFrame:inView: exists when drawing focus ring (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutThemeMac.mm ('k') | Source/platform/mac/ThemeMac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 if (zoomLevel != 1.0f) { 177 if (zoomLevel != 1.0f) {
178 inflatedRect.setWidth(inflatedRect.width() / zoomLevel); 178 inflatedRect.setWidth(inflatedRect.width() / zoomLevel);
179 inflatedRect.setHeight(inflatedRect.height() / zoomLevel); 179 inflatedRect.setHeight(inflatedRect.height() / zoomLevel);
180 paintInfo.context->translate(inflatedRect.x(), inflatedRect.y()); 180 paintInfo.context->translate(inflatedRect.x(), inflatedRect.y());
181 paintInfo.context->scale(zoomLevel, zoomLevel); 181 paintInfo.context->scale(zoomLevel, zoomLevel);
182 paintInfo.context->translate(-inflatedRect.x(), -inflatedRect.y()); 182 paintInfo.context->translate(-inflatedRect.x(), -inflatedRect.y());
183 } 183 }
184 184
185 NSView *view = m_layoutTheme.documentViewFor(o); 185 NSView *view = m_layoutTheme.documentViewFor(o);
186 [popupButton drawWithFrame:inflatedRect inView:view]; 186 [popupButton drawWithFrame:inflatedRect inView:view];
187 #if !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING 187 if (!ThemeMac::drawWithFrameDrawsFocusRing() && LayoutTheme::isFocused(o) && o->style()->outlineStyleIsAuto())
188 if (LayoutTheme::isFocused(o) && o->style()->outlineStyleIsAuto()) 188 [popupButton cr_drawFocusRingWithFrame:inflatedRect inView:view];
189 [popupButton _web_drawFocusRingWithFrame:inflatedRect inView:view];
190 #endif
191 [popupButton setControlView:nil]; 189 [popupButton setControlView:nil];
192 190
193 return false; 191 return false;
194 } 192 }
195 193
196 bool ThemePainterMac::paintMeter(LayoutObject* layoutObject, const PaintInfo& pa intInfo, const IntRect& rect) 194 bool ThemePainterMac::paintMeter(LayoutObject* layoutObject, const PaintInfo& pa intInfo, const IntRect& rect)
197 { 195 {
198 if (!layoutObject->isMeter()) 196 if (!layoutObject->isMeter())
199 return true; 197 return true;
200 198
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 [search setSearchMenuTemplate:nil]; 592 [search setSearchMenuTemplate:nil];
595 593
596 m_layoutTheme.updateActiveState([search searchButtonCell], o); 594 m_layoutTheme.updateActiveState([search searchButtonCell], o);
597 595
598 [[search searchButtonCell] drawWithFrame:unzoomedRect inView:m_layoutTheme.d ocumentViewFor(o)]; 596 [[search searchButtonCell] drawWithFrame:unzoomedRect inView:m_layoutTheme.d ocumentViewFor(o)];
599 [[search searchButtonCell] setControlView:nil]; 597 [[search searchButtonCell] setControlView:nil];
600 return false; 598 return false;
601 } 599 }
602 600
603 } // namespace blink 601 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutThemeMac.mm ('k') | Source/platform/mac/ThemeMac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698