Diff
Modified: branches/subpixellayout/Source/WebCore/rendering/RenderScrollbar.cpp (110496 => 110497)
--- branches/subpixellayout/Source/WebCore/rendering/RenderScrollbar.cpp 2012-03-12 22:59:44 UTC (rev 110496)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderScrollbar.cpp 2012-03-12 23:10:37 UTC (rev 110497)
@@ -297,7 +297,7 @@
bool isHorizontal = orientation() == HorizontalScrollbar;
if (partType == BackButtonStartPart)
- return IntRect(location(), IntSize(isHorizontal ? static_cast<int>(partRenderer->width()) : width(), isHorizontal ? height() : partRenderer->pixelSnappedHeight()));
+ return IntRect(location(), IntSize(isHorizontal ? partRenderer->pixelSnappedWidth() : width(), isHorizontal ? height() : partRenderer->pixelSnappedHeight()));
if (partType == ForwardButtonEndPart)
return IntRect(isHorizontal ? x() + width() - partRenderer->pixelSnappedWidth() : x(),
isHorizontal ? y() : y() + height() - partRenderer->pixelSnappedHeight(),
@@ -326,16 +326,16 @@
part->layout();
if (orientation() == HorizontalScrollbar) {
- int marginLeft = part ? roundToInt(part->marginLeft()) : 0;
- int marginRight = part ? roundToInt(part->marginRight()) : 0;
+ int marginLeft = part ? static_cast<int>(part->marginLeft()) : 0;
+ int marginRight = part ? static_cast<int>(part->marginRight()) : 0;
startLength += marginLeft;
endLength += marginRight;
int totalLength = startLength + endLength;
return IntRect(x() + startLength, y(), width() - totalLength, height());
}
- int marginTop = part ? roundToInt(part->marginTop()) : 0;
- int marginBottom = part ? roundToInt(part->marginBottom()) : 0;
+ int marginTop = part ? static_cast<int>(part->marginTop()) : 0;
+ int marginBottom = part ? static_cast<int>(part->marginBottom()) : 0;
startLength += marginTop;
endLength += marginBottom;
int totalLength = startLength + endLength;
Modified: branches/subpixellayout/Source/WebCore/rendering/RenderScrollbarPart.cpp (110496 => 110497)
--- branches/subpixellayout/Source/WebCore/rendering/RenderScrollbarPart.cpp 2012-03-12 22:59:44 UTC (rev 110496)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderScrollbarPart.cpp 2012-03-12 23:10:37 UTC (rev 110497)
@@ -162,7 +162,7 @@
void RenderScrollbarPart::paintIntoRect(GraphicsContext* graphicsContext, const LayoutPoint& paintOffset, const LayoutRect& rect)
{
// Make sure our dimensions match the rect.
- setLocation(rect.location() - toLayoutSize(paintOffset));
+ setLocation(rect.location() - toSize(paintOffset));
setWidth(rect.width());
setHeight(rect.height());
Modified: branches/subpixellayout/Source/WebCore/rendering/RenderScrollbarPart.h (110496 => 110497)
--- branches/subpixellayout/Source/WebCore/rendering/RenderScrollbarPart.h 2012-03-12 22:59:44 UTC (rev 110496)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderScrollbarPart.h 2012-03-12 23:10:37 UTC (rev 110497)
@@ -52,7 +52,7 @@
virtual LayoutUnit marginBottom() const { ASSERT(isIntegerValue(m_marginBottom)); return m_marginBottom; }
virtual LayoutUnit marginLeft() const { ASSERT(isIntegerValue(m_marginLeft)); return m_marginLeft; }
virtual LayoutUnit marginRight() const { ASSERT(isIntegerValue(m_marginRight)); return m_marginRight; }
-
+
protected:
virtual void styleWillChange(StyleDifference diff, const RenderStyle* newStyle);
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
Modified: branches/subpixellayout/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp (110496 => 110497)
--- branches/subpixellayout/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp 2012-03-12 22:59:44 UTC (rev 110496)
+++ branches/subpixellayout/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp 2012-03-12 23:10:37 UTC (rev 110497)
@@ -114,7 +114,7 @@
IntRect InjectedBundleNodeHandle::renderRect(bool* isReplaced) const
{
- return enclosingIntRect(m_node.get()->renderRect(isReplaced));
+ return pixelSnappedIntRect(m_node.get()->renderRect(isReplaced));
}
void InjectedBundleNodeHandle::setHTMLInputElementValueForUser(const String& value)
Modified: branches/subpixellayout/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp (110496 => 110497)
--- branches/subpixellayout/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp 2012-03-12 22:59:44 UTC (rev 110496)
+++ branches/subpixellayout/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp 2012-03-12 23:10:37 UTC (rev 110497)
@@ -320,7 +320,7 @@
CGRect box = CGPDFPageGetBoxRect(pdfPage, kCGPDFCropBox);
if (CGRectIsEmpty(box))
box = CGPDFPageGetBoxRect(pdfPage, kCGPDFMediaBox);
- m_pageBoxes.append(box);
+ m_pageBoxes.append(IntRect(box));
m_pdfDocumentSize.setWidth(max(m_pdfDocumentSize.width(), static_cast<int>(box.size.width)));
m_pdfDocumentSize.expand(0, box.size.height);
}
@@ -749,8 +749,7 @@
int horizontalScrollbarHeight = (m_horizontalScrollbar && !m_horizontalScrollbar->isOverlayScrollbar()) ? m_horizontalScrollbar->height() : 0;
int verticalScrollbarWidth = (m_verticalScrollbar && !m_verticalScrollbar->isOverlayScrollbar()) ? m_verticalScrollbar->width() : 0;
- IntPoint maximumOffset(m_pdfDocumentSize.width() - m_pluginSize.width() + verticalScrollbarWidth,
- m_pdfDocumentSize.height() - m_pluginSize.height() + horizontalScrollbarHeight);
+ IntPoint maximumOffset(m_pdfDocumentSize.width() - m_pluginSize.width() + verticalScrollbarWidth, m_pdfDocumentSize.height() - m_pluginSize.height() + horizontalScrollbarHeight);
maximumOffset.clampNegativeToZero();
return maximumOffset;
}
Modified: branches/subpixellayout/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (110496 => 110497)
--- branches/subpixellayout/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm 2012-03-12 22:59:44 UTC (rev 110496)
+++ branches/subpixellayout/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm 2012-03-12 23:10:37 UTC (rev 110497)
@@ -358,7 +358,7 @@
HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(point, false);
frame = result.innerNonSharedNode() ? result.innerNonSharedNode()->document()->frame() : m_page->focusController()->focusedOrMainFrame();
- RefPtr<Range> range = frame->rangeForPoint(result.roundedPoint());
+ RefPtr<Range> range = frame->rangeForPoint(result.point());
if (!range)
return;
@@ -447,7 +447,7 @@
HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(point), false);
frame = result.innerNonSharedNode() ? result.innerNonSharedNode()->document()->frame() : m_page->focusController()->focusedOrMainFrame();
- FractionalLayoutPoint translatedPoint = frame->view()->windowToContents(point);
+ IntPoint translatedPoint = frame->view()->windowToContents(point);
// Don't do anything if there is no character at the point.
if (!frame->rangeForPoint(translatedPoint))