@@ -756,13 +756,13 @@ static void MainGradientInterpolate( void *info, float const *inData, float *out
756756
757757 CGColorSpaceRef cspace = CGColorSpaceCreateDeviceRGB ();
758758
759- IntRect topGradient (r.x (), r.y (), r.width (), r.height () / 2.0 );
759+ FloatRect topGradient (r.x (), r.y (), r.width (), r.height () / 2.0 );
760760 struct CGFunctionCallbacks topCallbacks = { 0 , TopGradientInterpolate, NULL };
761761 CGFunctionRef topFunction = CGFunctionCreate ( NULL , 1 , NULL , 4 , NULL , &topCallbacks );
762762 CGShadingRef topShading = CGShadingCreateAxial ( cspace, CGPointMake (topGradient.x (), topGradient.y ()),
763763 CGPointMake (topGradient.x (), topGradient.bottom ()), topFunction, false , false );
764764
765- IntRect bottomGradient (r.x () + radius, r.y () + r.height () / 2.0 , r.width () - 2 * radius, r.height () / 2.0 );
765+ FloatRect bottomGradient (r.x () + radius, r.y () + r.height () / 2.0 , r.width () - 2 * radius, r.height () / 2.0 );
766766 struct CGFunctionCallbacks bottomCallbacks = { 0 , BottomGradientInterpolate, NULL };
767767 CGFunctionRef bottomFunction = CGFunctionCreate ( NULL , 1 , NULL , 4 , NULL , &bottomCallbacks );
768768 CGShadingRef bottomShading = CGShadingCreateAxial ( cspace, CGPointMake (bottomGradient.x (), bottomGradient.y ()),
@@ -788,15 +788,15 @@ static void MainGradientInterpolate( void *info, float const *inData, float *out
788788
789789 i.p ->save ();
790790 CGContextClipToRect (context, topGradient);
791- i.p ->addRoundedRectClip (topGradient,
791+ i.p ->addRoundedRectClip (enclosingIntRect ( topGradient) ,
792792 o->style ()->borderTopLeftRadius (), o->style ()->borderTopRightRadius (),
793793 IntSize (), IntSize ());
794794 CGContextDrawShading (context, topShading);
795795 i.p ->restore ();
796796
797797 i.p ->save ();
798798 CGContextClipToRect (context, bottomGradient);
799- i.p ->addRoundedRectClip (bottomGradient,
799+ i.p ->addRoundedRectClip (enclosingIntRect ( bottomGradient) ,
800800 IntSize (), IntSize (),
801801 o->style ()->borderBottomLeftRadius (), o->style ()->borderBottomRightRadius ());
802802 CGContextDrawShading (context, bottomShading);
@@ -854,7 +854,7 @@ static void MainGradientInterpolate( void *info, float const *inData, float *out
854854 Color leftSeparatorColor (0 , 0 , 0 , 40 );
855855 Color rightSeparatorColor (255 , 255 , 255 , 40 );
856856 int separatorSpace = 2 ;
857- int leftEdgeOfSeparator = leftEdge - arrowPaddingLeft;
857+ int leftEdgeOfSeparator = int ( leftEdge - arrowPaddingLeft); // FIXME: Round?
858858
859859 // Draw the separator to the left of the arrows
860860 i.p ->setPen (Pen (leftSeparatorColor));
@@ -909,13 +909,12 @@ static void MainGradientInterpolate( void *info, float const *inData, float *out
909909 // We're overriding the padding to allow for the arrow control. WinIE doesn't honor padding on selects, so
910910 // this shouldn't cause problems on the web. If IE7 changes that, we should reconsider this.
911911 style->setPaddingLeft (Length (styledPopupPaddingLeft, Fixed));
912- style->setPaddingRight (Length (arrowWidth + arrowPaddingLeft + arrowPaddingRight + paddingBeforeSeparator, Fixed));
912+ style->setPaddingRight (Length (int ( ceilf ( arrowWidth + arrowPaddingLeft + arrowPaddingRight + paddingBeforeSeparator)) , Fixed));
913913 style->setPaddingTop (Length (styledPopupPaddingTop, Fixed));
914914 style->setPaddingBottom (Length (styledPopupPaddingBottom, Fixed));
915915
916- if (style->hasBorderRadius ()) {
917- style->setBorderRadius (IntSize (baseBorderRadius + fontScale - 1 , baseBorderRadius + fontScale - 1 ));
918- }
916+ if (style->hasBorderRadius ())
917+ style->setBorderRadius (IntSize (int (baseBorderRadius + fontScale - 1 ), int (baseBorderRadius + fontScale - 1 ))); // FIXME: Round up?
919918
920919 const int minHeight = 15 ;
921920 style->setMinHeight (Length (minHeight, Fixed));
0 commit comments