Title: [111693] branches/subpixellayout/Source/WebCore
- Revision
- 111693
- Author
- [email protected]
- Date
- 2012-03-22 07:39:22 -0700 (Thu, 22 Mar 2012)
Log Message
Adding pixelSnappedLocation/Size to FractionalLayoutRect, adding an explicit constructor from FractionalLayoutSize->FractionalLayoutPoint, cleaning up RenderFlowThread to minimize our patch, and fixing a bad size rounding in RenderListMarker.
Modified Paths
Diff
Modified: branches/subpixellayout/Source/WebCore/platform/graphics/FractionalLayoutPoint.h (111692 => 111693)
--- branches/subpixellayout/Source/WebCore/platform/graphics/FractionalLayoutPoint.h 2012-03-22 14:35:51 UTC (rev 111692)
+++ branches/subpixellayout/Source/WebCore/platform/graphics/FractionalLayoutPoint.h 2012-03-22 14:39:22 UTC (rev 111693)
@@ -43,6 +43,7 @@
FractionalLayoutPoint(FractionalLayoutUnit x, FractionalLayoutUnit y) : m_x(x), m_y(y) { }
FractionalLayoutPoint(const IntPoint& point) : m_x(point.x()), m_y(point.y()) { }
explicit FractionalLayoutPoint(const FloatPoint& size) : m_x(size.x()), m_y(size.y()) { }
+ explicit FractionalLayoutPoint(const FractionalLayoutSize& size) : m_x(size.width()), m_y(size.height()) { }
static FractionalLayoutPoint zero() { return FractionalLayoutPoint(); }
Modified: branches/subpixellayout/Source/WebCore/platform/graphics/FractionalLayoutRect.h (111692 => 111693)
--- branches/subpixellayout/Source/WebCore/platform/graphics/FractionalLayoutRect.h 2012-03-22 14:35:51 UTC (rev 111692)
+++ branches/subpixellayout/Source/WebCore/platform/graphics/FractionalLayoutRect.h 2012-03-22 14:39:22 UTC (rev 111693)
@@ -55,6 +55,9 @@
FractionalLayoutPoint location() const { return m_location; }
FractionalLayoutSize size() const { return m_size; }
+ IntPoint pixelSnappedLocation() const { return roundedIntPoint(m_location); }
+ IntSize pixelSnappedSize() const { return pixelSnappedIntSize(m_size, m_location); }
+
void setLocation(const FractionalLayoutPoint& location) { m_location = location; }
void setSize(const FractionalLayoutSize& size) { m_size = size; }
Modified: branches/subpixellayout/Source/WebCore/rendering/RenderFlowThread.cpp (111692 => 111693)
--- branches/subpixellayout/Source/WebCore/rendering/RenderFlowThread.cpp 2012-03-22 14:35:51 UTC (rev 111692)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderFlowThread.cpp 2012-03-22 14:39:22 UTC (rev 111693)
@@ -480,9 +480,9 @@
if (style()->isFlippedBlocksWritingMode()) {
LayoutRect flippedRegionRect(regionRect);
flipForWritingMode(flippedRegionRect);
- renderFlowThreadOffset = toLayoutPoint(paintOffset - flippedRegionRect.location());
+ renderFlowThreadOffset = LayoutPoint(paintOffset - flippedRegionRect.location());
} else
- renderFlowThreadOffset = toLayoutPoint(paintOffset - regionRect.location());
+ renderFlowThreadOffset = LayoutPoint(paintOffset - regionRect.location());
context->translate(renderFlowThreadOffset.x(), renderFlowThreadOffset.y());
info.rect.moveBy(-roundedIntPoint(renderFlowThreadOffset));
@@ -505,9 +505,9 @@
if (style()->isFlippedBlocksWritingMode()) {
LayoutRect flippedRegionRect(regionRect);
flipForWritingMode(flippedRegionRect);
- renderFlowThreadOffset = toLayoutPoint(accumulatedOffset - flippedRegionRect.location());
+ renderFlowThreadOffset = LayoutPoint(accumulatedOffset - flippedRegionRect.location());
} else
- renderFlowThreadOffset = toLayoutPoint(accumulatedOffset - regionRect.location());
+ renderFlowThreadOffset = LayoutPoint(accumulatedOffset - regionRect.location());
LayoutPoint transformedPoint(pointInContainer.x() - renderFlowThreadOffset.x(), pointInContainer.y() - renderFlowThreadOffset.y());
Modified: branches/subpixellayout/Source/WebCore/rendering/RenderListMarker.cpp (111692 => 111693)
--- branches/subpixellayout/Source/WebCore/rendering/RenderListMarker.cpp 2012-03-22 14:35:51 UTC (rev 111692)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderListMarker.cpp 2012-03-22 14:39:22 UTC (rev 111693)
@@ -1119,7 +1119,7 @@
if (!paintInfo.rect.intersects(overflowRect))
return;
- IntRect box(boxOrigin, roundedIntSize(LayoutSize(width(), height())));
+ IntRect box(boxOrigin, frameRect().pixelSnappedSize());
IntRect marker = getRelativeMarkerRect();
marker.moveBy(boxOrigin);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes