summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/mac/ScrollbarThemeMac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/mac/ScrollbarThemeMac.mm')
-rw-r--r--WebCore/platform/mac/ScrollbarThemeMac.mm7
1 files changed, 3 insertions, 4 deletions
diff --git a/WebCore/platform/mac/ScrollbarThemeMac.mm b/WebCore/platform/mac/ScrollbarThemeMac.mm
index bfa584a..ce3be1a 100644
--- a/WebCore/platform/mac/ScrollbarThemeMac.mm
+++ b/WebCore/platform/mac/ScrollbarThemeMac.mm
@@ -378,10 +378,9 @@ bool ScrollbarThemeMac::paint(Scrollbar* scrollbar, GraphicsContext* context, co
trackInfo.enableState = kThemeTrackNothingToScroll;
trackInfo.trackInfo.scrollbar.pressState = scrollbarPartToHIPressedState(scrollbar->pressedPart());
- CGAffineTransform currentCTM = CGContextGetCTM(context->platformContext());
-
// The Aqua scrollbar is buggy when rotated and scaled. We will just draw into a bitmap if we detect a scale or rotation.
- bool canDrawDirectly = currentCTM.a == 1.0f && currentCTM.b == 0.0f && currentCTM.c == 0.0f && (currentCTM.d == 1.0f || currentCTM.d == -1.0f);
+ const AffineTransform& currentCTM = context->getCTM();
+ bool canDrawDirectly = currentCTM.isIdentityOrTranslationOrFlipped();
if (canDrawDirectly)
HIThemeDrawTrack(&trackInfo, 0, context->platformContext(), kHIThemeOrientationNormal);
else {
@@ -396,7 +395,7 @@ bool ScrollbarThemeMac::paint(Scrollbar* scrollbar, GraphicsContext* context, co
return true;
HIThemeDrawTrack(&trackInfo, 0, imageBuffer->context()->platformContext(), kHIThemeOrientationNormal);
- context->drawImageBuffer(imageBuffer.get(), DeviceColorSpace, scrollbar->frameRect().location());
+ context->drawImageBuffer(imageBuffer.get(), ColorSpaceDeviceRGB, scrollbar->frameRect().location());
}
return true;