summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/platform/mac/ThemeMac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/platform/mac/ThemeMac.mm')
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/ThemeMac.mm13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebCore/platform/mac/ThemeMac.mm b/src/3rdparty/webkit/WebCore/platform/mac/ThemeMac.mm
index a3e743f748..e7e12ac83b 100644
--- a/src/3rdparty/webkit/WebCore/platform/mac/ThemeMac.mm
+++ b/src/3rdparty/webkit/WebCore/platform/mac/ThemeMac.mm
@@ -26,6 +26,7 @@
#import "config.h"
#import "ThemeMac.h"
+#import "BlockExceptions.h"
#import "GraphicsContext.h"
#import "LocalCurrentGraphicsContext.h"
#import "ScrollView.h"
@@ -195,6 +196,8 @@ static NSButtonCell* checkbox(ControlStates states, const IntRect& zoomedRect, f
// FIXME: Share more code with radio buttons.
static void paintCheckbox(ControlStates states, GraphicsContext* context, const IntRect& zoomedRect, float zoomFactor, ScrollView* scrollView)
{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS
+
// Determine the width and height needed for the control and prepare the cell for painting.
NSButtonCell* checkboxCell = checkbox(states, zoomedRect, zoomFactor);
@@ -218,6 +221,8 @@ static void paintCheckbox(ControlStates states, GraphicsContext* context, const
[checkboxCell setControlView:nil];
context->restore();
+
+ END_BLOCK_OBJC_EXCEPTIONS
}
// Radio Buttons
@@ -289,8 +294,10 @@ static void paintRadio(ControlStates states, GraphicsContext* context, const Int
context->translate(-inflatedRect.x(), -inflatedRect.y());
}
+ BEGIN_BLOCK_OBJC_EXCEPTIONS
[radioCell drawWithFrame:NSRect(inflatedRect) inView:scrollView->documentView()];
[radioCell setControlView:nil];
+ END_BLOCK_OBJC_EXCEPTIONS
context->restore();
}
@@ -348,6 +355,8 @@ static NSButtonCell* button(ControlPart part, ControlStates states, const IntRec
static void paintButton(ControlPart part, ControlStates states, GraphicsContext* context, const IntRect& zoomedRect, float zoomFactor, ScrollView* scrollView)
{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS
+
// 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);
@@ -391,6 +400,8 @@ static void paintButton(ControlPart part, ControlStates states, GraphicsContext*
if (![previousDefaultButtonCell isEqual:buttonCell])
[window setDefaultButtonCell:previousDefaultButtonCell];
+
+ END_BLOCK_OBJC_EXCEPTIONS
}
// Theme overrides
@@ -479,6 +490,7 @@ LengthBox ThemeMac::controlPadding(ControlPart part, const Font& font, const Len
void ThemeMac::inflateControlPaintRect(ControlPart part, ControlStates states, IntRect& zoomedRect, float zoomFactor) const
{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS
switch (part) {
case CheckboxPart: {
// We inflate the rect as needed to account for padding included in the cell to accommodate the checkbox
@@ -520,6 +532,7 @@ void ThemeMac::inflateControlPaintRect(ControlPart part, ControlStates states, I
default:
break;
}
+ END_BLOCK_OBJC_EXCEPTIONS
}
void ThemeMac::paint(ControlPart part, ControlStates states, GraphicsContext* context, const IntRect& zoomedRect, float zoomFactor, ScrollView* scrollView) const