Title: [98641] branches/subpixellayout/Source/WebCore/platform
- Revision
- 98641
- Author
- [email protected]
- Date
- 2011-10-27 14:43:22 -0700 (Thu, 27 Oct 2011)
Log Message
Painting Mac scrollbars on integer bounds.
Modified Paths
Diff
Modified: branches/subpixellayout/Source/WebCore/platform/ScrollbarTheme.h (98640 => 98641)
--- branches/subpixellayout/Source/WebCore/platform/ScrollbarTheme.h 2011-10-27 21:42:48 UTC (rev 98640)
+++ branches/subpixellayout/Source/WebCore/platform/ScrollbarTheme.h 2011-10-27 21:43:22 UTC (rev 98641)
@@ -80,7 +80,7 @@
virtual void invalidatePart(Scrollbar*, ScrollbarPart) {}
virtual void paintScrollCorner(ScrollView*, GraphicsContext* context, const FixedRect& cornerRect) { defaultPaintScrollCorner(context, cornerRect); }
- static void defaultPaintScrollCorner(GraphicsContext* context, const FixedRect& cornerRect) { context->fillRect(cornerRect, Color::white, ColorSpaceDeviceRGB); }
+ static void defaultPaintScrollCorner(GraphicsContext* context, const FixedRect& cornerRect) { context->fillRect(enclosingIntRect(cornerRect), Color::white, ColorSpaceDeviceRGB); }
virtual void paintOverhangAreas(ScrollView*, GraphicsContext*, const FixedRect&, const FixedRect&, const FixedRect&) { }
Modified: branches/subpixellayout/Source/WebCore/platform/mac/ScrollbarThemeMac.mm (98640 => 98641)
--- branches/subpixellayout/Source/WebCore/platform/mac/ScrollbarThemeMac.mm 2011-10-27 21:42:48 UTC (rev 98640)
+++ branches/subpixellayout/Source/WebCore/platform/mac/ScrollbarThemeMac.mm 2011-10-27 21:43:22 UTC (rev 98641)
@@ -534,7 +534,7 @@
HIThemeTrackDrawInfo trackInfo;
trackInfo.version = 0;
trackInfo.kind = scrollbar->controlSize() == RegularScrollbar ? kThemeMediumScrollBar : kThemeSmallScrollBar;
- trackInfo.bounds = scrollbar->frameRect();
+ trackInfo.bounds = enclosingIntRect(scrollbar->frameRect());
float maximum = 0.0f;
float position = 0.0f;
@@ -553,8 +553,8 @@
}
trackInfo.min = 0;
- trackInfo.max = static_cast<LayoutUnit>(maximum);
- trackInfo.value = static_cast<LayoutUnit>(position);
+ trackInfo.max = static_cast<int>(maximum);
+ trackInfo.value = static_cast<int>(position);
trackInfo.trackInfo.scrollbar.viewsize = scrollbar->visibleSize();
trackInfo.attributes = 0;
@@ -578,7 +578,7 @@
if (canDrawDirectly)
HIThemeDrawTrack(&trackInfo, 0, context->platformContext(), kHIThemeOrientationNormal);
else {
- trackInfo.bounds = LayoutRect(LayoutPoint(), scrollbar->frameRect().size());
+ trackInfo.bounds = IntRect(IntPoint(), expandedIntSize(scrollbar->frameRect().size()));
LayoutRect bufferRect(scrollbar->frameRect());
bufferRect.intersect(damageRect);
@@ -587,7 +587,7 @@
if (!imageBuffer)
return true;
- imageBuffer->context()->translate(scrollbar->frameRect().x() - bufferRect.x(), scrollbar->frameRect().y() - bufferRect.y());
+ imageBuffer->context()->translate((scrollbar->frameRect().x() - bufferRect.x()).round(), (scrollbar->frameRect().y() - bufferRect.y()).round());
HIThemeDrawTrack(&trackInfo, 0, imageBuffer->context()->platformContext(), kHIThemeOrientationNormal);
context->drawImageBuffer(imageBuffer.get(), ColorSpaceDeviceRGB, roundedIntPoint(bufferRect.location()));
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes