diff options
Diffstat (limited to 'Source/WebCore/rendering/RenderThemeMac.mm')
-rw-r--r-- | Source/WebCore/rendering/RenderThemeMac.mm | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/Source/WebCore/rendering/RenderThemeMac.mm b/Source/WebCore/rendering/RenderThemeMac.mm index 0764093..605e958 100644 --- a/Source/WebCore/rendering/RenderThemeMac.mm +++ b/Source/WebCore/rendering/RenderThemeMac.mm @@ -1033,14 +1033,8 @@ void RenderThemeMac::paintMenuListButtonGradients(RenderObject* o, const PaintIn paintInfo.context->save(); - IntSize topLeftRadius; - IntSize topRightRadius; - IntSize bottomLeftRadius; - IntSize bottomRightRadius; - - o->style()->getBorderRadiiForRect(r, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius); - - int radius = topLeftRadius.width(); + RoundedIntRect border = o->style()->getRoundedBorderFor(r); + int radius = border.radii().topLeft().width(); CGColorSpaceRef cspace = deviceRGBColorSpaceRef(); @@ -1063,27 +1057,27 @@ void RenderThemeMac::paintMenuListButtonGradients(RenderObject* o, const PaintIn RetainPtr<CGShadingRef> rightShading(AdoptCF, CGShadingCreateAxial(cspace, CGPointMake(r.right(), r.y()), CGPointMake(r.right() - radius, r.y()), mainFunction.get(), false, false)); paintInfo.context->save(); CGContextClipToRect(context, r); - paintInfo.context->addRoundedRectClip(r, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius); + paintInfo.context->addRoundedRectClip(border); CGContextDrawShading(context, mainShading.get()); paintInfo.context->restore(); paintInfo.context->save(); CGContextClipToRect(context, topGradient); - paintInfo.context->addRoundedRectClip(enclosingIntRect(topGradient), topLeftRadius, topRightRadius, IntSize(), IntSize()); + paintInfo.context->addRoundedRectClip(RoundedIntRect(enclosingIntRect(topGradient), border.radii().topLeft(), border.radii().topRight(), IntSize(), IntSize())); CGContextDrawShading(context, topShading.get()); paintInfo.context->restore(); if (!bottomGradient.isEmpty()) { paintInfo.context->save(); CGContextClipToRect(context, bottomGradient); - paintInfo.context->addRoundedRectClip(enclosingIntRect(bottomGradient), IntSize(), IntSize(), bottomLeftRadius, bottomRightRadius); + paintInfo.context->addRoundedRectClip(RoundedIntRect(enclosingIntRect(bottomGradient), IntSize(), IntSize(), border.radii().bottomLeft(), border.radii().bottomRight())); CGContextDrawShading(context, bottomShading.get()); paintInfo.context->restore(); } paintInfo.context->save(); CGContextClipToRect(context, r); - paintInfo.context->addRoundedRectClip(r, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius); + paintInfo.context->addRoundedRectClip(border); CGContextDrawShading(context, leftShading.get()); CGContextDrawShading(context, rightShading.get()); paintInfo.context->restore(); @@ -1304,9 +1298,7 @@ bool RenderThemeMac::paintSliderTrack(RenderObject* o, const PaintInfo& paintInf mainShading.adoptCF(CGShadingCreateAxial(cspace, CGPointMake(bounds.x(), bounds.y()), CGPointMake(bounds.x(), bounds.bottom()), mainFunction.get(), false, false)); IntSize radius(trackRadius, trackRadius); - paintInfo.context->addRoundedRectClip(bounds, - radius, radius, - radius, radius); + paintInfo.context->addRoundedRectClip(RoundedIntRect(bounds, radius, radius, radius, radius)); CGContextDrawShading(context, mainShading.get()); paintInfo.context->restore(); |