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

Unified Diff: Source/WebCore/platform/mac/ThemeMac.mm

Issue 11418042: Merge 134698 - [chromium/mac] Fix drawing of buttons, checkboxes, radio boxes, and steppers when th… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years, 1 month 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 | « LayoutTests/platform/chromium/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/mac/ThemeMac.mm
===================================================================
--- Source/WebCore/platform/mac/ThemeMac.mm (revision 134981)
+++ Source/WebCore/platform/mac/ThemeMac.mm (working copy)
@@ -269,8 +269,6 @@
// Determine the width and height needed for the control and prepare the cell for painting.
NSButtonCell *checkboxCell = checkbox(states, zoomedRect, zoomFactor);
- LocalCurrentGraphicsContext localContext(context);
-
GraphicsContextStateSaver stateSaver(*context);
NSControlSize controlSize = [checkboxCell controlSize];
@@ -287,6 +285,7 @@
context->translate(-inflatedRect.x(), -inflatedRect.y());
}
+ LocalCurrentGraphicsContext localContext(context);
NSView *view = ThemeMac::ensuredView(scrollView);
[checkboxCell drawWithFrame:NSRect(inflatedRect) inView:view];
#if !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING
@@ -350,8 +349,6 @@
{
// Determine the width and height needed for the control and prepare the cell for painting.
NSButtonCell *radioCell = radio(states, zoomedRect, zoomFactor);
- LocalCurrentGraphicsContext localContext(context);
-
GraphicsContextStateSaver stateSaver(*context);
NSControlSize controlSize = [radioCell controlSize];
@@ -368,6 +365,7 @@
context->translate(-inflatedRect.x(), -inflatedRect.y());
}
+ LocalCurrentGraphicsContext localContext(context);
BEGIN_BLOCK_OBJC_EXCEPTIONS
NSView *view = ThemeMac::ensuredView(scrollView);
[radioCell drawWithFrame:NSRect(inflatedRect) inView:view];
@@ -448,7 +446,7 @@
// Determine the width and height needed for the control and prepare the cell for painting.
NSButtonCell *buttonCell = button(part, states, zoomedRect, zoomFactor);
- LocalCurrentGraphicsContext localContext(context);
+ GraphicsContextStateSaver stateSaver(*context);
NSControlSize controlSize = [buttonCell controlSize];
IntSize zoomedSize = buttonSizes()[controlSize];
@@ -474,6 +472,7 @@
}
}
+ LocalCurrentGraphicsContext localContext(context);
NSView *view = ThemeMac::ensuredView(scrollView);
NSWindow *window = [view window];
NSButtonCell *previousDefaultButtonCell = [window defaultButtonCell];
« no previous file with comments | « LayoutTests/platform/chromium/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698