Title: [113447] branches/subpixellayout/Source
- Revision
- 113447
- Author
- [email protected]
- Date
- 2012-04-06 09:26:12 -0700 (Fri, 06 Apr 2012)
Log Message
Add transitional abs method to LayoutTypes and remove remaining unnecessary expandedIntSize calls.
Modified Paths
Diff
Modified: branches/subpixellayout/Source/WebCore/platform/qt/RenderThemeQt.cpp (113446 => 113447)
--- branches/subpixellayout/Source/WebCore/platform/qt/RenderThemeQt.cpp 2012-04-06 16:13:11 UTC (rev 113446)
+++ branches/subpixellayout/Source/WebCore/platform/qt/RenderThemeQt.cpp 2012-04-06 16:26:12 UTC (rev 113447)
@@ -435,7 +435,7 @@
IntRect RenderThemeQt::convertToPaintingRect(RenderObject* inputRenderer, const RenderObject* partRenderer, IntRect partRect, const IntRect& localOffset) const
{
// Compute an offset between the part renderer and the input renderer.
- IntSize offsetFromInputRenderer = -expandedIntSize(partRenderer->offsetFromAncestorContainer(inputRenderer));
+ IntSize offsetFromInputRenderer = -roundedIntSize(partRenderer->offsetFromAncestorContainer(inputRenderer));
// Move the rect into partRenderer's coords.
partRect.move(offsetFromInputRenderer);
// Account for the local drawing offset.
Modified: branches/subpixellayout/Source/WebCore/rendering/LayoutTypes.h (113446 => 113447)
--- branches/subpixellayout/Source/WebCore/rendering/LayoutTypes.h 2012-04-06 16:13:11 UTC (rev 113446)
+++ branches/subpixellayout/Source/WebCore/rendering/LayoutTypes.h 2012-04-06 16:26:12 UTC (rev 113447)
@@ -102,6 +102,11 @@
return value.toInt();
}
+inline LayoutUnit abs(const LayoutUnit& value)
+{
+ return value.abs();
+}
+
inline LayoutUnit roundedLayoutUnit(float value)
{
return FractionalLayoutUnit(value);
Modified: branches/subpixellayout/Source/WebCore/rendering/RenderObject.cpp (113446 => 113447)
--- branches/subpixellayout/Source/WebCore/rendering/RenderObject.cpp 2012-04-06 16:13:11 UTC (rev 113446)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderObject.cpp 2012-04-06 16:26:12 UTC (rev 113447)
@@ -1439,7 +1439,7 @@
// two rectangles (but typically only one).
RenderStyle* outlineStyle = outlineStyleForRepaint();
LayoutUnit ow = outlineStyle->outlineSize();
- LayoutUnit width = (newOutlineBox.width() - oldOutlineBox.width()).abs();
+ LayoutUnit width = abs(newOutlineBox.width() - oldOutlineBox.width());
if (width) {
LayoutUnit shadowLeft;
LayoutUnit shadowRight;
Modified: branches/subpixellayout/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp (113446 => 113447)
--- branches/subpixellayout/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp 2012-04-06 16:13:11 UTC (rev 113446)
+++ branches/subpixellayout/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp 2012-04-06 16:26:12 UTC (rev 113447)
@@ -499,7 +499,7 @@
return 0;
QStyleOptionProgressBarV2 option;
- option.rect.setSize(expandedIntSize(renderProgress->size()));
+ option.rect.setSize(renderProgress->pixelSnappedSize());
// FIXME: Until http://bugreports.qt.nokia.com/browse/QTBUG-9171 is fixed,
// we simulate one square animating across the progress bar.
return (option.rect.width() / qStyle()->pixelMetric(QStyle::PM_ProgressBarChunkWidth, &option)) * animationRepeatIntervalForProgressBar(renderProgress);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes