[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

hyatt at apple.com hyatt at apple.com
Mon Feb 21 00:33:21 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit aa0cba074367694ef0137a7e2accd49348364819
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Feb 1 21:39:47 2011 +0000

    https://bugs.webkit.org/show_bug.cgi?id=53520
    
    Reviewed by Oliver Hunt.
    
    Remove the physical terminology from IntRect and FloatRect.
    
    Now that we have flipped RenderBlocks for vertical-rl and horizontal-bt writing modes,
    we need to update our terminology to be more accurate.
    
    I'm borrowing a page from AppKit here (which also supports flipped NSViews) and
    renaming right() and bottom() to maxX() and maxY().  These terms remain accurate
    even for flipped rectangles.
    
    ../WebCore:
    
    * accessibility/AccessibilityRenderObject.cpp:
    (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
    * accessibility/mac/AccessibilityObjectWrapper.mm:
    (-[AccessibilityObjectWrapper position]):
    * dom/ClientRect.h:
    (WebCore::ClientRect::right):
    (WebCore::ClientRect::bottom):
    * html/HTMLCanvasElement.cpp:
    (WebCore::HTMLCanvasElement::convertLogicalToDevice):
    * html/canvas/CanvasRenderingContext2D.cpp:
    (WebCore::normalizeRect):
    * inspector/InspectorAgent.cpp:
    (WebCore::InspectorAgent::drawElementTitle):
    * page/DOMWindow.cpp:
    (WebCore::DOMWindow::adjustWindowRect):
    * page/DragController.cpp:
    (WebCore::dragLocForSelectionDrag):
    * page/EventHandler.cpp:
    (WebCore::EventHandler::sendContextMenuEventForKey):
    * page/PrintContext.cpp:
    (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
    (WebCore::PrintContext::pageNumberForElement):
    * page/SpatialNavigation.cpp:
    (WebCore::end):
    (WebCore::areRectsFullyAligned):
    (WebCore::areRectsMoreThanFullScreenApart):
    (WebCore::below):
    (WebCore::rightOf):
    (WebCore::isRectInDirection):
    (WebCore::entryAndExitPointsForDirection):
    (WebCore::virtualRectForDirection):
    * page/WindowFeatures.cpp:
    (WebCore::WindowFeatures::WindowFeatures):
    * platform/ScrollView.cpp:
    (WebCore::ScrollView::wheelEvent):
    * platform/Scrollbar.cpp:
    (WebCore::Scrollbar::setFrameRect):
    * platform/ScrollbarThemeComposite.cpp:
    (WebCore::ScrollbarThemeComposite::splitTrack):
    * platform/chromium/ScrollbarThemeChromium.cpp:
    (WebCore::ScrollbarThemeChromium::paintTickmarks):
    * platform/graphics/FloatQuad.h:
    (WebCore::FloatQuad::FloatQuad):
    * platform/graphics/FloatRect.cpp:
    (WebCore::FloatRect::intersects):
    (WebCore::FloatRect::contains):
    (WebCore::FloatRect::intersect):
    (WebCore::FloatRect::unite):
    (WebCore::enclosingIntRect):
    * platform/graphics/FloatRect.h:
    (WebCore::FloatRect::maxX):
    (WebCore::FloatRect::maxY):
    (WebCore::FloatRect::contains):
    * platform/graphics/IntRect.cpp:
    (WebCore::IntRect::intersects):
    (WebCore::IntRect::contains):
    (WebCore::IntRect::intersect):
    (WebCore::IntRect::unite):
    * platform/graphics/IntRect.h:
    (WebCore::IntRect::maxX):
    (WebCore::IntRect::maxY):
    (WebCore::IntRect::shiftXEdgeTo):
    (WebCore::IntRect::shiftMaxXEdgeTo):
    (WebCore::IntRect::shiftYEdgeTo):
    (WebCore::IntRect::shiftMaxYEdgeTo):
    (WebCore::IntRect::contains):
    * platform/graphics/WidthIterator.cpp:
    (WebCore::WidthIterator::advance):
    * platform/graphics/cg/GraphicsContextCG.cpp:
    (WebCore::GraphicsContext::drawRect):
    (WebCore::GraphicsContext::fillPath):
    (WebCore::GraphicsContext::fillRect):
    * platform/graphics/cg/ImageBufferCG.cpp:
    (WebCore::getImageData):
    (WebCore::putImageData):
    * platform/graphics/cg/ImageCG.cpp:
    (WebCore::BitmapImage::draw):
    * platform/graphics/filters/FilterEffect.cpp:
    (WebCore::FilterEffect::copyImageBytes):
    * platform/graphics/mac/ComplexTextController.cpp:
    (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
    * platform/graphics/mac/SimpleFontDataMac.mm:
    (WebCore::SimpleFontData::platformBoundsForGlyph):
    * platform/graphics/transforms/AffineTransform.cpp:
    (WebCore::AffineTransform::mapRect):
    * platform/graphics/win/FontCGWin.cpp:
    (WebCore::drawGDIGlyphs):
    * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
    (WebCore::MediaPlayerPrivate::paint):
    * platform/gtk/RenderThemeGtk.cpp:
    (WebCore::centerRectVerticallyInParentInputElement):
    * platform/mac/WidgetMac.mm:
    (WebCore::Widget::paint):
    * rendering/InlineFlowBox.cpp:
    (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
    (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
    * rendering/InlineTextBox.cpp:
    (WebCore::InlineTextBox::selectionRect):
    (WebCore::InlineTextBox::paint):
    (WebCore::InlineTextBox::positionForOffset):
    * rendering/RenderBlock.cpp:
    (WebCore::RenderBlock::addOverflowFromChildren):
    (WebCore::RenderBlock::paintChildren):
    (WebCore::RenderBlock::paintEllipsisBoxes):
    (WebCore::RenderBlock::inlineSelectionGaps):
    (WebCore::RenderBlock::adjustPointToColumnContents):
    (WebCore::RenderBlock::flipForWritingModeIncludingColumns):
    (WebCore::RenderBlock::adjustForColumns):
    * rendering/RenderBlock.h:
    (WebCore::RenderBlock::FloatingObject::right):
    (WebCore::RenderBlock::FloatingObject::bottom):
    * rendering/RenderBox.cpp:
    (WebCore::RenderBox::reflectedRect):
    (WebCore::RenderBox::localCaretRect):
    (WebCore::RenderBox::addShadowOverflow):
    (WebCore::RenderBox::addLayoutOverflow):
    (WebCore::RenderBox::visualOverflowRectForPropagation):
    (WebCore::RenderBox::layoutOverflowRectForPropagation):
    (WebCore::RenderBox::flipForWritingMode):
    * rendering/RenderFrameSet.cpp:
    (WebCore::RenderFrameSet::paintColumnBorder):
    (WebCore::RenderFrameSet::paintRowBorder):
    * rendering/RenderInline.cpp:
    (WebCore::RenderInline::paintOutlineForLine):
    * rendering/RenderLayer.cpp:
    (WebCore::RenderLayer::getRectToExpose):
    (WebCore::cornerRect):
    (WebCore::RenderLayer::positionOverflowControls):
    (WebCore::RenderLayer::overflowBottom):
    (WebCore::RenderLayer::overflowRight):
    (WebCore::RenderLayer::paintResizer):
    * rendering/RenderLineBoxList.cpp:
    (WebCore::RenderLineBoxList::rangeIntersectsRect):
    (WebCore::RenderLineBoxList::paint):
    * rendering/RenderListItem.cpp:
    (WebCore::RenderListItem::positionListMarker):
    * rendering/RenderListMarker.cpp:
    (WebCore::RenderListMarker::paint):
    * rendering/RenderObject.cpp:
    (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
    * rendering/RenderOverflow.h:
    (WebCore::RenderOverflow::RenderOverflow):
    (WebCore::RenderOverflow::addLayoutOverflow):
    (WebCore::RenderOverflow::addVisualOverflow):
    (WebCore::RenderOverflow::setLayoutOverflow):
    (WebCore::RenderOverflow::setVisualOverflow):
    (WebCore::RenderOverflow::resetLayoutOverflow):
    * rendering/RenderReplaced.cpp:
    (WebCore::RenderReplaced::shouldPaint):
    * rendering/RenderScrollbarTheme.cpp:
    (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
    * rendering/RenderTable.cpp:
    (WebCore::RenderTable::paint):
    * rendering/RenderTableCell.cpp:
    (WebCore::RenderTableCell::paint):
    * rendering/RenderTableSection.cpp:
    (WebCore::RenderTableSection::paintObject):
    * rendering/RenderText.cpp:
    (WebCore::RenderText::absoluteQuads):
    * rendering/RenderTextControlSingleLine.cpp:
    (WebCore::RenderTextControlSingleLine::forwardEvent):
    * rendering/RenderThemeMac.mm:
    (WebCore::RenderThemeMac::paintMenuListButtonGradients):
    (WebCore::RenderThemeMac::paintMenuListButton):
    (WebCore::RenderThemeMac::paintSliderTrack):
    * rendering/RenderView.cpp:
    (WebCore::RenderView::computeRectForRepaint):
    (WebCore::RenderView::docBottom):
    (WebCore::RenderView::docRight):
    * rendering/RootInlineBox.cpp:
    (WebCore::RootInlineBox::paddedLayoutOverflowRect):
    * rendering/svg/RenderSVGInlineText.cpp:
    (WebCore::RenderSVGInlineText::localCaretRect):
    
    ../WebKit/mac:
    
    * WebView/WebHTMLView.mm:
    (setNeedsDisplayInRect):
    
    ../WebKit2:
    
    * Platform/Region.cpp:
    (WebKit::Region::Shape::Shape):
    * UIProcess/API/mac/WKPrintingView.mm:
    (pageDidComputePageRects):
    * UIProcess/FindIndicator.cpp:
    (WebKit::FindIndicator::draw):
    * UIProcess/TiledDrawingAreaProxy.cpp:
    (WebKit::TiledDrawingAreaProxy::invalidate):
    (WebKit::TiledDrawingAreaProxy::paint):
    (WebKit::TiledDrawingAreaProxy::createTiles):
    * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
    (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
    * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
    (WebKit::NetscapePlugin::callSetWindow):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77286 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 84c0dc6..748f99b 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,192 @@
+2011-02-01  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Oliver Hunt.
+
+        https://bugs.webkit.org/show_bug.cgi?id=53520
+        
+        Remove the physical terminology from IntRect and FloatRect.
+        
+        Now that we have flipped RenderBlocks for vertical-rl and horizontal-bt writing modes,
+        we need to update our terminology to be more accurate.
+
+        I'm borrowing a page from AppKit here (which also supports flipped NSViews) and
+        renaming right() and bottom() to maxX() and maxY().  These terms remain accurate
+        even for flipped rectangles.
+
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
+        * accessibility/mac/AccessibilityObjectWrapper.mm:
+        (-[AccessibilityObjectWrapper position]):
+        * dom/ClientRect.h:
+        (WebCore::ClientRect::right):
+        (WebCore::ClientRect::bottom):
+        * html/HTMLCanvasElement.cpp:
+        (WebCore::HTMLCanvasElement::convertLogicalToDevice):
+        * html/canvas/CanvasRenderingContext2D.cpp:
+        (WebCore::normalizeRect):
+        * inspector/InspectorAgent.cpp:
+        (WebCore::InspectorAgent::drawElementTitle):
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::adjustWindowRect):
+        * page/DragController.cpp:
+        (WebCore::dragLocForSelectionDrag):
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::sendContextMenuEventForKey):
+        * page/PrintContext.cpp:
+        (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
+        (WebCore::PrintContext::pageNumberForElement):
+        * page/SpatialNavigation.cpp:
+        (WebCore::end):
+        (WebCore::areRectsFullyAligned):
+        (WebCore::areRectsMoreThanFullScreenApart):
+        (WebCore::below):
+        (WebCore::rightOf):
+        (WebCore::isRectInDirection):
+        (WebCore::entryAndExitPointsForDirection):
+        (WebCore::virtualRectForDirection):
+        * page/WindowFeatures.cpp:
+        (WebCore::WindowFeatures::WindowFeatures):
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::wheelEvent):
+        * platform/Scrollbar.cpp:
+        (WebCore::Scrollbar::setFrameRect):
+        * platform/ScrollbarThemeComposite.cpp:
+        (WebCore::ScrollbarThemeComposite::splitTrack):
+        * platform/chromium/ScrollbarThemeChromium.cpp:
+        (WebCore::ScrollbarThemeChromium::paintTickmarks):
+        * platform/graphics/FloatQuad.h:
+        (WebCore::FloatQuad::FloatQuad):
+        * platform/graphics/FloatRect.cpp:
+        (WebCore::FloatRect::intersects):
+        (WebCore::FloatRect::contains):
+        (WebCore::FloatRect::intersect):
+        (WebCore::FloatRect::unite):
+        (WebCore::enclosingIntRect):
+        * platform/graphics/FloatRect.h:
+        (WebCore::FloatRect::maxX):
+        (WebCore::FloatRect::maxY):
+        (WebCore::FloatRect::contains):
+        * platform/graphics/IntRect.cpp:
+        (WebCore::IntRect::intersects):
+        (WebCore::IntRect::contains):
+        (WebCore::IntRect::intersect):
+        (WebCore::IntRect::unite):
+        * platform/graphics/IntRect.h:
+        (WebCore::IntRect::maxX):
+        (WebCore::IntRect::maxY):
+        (WebCore::IntRect::shiftXEdgeTo):
+        (WebCore::IntRect::shiftMaxXEdgeTo):
+        (WebCore::IntRect::shiftYEdgeTo):
+        (WebCore::IntRect::shiftMaxYEdgeTo):
+        (WebCore::IntRect::contains):
+        * platform/graphics/WidthIterator.cpp:
+        (WebCore::WidthIterator::advance):
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::GraphicsContext::drawRect):
+        (WebCore::GraphicsContext::fillPath):
+        (WebCore::GraphicsContext::fillRect):
+        * platform/graphics/cg/ImageBufferCG.cpp:
+        (WebCore::getImageData):
+        (WebCore::putImageData):
+        * platform/graphics/cg/ImageCG.cpp:
+        (WebCore::BitmapImage::draw):
+        * platform/graphics/filters/FilterEffect.cpp:
+        (WebCore::FilterEffect::copyImageBytes):
+        * platform/graphics/mac/ComplexTextController.cpp:
+        (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
+        * platform/graphics/mac/SimpleFontDataMac.mm:
+        (WebCore::SimpleFontData::platformBoundsForGlyph):
+        * platform/graphics/transforms/AffineTransform.cpp:
+        (WebCore::AffineTransform::mapRect):
+        * platform/graphics/win/FontCGWin.cpp:
+        (WebCore::drawGDIGlyphs):
+        * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
+        (WebCore::MediaPlayerPrivate::paint):
+        * platform/gtk/RenderThemeGtk.cpp:
+        (WebCore::centerRectVerticallyInParentInputElement):
+        * platform/mac/WidgetMac.mm:
+        (WebCore::Widget::paint):
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
+        (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::selectionRect):
+        (WebCore::InlineTextBox::paint):
+        (WebCore::InlineTextBox::positionForOffset):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::addOverflowFromChildren):
+        (WebCore::RenderBlock::paintChildren):
+        (WebCore::RenderBlock::paintEllipsisBoxes):
+        (WebCore::RenderBlock::inlineSelectionGaps):
+        (WebCore::RenderBlock::adjustPointToColumnContents):
+        (WebCore::RenderBlock::flipForWritingModeIncludingColumns):
+        (WebCore::RenderBlock::adjustForColumns):
+        * rendering/RenderBlock.h:
+        (WebCore::RenderBlock::FloatingObject::right):
+        (WebCore::RenderBlock::FloatingObject::bottom):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::reflectedRect):
+        (WebCore::RenderBox::localCaretRect):
+        (WebCore::RenderBox::addShadowOverflow):
+        (WebCore::RenderBox::addLayoutOverflow):
+        (WebCore::RenderBox::visualOverflowRectForPropagation):
+        (WebCore::RenderBox::layoutOverflowRectForPropagation):
+        (WebCore::RenderBox::flipForWritingMode):
+        * rendering/RenderFrameSet.cpp:
+        (WebCore::RenderFrameSet::paintColumnBorder):
+        (WebCore::RenderFrameSet::paintRowBorder):
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::paintOutlineForLine):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::getRectToExpose):
+        (WebCore::cornerRect):
+        (WebCore::RenderLayer::positionOverflowControls):
+        (WebCore::RenderLayer::overflowBottom):
+        (WebCore::RenderLayer::overflowRight):
+        (WebCore::RenderLayer::paintResizer):
+        * rendering/RenderLineBoxList.cpp:
+        (WebCore::RenderLineBoxList::rangeIntersectsRect):
+        (WebCore::RenderLineBoxList::paint):
+        * rendering/RenderListItem.cpp:
+        (WebCore::RenderListItem::positionListMarker):
+        * rendering/RenderListMarker.cpp:
+        (WebCore::RenderListMarker::paint):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
+        * rendering/RenderOverflow.h:
+        (WebCore::RenderOverflow::RenderOverflow):
+        (WebCore::RenderOverflow::addLayoutOverflow):
+        (WebCore::RenderOverflow::addVisualOverflow):
+        (WebCore::RenderOverflow::setLayoutOverflow):
+        (WebCore::RenderOverflow::setVisualOverflow):
+        (WebCore::RenderOverflow::resetLayoutOverflow):
+        * rendering/RenderReplaced.cpp:
+        (WebCore::RenderReplaced::shouldPaint):
+        * rendering/RenderScrollbarTheme.cpp:
+        (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::paint):
+        * rendering/RenderTableCell.cpp:
+        (WebCore::RenderTableCell::paint):
+        * rendering/RenderTableSection.cpp:
+        (WebCore::RenderTableSection::paintObject):
+        * rendering/RenderText.cpp:
+        (WebCore::RenderText::absoluteQuads):
+        * rendering/RenderTextControlSingleLine.cpp:
+        (WebCore::RenderTextControlSingleLine::forwardEvent):
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::paintMenuListButtonGradients):
+        (WebCore::RenderThemeMac::paintMenuListButton):
+        (WebCore::RenderThemeMac::paintSliderTrack):
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::computeRectForRepaint):
+        (WebCore::RenderView::docBottom):
+        (WebCore::RenderView::docRight):
+        * rendering/RootInlineBox.cpp:
+        (WebCore::RootInlineBox::paddedLayoutOverflowRect):
+        * rendering/svg/RenderSVGInlineText.cpp:
+        (WebCore::RenderSVGInlineText::localCaretRect):
+
 2011-02-01  Beth Dakin  <bdakin at apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
index b3fc10b..ea4844f 100644
--- a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -2519,7 +2519,7 @@ IntRect AccessibilityRenderObject::boundsForVisiblePositionRange(const VisiblePo
     ourrect.unite(rect2);
     
     // if the rectangle spans lines and contains multiple text chars, use the range's bounding box intead
-    if (rect1.bottom() != rect2.bottom()) {
+    if (rect1.maxY() != rect2.maxY()) {
         RefPtr<Range> dataRange = makeRange(range.start, range.end);
         IntRect boundingBox = dataRange->boundingBox();
         String rangeString = plainText(dataRange.get());
diff --git a/Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm b/Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
index c2e3724..5d20acb 100644
--- a/Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
+++ b/Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
@@ -1125,7 +1125,7 @@ static NSMutableArray* convertToNSArray(const AccessibilityObject::Accessibility
         point.y = screenHeight - (point.y + remotePosition.y + rect.height() - scrollPosition.y);
     } else {
         // The Cocoa accessibility API wants the lower-left corner.
-        point = NSMakePoint(rect.x(), rect.bottom());
+        point = NSMakePoint(rect.x(), rect.maxY());
         
         if (frameView) {
             NSView* view = frameView->documentView();
diff --git a/Source/WebCore/dom/ClientRect.h b/Source/WebCore/dom/ClientRect.h
index f9acef0..f739497 100644
--- a/Source/WebCore/dom/ClientRect.h
+++ b/Source/WebCore/dom/ClientRect.h
@@ -42,8 +42,8 @@ namespace WebCore {
         static PassRefPtr<ClientRect> create(const FloatRect& rect) { return adoptRef(new ClientRect(rect)); }
 
         float top() const { return m_rect.y(); }
-        float right() const { return m_rect.right(); }
-        float bottom() const { return m_rect.bottom(); }
+        float right() const { return m_rect.maxX(); }
+        float bottom() const { return m_rect.maxY(); }
         float left() const { return m_rect.x(); }
         float width() const { return m_rect.width(); }
         float height() const { return m_rect.height(); }
diff --git a/Source/WebCore/html/HTMLCanvasElement.cpp b/Source/WebCore/html/HTMLCanvasElement.cpp
index c925b3e..f58465b 100644
--- a/Source/WebCore/html/HTMLCanvasElement.cpp
+++ b/Source/WebCore/html/HTMLCanvasElement.cpp
@@ -344,10 +344,10 @@ String HTMLCanvasElement::toDataURL(const String& mimeType, const double* qualit
 
 IntRect HTMLCanvasElement::convertLogicalToDevice(const FloatRect& logicalRect) const
 {
-    float left = floorf(logicalRect.left() * m_pageScaleFactor);
-    float top = floorf(logicalRect.top() * m_pageScaleFactor);
-    float right = ceilf(logicalRect.right() * m_pageScaleFactor);
-    float bottom = ceilf(logicalRect.bottom() * m_pageScaleFactor);
+    float left = floorf(logicalRect.x() * m_pageScaleFactor);
+    float top = floorf(logicalRect.y() * m_pageScaleFactor);
+    float right = ceilf(logicalRect.maxX() * m_pageScaleFactor);
+    float bottom = ceilf(logicalRect.maxY() * m_pageScaleFactor);
     
     return IntRect(IntPoint(left, top), convertToValidDeviceSize(right - left, bottom - top));
 }
diff --git a/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
index 3078d08..458a168 100644
--- a/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
+++ b/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
@@ -1105,8 +1105,8 @@ static IntSize size(HTMLVideoElement* video)
 
 static inline FloatRect normalizeRect(const FloatRect& rect)
 {
-    return FloatRect(min(rect.x(), rect.right()),
-        min(rect.y(), rect.bottom()),
+    return FloatRect(min(rect.x(), rect.maxX()),
+        min(rect.y(), rect.maxY()),
         max(rect.width(), -rect.width()),
         max(rect.height(), -rect.height()));
 }
diff --git a/Source/WebCore/inspector/InspectorAgent.cpp b/Source/WebCore/inspector/InspectorAgent.cpp
index 43eeb7a..664277e 100644
--- a/Source/WebCore/inspector/InspectorAgent.cpp
+++ b/Source/WebCore/inspector/InspectorAgent.cpp
@@ -1274,7 +1274,7 @@ void InspectorAgent::drawElementTitle(GraphicsContext& context, const IntRect& b
     font.update(0);
 
     TextRun nodeTitleRun(nodeTitle);
-    IntPoint titleBasePoint = boundingBox.bottomLeft();
+    IntPoint titleBasePoint = IntPoint(boundingBox.x(), boundingBox.maxY() - 1);
     titleBasePoint.move(rectInflatePx, rectInflatePx);
     IntRect titleRect = enclosingIntRect(font.selectionRectForText(nodeTitleRun, titleBasePoint, fontHeightPx));
     titleRect.inflate(rectInflatePx);
@@ -1284,19 +1284,19 @@ void InspectorAgent::drawElementTitle(GraphicsContext& context, const IntRect& b
     int dy = borderWidthPx;
 
     // If the tip sticks beyond the right of overlayRect, right-align the tip with the said boundary.
-    if (titleRect.right() > overlayRect.right())
-        dx = overlayRect.right() - titleRect.right();
+    if (titleRect.maxX() > overlayRect.maxX())
+        dx = overlayRect.maxX() - titleRect.maxX();
 
     // If the tip sticks beyond the left of overlayRect, left-align the tip with the said boundary.
     if (titleRect.x() + dx < overlayRect.x())
         dx = overlayRect.x() - titleRect.x() - borderWidthPx;
 
     // If the tip sticks beyond the bottom of overlayRect, show the tip at top of bounding box.
-    if (titleRect.bottom() > overlayRect.bottom()) {
-        dy = boundingBox.y() - titleRect.bottom() - borderWidthPx;
+    if (titleRect.maxY() > overlayRect.maxY()) {
+        dy = boundingBox.y() - titleRect.maxY() - borderWidthPx;
         // If the tip still sticks beyond the bottom of overlayRect, bottom-align the tip with the said boundary.
-        if (titleRect.bottom() + dy > overlayRect.bottom())
-            dy = overlayRect.bottom() - titleRect.bottom();
+        if (titleRect.maxY() + dy > overlayRect.maxY())
+            dy = overlayRect.maxY() - titleRect.maxY();
     }
 
     // If the tip sticks beyond the top of overlayRect, show the tip at top of overlayRect.
diff --git a/Source/WebCore/page/DOMWindow.cpp b/Source/WebCore/page/DOMWindow.cpp
index 572e559..0e373e5 100644
--- a/Source/WebCore/page/DOMWindow.cpp
+++ b/Source/WebCore/page/DOMWindow.cpp
@@ -342,8 +342,8 @@ void DOMWindow::adjustWindowRect(const FloatRect& screen, FloatRect& window, con
     window.setHeight(min(max(100.0f, window.height()), screen.height()));
     
     // Constrain the window position to the screen.
-    window.setX(max(screen.x(), min(window.x(), screen.right() - window.width())));
-    window.setY(max(screen.y(), min(window.y(), screen.bottom() - window.height())));
+    window.setX(max(screen.x(), min(window.x(), screen.maxX() - window.width())));
+    window.setY(max(screen.y(), min(window.y(), screen.maxY() - window.height())));
 }
 
 // FIXME: We can remove this function once V8 showModalDialog is changed to use DOMWindow.
diff --git a/Source/WebCore/page/DragController.cpp b/Source/WebCore/page/DragController.cpp
index 7be708c..849feea 100644
--- a/Source/WebCore/page/DragController.cpp
+++ b/Source/WebCore/page/DragController.cpp
@@ -644,9 +644,9 @@ static IntPoint dragLocForDHTMLDrag(const IntPoint& mouseDraggedPoint, const Int
 static IntPoint dragLocForSelectionDrag(Frame* src)
 {
     IntRect draggingRect = enclosingIntRect(src->selection()->bounds());
-    int xpos = draggingRect.right();
+    int xpos = draggingRect.maxX();
     xpos = draggingRect.x() < xpos ? draggingRect.x() : xpos;
-    int ypos = draggingRect.bottom();
+    int ypos = draggingRect.maxY();
 #if PLATFORM(MAC)
     // Deal with flipped coordinates on Mac
     ypos = draggingRect.y() > ypos ? draggingRect.y() : ypos;
diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp
index 5734f93..7e7b6ce 100644
--- a/Source/WebCore/page/EventHandler.cpp
+++ b/Source/WebCore/page/EventHandler.cpp
@@ -2132,12 +2132,12 @@ bool EventHandler::sendContextMenuEventForKey()
         RefPtr<Range> selection = selectionController->toNormalizedRange();
         IntRect firstRect = m_frame->editor()->firstRectForRange(selection.get());
 
-        int x = rightAligned ? firstRect.right() : firstRect.x();
-        location = IntPoint(x, firstRect.bottom());
+        int x = rightAligned ? firstRect.maxX() : firstRect.x();
+        location = IntPoint(x, firstRect.maxY());
     } else if (focusedNode) {
         RenderBoxModelObject* box = focusedNode->renderBoxModelObject();
         IntRect clippedRect = box->absoluteClippedOverflowRect();
-        location = clippedRect.bottomLeft();
+        location = IntPoint(clippedRect.x(), clippedRect.maxY() - 1);
     } else {
         location = IntPoint(
             rightAligned ? view->contentsWidth() - kContextMenuMargin : kContextMenuMargin,
diff --git a/Source/WebCore/page/PrintContext.cpp b/Source/WebCore/page/PrintContext.cpp
index 3cd59a7..ecd8e0c 100644
--- a/Source/WebCore/page/PrintContext.cpp
+++ b/Source/WebCore/page/PrintContext.cpp
@@ -135,24 +135,24 @@ void PrintContext::computePageRectsWithPageSizeInternal(const FloatSize& pageSiz
     int blockDirectionEnd;
     if (isHorizontal) {
         if (view->style()->isFlippedBlocksWritingMode()) {
-            blockDirectionStart = docRect.bottom();
+            blockDirectionStart = docRect.maxY();
             blockDirectionEnd = docRect.y();
         } else {
             blockDirectionStart = docRect.y();
-            blockDirectionEnd = docRect.bottom();
+            blockDirectionEnd = docRect.maxY();
         }
-        inlineDirectionStart = view->style()->isLeftToRightDirection() ? docRect.x() : docRect.right();
-        inlineDirectionEnd = view->style()->isLeftToRightDirection() ? docRect.right() : docRect.x();
+        inlineDirectionStart = view->style()->isLeftToRightDirection() ? docRect.x() : docRect.maxX();
+        inlineDirectionEnd = view->style()->isLeftToRightDirection() ? docRect.maxX() : docRect.x();
     } else {
         if (view->style()->isFlippedBlocksWritingMode()) {
-            blockDirectionStart = docRect.right();
+            blockDirectionStart = docRect.maxX();
             blockDirectionEnd = docRect.x();
         } else {
             blockDirectionStart = docRect.x();
-            blockDirectionEnd = docRect.right();
+            blockDirectionEnd = docRect.maxX();
         }
-        inlineDirectionStart = view->style()->isLeftToRightDirection() ? docRect.y() : docRect.bottom();
-        inlineDirectionEnd = view->style()->isLeftToRightDirection() ? docRect.bottom() : docRect.y();
+        inlineDirectionStart = view->style()->isLeftToRightDirection() ? docRect.y() : docRect.maxY();
+        inlineDirectionEnd = view->style()->isLeftToRightDirection() ? docRect.maxY() : docRect.y();
     }
 
     unsigned pageCount = ceilf((float)docLogicalHeight / pageLogicalHeight);
@@ -274,7 +274,7 @@ int PrintContext::pageNumberForElement(Element* element, const FloatSize& pageSi
     size_t pageNumber = 0;
     for (; pageNumber < printContext.pageCount(); pageNumber++) {
         const IntRect& page = printContext.pageRect(pageNumber);
-        if (page.x() <= left && left < page.right() && page.y() <= top && top < page.bottom())
+        if (page.x() <= left && left < page.maxX() && page.y() <= top && top < page.maxY())
             return pageNumber;
     }
     return -1;
diff --git a/Source/WebCore/page/SpatialNavigation.cpp b/Source/WebCore/page/SpatialNavigation.cpp
index 7d8ede3..f66d823 100644
--- a/Source/WebCore/page/SpatialNavigation.cpp
+++ b/Source/WebCore/page/SpatialNavigation.cpp
@@ -127,7 +127,7 @@ static inline int middle(FocusDirection direction, const IntRect& rect)
 
 static inline int end(FocusDirection direction, const IntRect& rect)
 {
-    return isHorizontalMove(direction) ? rect.bottom() : rect.right();
+    return isHorizontalMove(direction) ? rect.maxY() : rect.maxX();
 }
 
 // This method checks if rects |a| and |b| are fully aligned either vertically or
@@ -144,11 +144,11 @@ static bool areRectsFullyAligned(FocusDirection direction, const IntRect& a, con
     switch (direction) {
     case FocusDirectionLeft:
         aStart = a.x();
-        bEnd = b.right();
+        bEnd = b.maxX();
         break;
     case FocusDirectionRight:
         aStart = b.x();
-        bEnd = a.right();
+        bEnd = a.maxX();
         break;
     case FocusDirectionUp:
         aStart = a.y();
@@ -245,13 +245,13 @@ static bool areRectsMoreThanFullScreenApart(FocusDirection direction, const IntR
 
     switch (direction) {
     case FocusDirectionLeft:
-        return curRect.x() - targetRect.right() > viewSize.width();
+        return curRect.x() - targetRect.maxX() > viewSize.width();
     case FocusDirectionRight:
-        return targetRect.x() - curRect.right() > viewSize.width();
+        return targetRect.x() - curRect.maxX() > viewSize.width();
     case FocusDirectionUp:
-        return curRect.y() - targetRect.bottom() > viewSize.height();
+        return curRect.y() - targetRect.maxY() > viewSize.height();
     case FocusDirectionDown:
-        return targetRect.y() - curRect.bottom() > viewSize.height();
+        return targetRect.y() - curRect.maxY() > viewSize.height();
     default:
         ASSERT_NOT_REACHED();
         return true;
@@ -261,26 +261,26 @@ static bool areRectsMoreThanFullScreenApart(FocusDirection direction, const IntR
 // Return true if rect |a| is below |b|. False otherwise.
 static inline bool below(const IntRect& a, const IntRect& b)
 {
-    return a.y() > b.bottom();
+    return a.y() > b.maxY();
 }
 
 // Return true if rect |a| is on the right of |b|. False otherwise.
 static inline bool rightOf(const IntRect& a, const IntRect& b)
 {
-    return a.x() > b.right();
+    return a.x() > b.maxX();
 }
 
 static bool isRectInDirection(FocusDirection direction, const IntRect& curRect, const IntRect& targetRect)
 {
     switch (direction) {
     case FocusDirectionLeft:
-        return targetRect.right() <= curRect.x();
+        return targetRect.maxX() <= curRect.x();
     case FocusDirectionRight:
-        return targetRect.x() >= curRect.right();
+        return targetRect.x() >= curRect.maxX();
     case FocusDirectionUp:
-        return targetRect.bottom() <= curRect.y();
+        return targetRect.maxY() <= curRect.y();
     case FocusDirectionDown:
-        return targetRect.y() >= curRect.bottom();
+        return targetRect.y() >= curRect.maxY();
     default:
         ASSERT_NOT_REACHED();
         return false;
@@ -544,18 +544,18 @@ void entryAndExitPointsForDirection(FocusDirection direction, const IntRect& sta
     switch (direction) {
     case FocusDirectionLeft:
         exitPoint.setX(startingRect.x());
-        entryPoint.setX(potentialRect.right());
+        entryPoint.setX(potentialRect.maxX());
         break;
     case FocusDirectionUp:
         exitPoint.setY(startingRect.y());
-        entryPoint.setY(potentialRect.bottom());
+        entryPoint.setY(potentialRect.maxY());
         break;
     case FocusDirectionRight:
-        exitPoint.setX(startingRect.right());
+        exitPoint.setX(startingRect.maxX());
         entryPoint.setX(potentialRect.x());
         break;
     case FocusDirectionDown:
-        exitPoint.setY(startingRect.bottom());
+        exitPoint.setY(startingRect.maxY());
         entryPoint.setY(potentialRect.y());
         break;
     default:
@@ -567,9 +567,9 @@ void entryAndExitPointsForDirection(FocusDirection direction, const IntRect& sta
     case FocusDirectionRight:
         if (below(startingRect, potentialRect)) {
             exitPoint.setY(startingRect.y());
-            entryPoint.setY(potentialRect.bottom());
+            entryPoint.setY(potentialRect.maxY());
         } else if (below(potentialRect, startingRect)) {
-            exitPoint.setY(startingRect.bottom());
+            exitPoint.setY(startingRect.maxY());
             entryPoint.setY(potentialRect.y());
         } else {
             exitPoint.setY(max(startingRect.y(), potentialRect.y()));
@@ -580,9 +580,9 @@ void entryAndExitPointsForDirection(FocusDirection direction, const IntRect& sta
     case FocusDirectionDown:
         if (rightOf(startingRect, potentialRect)) {
             exitPoint.setX(startingRect.x());
-            entryPoint.setX(potentialRect.right());
+            entryPoint.setX(potentialRect.maxX());
         } else if (rightOf(potentialRect, startingRect)) {
-            exitPoint.setX(startingRect.right());
+            exitPoint.setX(startingRect.maxX());
             entryPoint.setX(potentialRect.x());
         } else {
             exitPoint.setX(max(startingRect.x(), potentialRect.x()));
@@ -675,11 +675,11 @@ IntRect virtualRectForDirection(FocusDirection direction, const IntRect& startin
     IntRect virtualStartingRect = startingRect;
     switch (direction) {
     case FocusDirectionLeft:
-        virtualStartingRect.setX(virtualStartingRect.right() - width);
+        virtualStartingRect.setX(virtualStartingRect.maxX() - width);
         virtualStartingRect.setWidth(width);
         break;
     case FocusDirectionUp:
-        virtualStartingRect.setY(virtualStartingRect.bottom() - width);
+        virtualStartingRect.setY(virtualStartingRect.maxY() - width);
         virtualStartingRect.setHeight(width);
         break;
     case FocusDirectionRight:
diff --git a/Source/WebCore/page/WindowFeatures.cpp b/Source/WebCore/page/WindowFeatures.cpp
index a229ae1..7564152 100644
--- a/Source/WebCore/page/WindowFeatures.cpp
+++ b/Source/WebCore/page/WindowFeatures.cpp
@@ -186,9 +186,9 @@ WindowFeatures::WindowFeatures(const String& dialogFeaturesString, const FloatRe
     width = floatFeature(features, "dialogwidth", 100, screenAvailableRect.width(), 620); // default here came from frame size of dialog in MacIE
     height = floatFeature(features, "dialogheight", 100, screenAvailableRect.height(), 450); // default here came from frame size of dialog in MacIE
 
-    x = floatFeature(features, "dialogleft", screenAvailableRect.x(), screenAvailableRect.right() - width, -1);
+    x = floatFeature(features, "dialogleft", screenAvailableRect.x(), screenAvailableRect.maxX() - width, -1);
     xSet = x > 0;
-    y = floatFeature(features, "dialogtop", screenAvailableRect.y(), screenAvailableRect.bottom() - height, -1);
+    y = floatFeature(features, "dialogtop", screenAvailableRect.y(), screenAvailableRect.maxY() - height, -1);
     ySet = y > 0;
 
     if (boolFeature(features, "center", true)) {
diff --git a/Source/WebCore/platform/ScrollView.cpp b/Source/WebCore/platform/ScrollView.cpp
index caa3b45..f4a5bf2 100644
--- a/Source/WebCore/platform/ScrollView.cpp
+++ b/Source/WebCore/platform/ScrollView.cpp
@@ -925,7 +925,7 @@ void ScrollView::calculateOverhangAreasForPainting(IntRect& horizontalOverhangRe
     } else if (scrollY() > contentsHeight() - visibleContentRect(true).height()) {
         int height = scrollY() - (contentsHeight() - visibleContentRect(true).height());
         horizontalOverhangRect = frameRect();
-        horizontalOverhangRect.setY(frameRect().bottom() - height);
+        horizontalOverhangRect.setY(frameRect().maxY() - height);
         horizontalOverhangRect.setHeight(height);
     }
 
@@ -941,7 +941,7 @@ void ScrollView::calculateOverhangAreasForPainting(IntRect& horizontalOverhangRe
         int width = scrollX() - (contentsWidth() - visibleContentRect(true).width());
         verticalOverhangRect.setWidth(width);
         verticalOverhangRect.setHeight(frameRect().height() - horizontalOverhangRect.height());
-        verticalOverhangRect.setX(frameRect().right() - width);
+        verticalOverhangRect.setX(frameRect().maxX() - width);
         if (horizontalOverhangRect.y() == frameRect().y())
             verticalOverhangRect.setY(frameRect().y() + horizontalOverhangRect.height());
         else
diff --git a/Source/WebCore/platform/Scrollbar.cpp b/Source/WebCore/platform/Scrollbar.cpp
index 4c625f4..29dce4f 100644
--- a/Source/WebCore/platform/Scrollbar.cpp
+++ b/Source/WebCore/platform/Scrollbar.cpp
@@ -393,14 +393,14 @@ void Scrollbar::setFrameRect(const IntRect& rect)
         IntRect resizerRect = view->convertFromContainingWindow(view->windowResizerRect());
         if (rect.intersects(resizerRect)) {
             if (orientation() == HorizontalScrollbar) {
-                int overlap = rect.right() - resizerRect.x();
-                if (overlap > 0 && resizerRect.right() >= rect.right()) {
+                int overlap = rect.maxX() - resizerRect.x();
+                if (overlap > 0 && resizerRect.maxX() >= rect.maxX()) {
                     adjustedRect.setWidth(rect.width() - overlap);
                     overlapsResizer = true;
                 }
             } else {
-                int overlap = rect.bottom() - resizerRect.y();
-                if (overlap > 0 && resizerRect.bottom() >= rect.bottom()) {
+                int overlap = rect.maxY() - resizerRect.y();
+                if (overlap > 0 && resizerRect.maxY() >= rect.maxY()) {
                     adjustedRect.setHeight(rect.height() - overlap);
                     overlapsResizer = true;
                 }
diff --git a/Source/WebCore/platform/ScrollbarThemeComposite.cpp b/Source/WebCore/platform/ScrollbarThemeComposite.cpp
index 7fd08a9..26f1494 100644
--- a/Source/WebCore/platform/ScrollbarThemeComposite.cpp
+++ b/Source/WebCore/platform/ScrollbarThemeComposite.cpp
@@ -248,11 +248,11 @@ void ScrollbarThemeComposite::splitTrack(Scrollbar* scrollbar, const IntRect& un
     if (scrollbar->orientation() == HorizontalScrollbar) {
         thumbRect = IntRect(trackRect.x() + thumbPos, trackRect.y() + (trackRect.height() - thickness) / 2, thumbLength(scrollbar), thickness); 
         beforeThumbRect = IntRect(trackRect.x(), trackRect.y(), thumbPos + thumbRect.width() / 2, trackRect.height()); 
-        afterThumbRect = IntRect(trackRect.x() + beforeThumbRect.width(), trackRect.y(), trackRect.right() - beforeThumbRect.right(), trackRect.height());
+        afterThumbRect = IntRect(trackRect.x() + beforeThumbRect.width(), trackRect.y(), trackRect.maxX() - beforeThumbRect.maxX(), trackRect.height());
     } else {
         thumbRect = IntRect(trackRect.x() + (trackRect.width() - thickness) / 2, trackRect.y() + thumbPos, thickness, thumbLength(scrollbar));
         beforeThumbRect = IntRect(trackRect.x(), trackRect.y(), trackRect.width(), thumbPos + thumbRect.height() / 2); 
-        afterThumbRect = IntRect(trackRect.x(), trackRect.y() + beforeThumbRect.height(), trackRect.width(), trackRect.bottom() - beforeThumbRect.bottom());
+        afterThumbRect = IntRect(trackRect.x(), trackRect.y() + beforeThumbRect.height(), trackRect.width(), trackRect.maxY() - beforeThumbRect.maxY());
     }
 }
 
diff --git a/Source/WebCore/platform/chromium/ScrollbarThemeChromium.cpp b/Source/WebCore/platform/chromium/ScrollbarThemeChromium.cpp
index b23e625..9e700c2 100644
--- a/Source/WebCore/platform/chromium/ScrollbarThemeChromium.cpp
+++ b/Source/WebCore/platform/chromium/ScrollbarThemeChromium.cpp
@@ -128,7 +128,7 @@ void ScrollbarThemeChromium::paintTickmarks(GraphicsContext* context, Scrollbar*
         const float percent = static_cast<float>(i->y()) / scrollbar->totalSize();
 
         // Calculate how far down (in pixels) the tick-mark should appear.
-        const int yPos = rect.topLeft().y() + (rect.height() * percent);
+        const int yPos = rect.y() + (rect.height() * percent);
 
         IntPoint tick(scrollbar->x(), yPos);
         context->drawImage(dash.get(), ColorSpaceDeviceRGB, tick);
diff --git a/Source/WebCore/platform/graphics/FloatQuad.h b/Source/WebCore/platform/graphics/FloatQuad.h
index 6cd86f6..e913723 100644
--- a/Source/WebCore/platform/graphics/FloatQuad.h
+++ b/Source/WebCore/platform/graphics/FloatQuad.h
@@ -54,9 +54,9 @@ public:
 
     FloatQuad(const FloatRect& inRect)
         : m_p1(inRect.location())
-        , m_p2(inRect.right(), inRect.y())
-        , m_p3(inRect.right(), inRect.bottom())
-        , m_p4(inRect.x(), inRect.bottom())
+        , m_p2(inRect.maxX(), inRect.y())
+        , m_p3(inRect.maxX(), inRect.maxY())
+        , m_p4(inRect.x(), inRect.maxY())
     {
     }
 
diff --git a/Source/WebCore/platform/graphics/FloatRect.cpp b/Source/WebCore/platform/graphics/FloatRect.cpp
index 0d8a24e..36f3d3a 100644
--- a/Source/WebCore/platform/graphics/FloatRect.cpp
+++ b/Source/WebCore/platform/graphics/FloatRect.cpp
@@ -51,22 +51,22 @@ bool FloatRect::intersects(const FloatRect& other) const
 {
     // Checking emptiness handles negative widths as well as zero.
     return !isEmpty() && !other.isEmpty()
-        && x() < other.right() && other.x() < right()
-        && y() < other.bottom() && other.y() < bottom();
+        && x() < other.maxX() && other.x() < maxX()
+        && y() < other.maxY() && other.y() < maxY();
 }
 
 bool FloatRect::contains(const FloatRect& other) const
 {
-    return x() <= other.x() && right() >= other.right()
-        && y() <= other.y() && bottom() >= other.bottom();
+    return x() <= other.x() && maxX() >= other.maxX()
+        && y() <= other.y() && maxY() >= other.maxY();
 }
 
 void FloatRect::intersect(const FloatRect& other)
 {
     float l = max(x(), other.x());
     float t = max(y(), other.y());
-    float r = min(right(), other.right());
-    float b = min(bottom(), other.bottom());
+    float r = min(maxX(), other.maxX());
+    float b = min(maxY(), other.maxY());
 
     // Return a clean empty rectangle for non-intersecting cases.
     if (l >= r || t >= b) {
@@ -91,8 +91,8 @@ void FloatRect::unite(const FloatRect& other)
 
     float l = min(x(), other.x());
     float t = min(y(), other.y());
-    float r = max(right(), other.right());
-    float b = max(bottom(), other.bottom());
+    float r = max(maxX(), other.maxX());
+    float b = max(maxY(), other.maxY());
 
     setLocationAndSizeFromEdges(l, t, r, b);
 }
@@ -180,8 +180,8 @@ IntRect enclosingIntRect(const FloatRect& rect)
 {
     float left = floorf(rect.x());
     float top = floorf(rect.y());
-    float width = ceilf(rect.right()) - left;
-    float height = ceilf(rect.bottom()) - top;
+    float width = ceilf(rect.maxX()) - left;
+    float height = ceilf(rect.maxY()) - top;
     return IntRect(safeFloatToInt(left), safeFloatToInt(top), 
                    safeFloatToInt(width), safeFloatToInt(height));
 }
diff --git a/Source/WebCore/platform/graphics/FloatRect.h b/Source/WebCore/platform/graphics/FloatRect.h
index 10ad838..307aa29 100644
--- a/Source/WebCore/platform/graphics/FloatRect.h
+++ b/Source/WebCore/platform/graphics/FloatRect.h
@@ -90,6 +90,8 @@ public:
 
     float x() const { return m_location.x(); }
     float y() const { return m_location.y(); }
+    float maxX() const { return x() + width(); }
+    float maxY() const { return y() + height(); }
     float width() const { return m_size.width(); }
     float height() const { return m_size.height(); }
 
@@ -119,7 +121,7 @@ public:
     // Note, this doesn't match what IntRect::contains(IntPoint&) does; the int version
     // is really checking for containment of 1x1 rect, but that doesn't make sense with floats.
     bool contains(float px, float py) const
-        { return px >= x() && px <= right() && py >= y() && py <= bottom(); }
+        { return px >= x() && px <= maxX() && py >= y() && py <= maxY(); }
     bool contains(const FloatPoint& point) const { return contains(point.x(), point.y()); }
 
 
diff --git a/Source/WebCore/platform/graphics/IntRect.cpp b/Source/WebCore/platform/graphics/IntRect.cpp
index 188b5f9..7591c41 100644
--- a/Source/WebCore/platform/graphics/IntRect.cpp
+++ b/Source/WebCore/platform/graphics/IntRect.cpp
@@ -44,22 +44,22 @@ bool IntRect::intersects(const IntRect& other) const
 {
     // Checking emptiness handles negative widths as well as zero.
     return !isEmpty() && !other.isEmpty()
-        && x() < other.right() && other.x() < right()
-        && y() < other.bottom() && other.y() < bottom();
+        && x() < other.maxX() && other.x() < maxX()
+        && y() < other.maxY() && other.y() < maxY();
 }
 
 bool IntRect::contains(const IntRect& other) const
 {
-    return x() <= other.x() && right() >= other.right()
-        && y() <= other.y() && bottom() >= other.bottom();
+    return x() <= other.x() && maxX() >= other.maxX()
+        && y() <= other.y() && maxY() >= other.maxY();
 }
 
 void IntRect::intersect(const IntRect& other)
 {
     int l = max(x(), other.x());
     int t = max(y(), other.y());
-    int r = min(right(), other.right());
-    int b = min(bottom(), other.bottom());
+    int r = min(maxX(), other.maxX());
+    int b = min(maxY(), other.maxY());
 
     // Return a clean empty rectangle for non-intersecting cases.
     if (l >= r || t >= b) {
@@ -87,8 +87,8 @@ void IntRect::unite(const IntRect& other)
 
     int l = min(x(), other.x());
     int t = min(y(), other.y());
-    int r = max(right(), other.right());
-    int b = max(bottom(), other.bottom());
+    int r = max(maxX(), other.maxX());
+    int b = max(maxY(), other.maxY());
 
     m_location.setX(l);
     m_location.setY(t);
diff --git a/Source/WebCore/platform/graphics/IntRect.h b/Source/WebCore/platform/graphics/IntRect.h
index 638db75..0fcde0f 100644
--- a/Source/WebCore/platform/graphics/IntRect.h
+++ b/Source/WebCore/platform/graphics/IntRect.h
@@ -91,6 +91,8 @@ public:
 
     int x() const { return m_location.x(); }
     int y() const { return m_location.y(); }
+    int maxX() const { return x() + width(); }
+    int maxY() const { return y() + height(); }
     int width() const { return m_size.width(); }
     int height() const { return m_size.height(); }
 
@@ -99,13 +101,6 @@ public:
     void setWidth(int width) { m_size.setWidth(width); }
     void setHeight(int height) { m_size.setHeight(height); }
 
-    // Be careful with these functions.  The point is considered to be to the right and below.  These are not
-    // substitutes for right() and bottom().
-    IntPoint topLeft() const { return m_location; }
-    IntPoint topRight() const { return IntPoint(right() - 1, y()); }
-    IntPoint bottomLeft() const { return IntPoint(x(), bottom() - 1); }
-    IntPoint bottomRight() const { return IntPoint(right() - 1, bottom() - 1); }
-
     bool isEmpty() const { return m_size.isEmpty(); }
 
     int right() const { return x() + width(); }
@@ -118,26 +113,26 @@ public:
     void move(const IntSize& s) { m_location += s; } 
     void move(int dx, int dy) { m_location.move(dx, dy); } 
     
-    void shiftLeftEdgeTo(int edge)
+    void shiftXEdgeTo(int edge)
     {
         int delta = edge - x();
         setX(edge);
         setWidth(std::max(0, width() - delta));
     }
-    void shiftRightEdgeTo(int edge)
+    void shiftMaxXEdgeTo(int edge)
     {
-        int delta = edge - right();
+        int delta = edge - maxX();
         setWidth(std::max(0, width() + delta));
     }
-    void shiftTopEdgeTo(int edge)
+    void shiftYEdgeTo(int edge)
     {
         int delta = edge - y();
         setY(edge);
         setHeight(std::max(0, height() - delta));
     }
-    void shiftBottomEdgeTo(int edge)
+    void shiftMaxYEdgeTo(int edge)
     {
-        int delta = edge - bottom();
+        int delta = edge - maxY();
         setHeight(std::max(0, height() + delta));
     }
 
@@ -147,7 +142,7 @@ public:
     // This checks to see if the rect contains x,y in the traditional sense.
     // Equivalent to checking if the rect contains a 1x1 rect below and to the right of (px,py).
     bool contains(int px, int py) const
-        { return px >= x() && px < right() && py >= y() && py < bottom(); }
+        { return px >= x() && px < maxX() && py >= y() && py < maxY(); }
     bool contains(const IntPoint& point) const { return contains(point.x(), point.y()); }
 
     void intersect(const IntRect&);
diff --git a/Source/WebCore/platform/graphics/WidthIterator.cpp b/Source/WebCore/platform/graphics/WidthIterator.cpp
index 6d4fd95..a1a88da 100644
--- a/Source/WebCore/platform/graphics/WidthIterator.cpp
+++ b/Source/WebCore/platform/graphics/WidthIterator.cpp
@@ -255,9 +255,9 @@ void WidthIterator::advance(int offset, GlyphBuffer* glyphBuffer)
         lastRoundingWidth = width - oldWidth;
 
         if (m_accountForGlyphBounds) {
-            m_maxGlyphBoundingBoxY = max(m_maxGlyphBoundingBoxY, bounds.bottom());
+            m_maxGlyphBoundingBoxY = max(m_maxGlyphBoundingBoxY, bounds.maxY());
             m_minGlyphBoundingBoxY = min(m_minGlyphBoundingBoxY, bounds.y());
-            m_lastGlyphOverflow = max<float>(0, bounds.right() - width);
+            m_lastGlyphOverflow = max<float>(0, bounds.maxX() - width);
         }
     }
 
diff --git a/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp b/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
index b4acd0f..3591479 100644
--- a/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
+++ b/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
@@ -166,9 +166,9 @@ void GraphicsContext::drawRect(const IntRect& rect)
             setCGFillColor(context, strokeColor(), strokeColorSpace());
         CGRect rects[4] = {
             FloatRect(rect.x(), rect.y(), rect.width(), 1),
-            FloatRect(rect.x(), rect.bottom() - 1, rect.width(), 1),
+            FloatRect(rect.x(), rect.maxY() - 1, rect.width(), 1),
             FloatRect(rect.x(), rect.y() + 1, 1, rect.height() - 2),
-            FloatRect(rect.right() - 1, rect.y() + 1, 1, rect.height() - 2)
+            FloatRect(rect.maxX() - 1, rect.y() + 1, 1, rect.height() - 2)
         };
         CGContextFillRects(context, rects, 4);
         if (oldFillColor != strokeColor())
@@ -564,7 +564,7 @@ void GraphicsContext::fillPath(const Path& path)
                 CGContextClip(layerContext);
 
             m_state.fillGradient->paint(layerContext);
-            CGContextDrawLayerAtPoint(context, CGPointMake(rect.left(), rect.top()), layer);
+            CGContextDrawLayerAtPoint(context, CGPointMake(rect.x(), rect.y()), layer);
             CGLayerRelease(layer);
         } else {
             CGContextBeginPath(context);
@@ -646,7 +646,7 @@ void GraphicsContext::fillRect(const FloatRect& rect)
 
             CGContextConcatCTM(layerContext, m_state.fillGradient->gradientSpaceTransform());
             m_state.fillGradient->paint(layerContext);
-            CGContextDrawLayerAtPoint(context, CGPointMake(rect.left(), rect.top()), layer);
+            CGContextDrawLayerAtPoint(context, CGPointMake(rect.x(), rect.y()), layer);
             CGLayerRelease(layer);
         } else {
             CGContextClipToRect(context, rect);
diff --git a/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp b/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
index 295f632..ab5907e 100644
--- a/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
+++ b/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
@@ -267,7 +267,7 @@ PassRefPtr<ByteArray> getImageData(const IntRect& rect, const ImageBufferData& i
     RefPtr<ByteArray> result = ByteArray::create(rect.width() * rect.height() * 4);
     unsigned char* data = result->data();
 
-    if (rect.x() < 0 || rect.y() < 0 || rect.right() > size.width() || rect.bottom() > size.height())
+    if (rect.x() < 0 || rect.y() < 0 || rect.maxX() > size.width() || rect.maxY() > size.height())
         memset(data, 0, result->length());
 
     int originx = rect.x();
@@ -276,7 +276,7 @@ PassRefPtr<ByteArray> getImageData(const IntRect& rect, const ImageBufferData& i
         destx = -originx;
         originx = 0;
     }
-    int endx = rect.right();
+    int endx = rect.maxX();
     if (endx > size.width())
         endx = size.width();
     int numColumns = endx - originx;
@@ -287,7 +287,7 @@ PassRefPtr<ByteArray> getImageData(const IntRect& rect, const ImageBufferData& i
         desty = -originy;
         originy = 0;
     }
-    int endy = rect.bottom();
+    int endy = rect.maxY();
     if (endy > size.height())
         endy = size.height();
     int numRows = endy - originy;
@@ -377,9 +377,9 @@ void putImageData(ByteArray*& source, const IntSize& sourceSize, const IntRect&
     ASSERT(destx >= 0);
     ASSERT(destx < size.width());
     ASSERT(originx >= 0);
-    ASSERT(originx <= sourceRect.right());
+    ASSERT(originx <= sourceRect.maxX());
 
-    int endx = destPoint.x() + sourceRect.right();
+    int endx = destPoint.x() + sourceRect.maxX();
     ASSERT(endx <= size.width());
 
     int numColumns = endx - destx;
@@ -389,9 +389,9 @@ void putImageData(ByteArray*& source, const IntSize& sourceSize, const IntRect&
     ASSERT(desty >= 0);
     ASSERT(desty < size.height());
     ASSERT(originy >= 0);
-    ASSERT(originy <= sourceRect.bottom());
+    ASSERT(originy <= sourceRect.maxY());
 
-    int endy = destPoint.y() + sourceRect.bottom();
+    int endy = destPoint.y() + sourceRect.maxY();
     ASSERT(endy <= size.height());
     int numRows = endy - desty;
 
diff --git a/Source/WebCore/platform/graphics/cg/ImageCG.cpp b/Source/WebCore/platform/graphics/cg/ImageCG.cpp
index dfee96a..08f65bd 100644
--- a/Source/WebCore/platform/graphics/cg/ImageCG.cpp
+++ b/Source/WebCore/platform/graphics/cg/ImageCG.cpp
@@ -204,7 +204,7 @@ void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& destRect, const F
             adjustedDestRect.setHeight(subimageRect.height() / yScale);
 
             image.adoptCF(CGImageCreateWithImageInRect(image.get(), subimageRect));
-            if (currHeight < srcRect.bottom()) {
+            if (currHeight < srcRect.maxY()) {
                 ASSERT(CGImageGetHeight(image.get()) == currHeight - CGRectIntegral(srcRect).origin.y);
                 adjustedDestRect.setHeight(CGImageGetHeight(image.get()) / yScale);
             }
@@ -224,7 +224,7 @@ void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& destRect, const F
 
     // Flip the coords.
     CGContextScaleCTM(context, 1, -1);
-    adjustedDestRect.setY(-adjustedDestRect.bottom());
+    adjustedDestRect.setY(-adjustedDestRect.maxY());
 
     // Adjust the color space.
     image = imageWithColorSpace(image.get(), styleColorSpace);
diff --git a/Source/WebCore/platform/graphics/filters/FilterEffect.cpp b/Source/WebCore/platform/graphics/filters/FilterEffect.cpp
index a84fab8..f07d00c 100644
--- a/Source/WebCore/platform/graphics/filters/FilterEffect.cpp
+++ b/Source/WebCore/platform/graphics/filters/FilterEffect.cpp
@@ -119,7 +119,7 @@ PassRefPtr<ByteArray> FilterEffect::asPremultipliedImage(const IntRect& rect)
 inline void FilterEffect::copyImageBytes(ByteArray* source, ByteArray* destination, const IntRect& rect)
 {
     // Copy the necessary lines.
-    if (rect.x() < 0 || rect.y() < 0 || rect.bottom() > m_absolutePaintRect.width() || rect.bottom() > m_absolutePaintRect.height())
+    if (rect.x() < 0 || rect.y() < 0 || rect.maxY() > m_absolutePaintRect.width() || rect.maxY() > m_absolutePaintRect.height())
         memset(destination->data(), 0, destination->length());
 
     int xOrigin = rect.x();
@@ -128,7 +128,7 @@ inline void FilterEffect::copyImageBytes(ByteArray* source, ByteArray* destinati
         xDest = -xOrigin;
         xOrigin = 0;
     }
-    int xEnd = rect.right();
+    int xEnd = rect.maxX();
     if (xEnd > m_absolutePaintRect.width())
         xEnd = m_absolutePaintRect.width();
 
@@ -138,7 +138,7 @@ inline void FilterEffect::copyImageBytes(ByteArray* source, ByteArray* destinati
         yDest = -yOrigin;
         yOrigin = 0;
     }
-    int yEnd = rect.bottom();
+    int yEnd = rect.maxY();
     if (yEnd > m_absolutePaintRect.height())
         yEnd = m_absolutePaintRect.height();
 
diff --git a/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp b/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
index 7466978..25a9e76 100644
--- a/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
+++ b/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
@@ -553,9 +553,9 @@ void ComplexTextController::adjustGlyphsAndAdvances()
             FloatRect glyphBounds = fontData->boundsForGlyph(glyph);
             glyphBounds.move(glyphOrigin.x, glyphOrigin.y);
             m_minGlyphBoundingBoxX = min(m_minGlyphBoundingBoxX, glyphBounds.x());
-            m_maxGlyphBoundingBoxX = max(m_maxGlyphBoundingBoxX, glyphBounds.right());
+            m_maxGlyphBoundingBoxX = max(m_maxGlyphBoundingBoxX, glyphBounds.maxX());
             m_minGlyphBoundingBoxY = min(m_minGlyphBoundingBoxY, glyphBounds.y());
-            m_maxGlyphBoundingBoxY = max(m_maxGlyphBoundingBoxY, glyphBounds.bottom());
+            m_maxGlyphBoundingBoxY = max(m_maxGlyphBoundingBoxY, glyphBounds.maxY());
             glyphOrigin.x += advance.width;
             glyphOrigin.y += advance.height;
             
diff --git a/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm b/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
index 29fb9a0..c9a5335 100644
--- a/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
+++ b/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
@@ -477,13 +477,13 @@ FloatRect SimpleFontData::platformBoundsForGlyph(Glyph glyph) const
 #ifndef BUILDING_ON_TIGER
     boundingBox = CTFontGetBoundingRectsForGlyphs(m_platformData.ctFont(),
                     orientation() == Vertical ? kCTFontVerticalOrientation : kCTFontHorizontalOrientation, &glyph, 0, 1);
-    boundingBox.setY(-boundingBox.bottom());
+    boundingBox.setY(-boundingBox.maxY());
 #else
     // FIXME: Custom fonts don't have NSFonts, so this function doesn't compute correct bounds for these on Tiger.
     if (!m_platformData.font())
         return boundingBox;
     boundingBox = [m_platformData.font() boundingRectForGlyph:glyph];
-    boundingBox.setY(-boundingBox.bottom());
+    boundingBox.setY(-boundingBox.maxY());
 #endif
     if (m_syntheticBoldOffset)
         boundingBox.setWidth(boundingBox.width() + m_syntheticBoldOffset);
diff --git a/Source/WebCore/platform/graphics/transforms/AffineTransform.cpp b/Source/WebCore/platform/graphics/transforms/AffineTransform.cpp
index 43d2040..a1ffa30 100644
--- a/Source/WebCore/platform/graphics/transforms/AffineTransform.cpp
+++ b/Source/WebCore/platform/graphics/transforms/AffineTransform.cpp
@@ -316,9 +316,9 @@ FloatRect AffineTransform::mapRect(const FloatRect& rect) const
 
     FloatQuad result;
     result.setP1(mapPoint(rect.location()));
-    result.setP2(mapPoint(FloatPoint(rect.right(), rect.y())));
-    result.setP3(mapPoint(FloatPoint(rect.right(), rect.bottom())));
-    result.setP4(mapPoint(FloatPoint(rect.x(), rect.bottom())));
+    result.setP2(mapPoint(FloatPoint(rect.maxX(), rect.y())));
+    result.setP3(mapPoint(FloatPoint(rect.maxX(), rect.maxY())));
+    result.setP4(mapPoint(FloatPoint(rect.x(), rect.maxY())));
     return result.boundingBox();
 }
 
diff --git a/Source/WebCore/platform/graphics/win/FontCGWin.cpp b/Source/WebCore/platform/graphics/win/FontCGWin.cpp
index 8c39d5c..fe26c43 100644
--- a/Source/WebCore/platform/graphics/win/FontCGWin.cpp
+++ b/Source/WebCore/platform/graphics/win/FontCGWin.cpp
@@ -292,7 +292,7 @@ static void drawGDIGlyphs(GraphicsContext* graphicsContext, const SimpleFontData
             buffer[i + 2] = fillColor.red();
             buffer[i + 3] = alpha;
         }
-        graphicsContext->drawWindowsBitmap(bitmap.get(), textRect.topLeft());
+        graphicsContext->drawWindowsBitmap(bitmap.get(), textRect.location());
     } else
         graphicsContext->releaseWindowsContext(hdc, textRect, true, false);
 }
diff --git a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp
index 431d624..07b7621 100644
--- a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp
+++ b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp
@@ -622,7 +622,7 @@ void MediaPlayerPrivate::paint(GraphicsContext* p, const IntRect& r)
 
     m_qtGWorld->paint(hdc, r.x(), r.y());
     if (usingTempBitmap)
-        p->drawWindowsBitmap(bitmap.get(), r.topLeft());
+        p->drawWindowsBitmap(bitmap.get(), r.location());
     else
         p->releaseWindowsContext(hdc, r);
 
diff --git a/Source/WebCore/platform/gtk/RenderThemeGtk.cpp b/Source/WebCore/platform/gtk/RenderThemeGtk.cpp
index bfe3901..4d3cc6c 100644
--- a/Source/WebCore/platform/gtk/RenderThemeGtk.cpp
+++ b/Source/WebCore/platform/gtk/RenderThemeGtk.cpp
@@ -258,7 +258,7 @@ static IntPoint centerRectVerticallyInParentInputElement(RenderObject* object, c
 {
     Node* input = object->node()->shadowAncestorNode(); // Get the renderer of <input> element.
     if (!input->renderer()->isBox())
-        return rect.topLeft();
+        return rect.location();
 
     // If possible center the y-coordinate of the rect vertically in the parent input element.
     // We also add one pixel here to ensure that the y coordinate is rounded up for box heights
diff --git a/Source/WebCore/platform/mac/WidgetMac.mm b/Source/WebCore/platform/mac/WidgetMac.mm
index f3c951a..96bcde2 100644
--- a/Source/WebCore/platform/mac/WidgetMac.mm
+++ b/Source/WebCore/platform/mac/WidgetMac.mm
@@ -252,7 +252,7 @@ void Widget::paint(GraphicsContext* p, const IntRect& r)
         IntRect dirtyRect = r;
         dirtyRect.move(-transformOrigin.x(), -transformOrigin.y());
         if (![view isFlipped])
-            dirtyRect.setY([view bounds].size.height - dirtyRect.bottom());
+            dirtyRect.setY([view bounds].size.height - dirtyRect.maxY());
 
         [view displayRectIgnoringOpacity:dirtyRect];
 
@@ -296,7 +296,7 @@ void Widget::paint(GraphicsContext* p, const IntRect& r)
         IntRect dirtyRect = r;
         dirtyRect.move(-transformOrigin.x(), -transformOrigin.y());
         if (![view isFlipped])
-            dirtyRect.setY([view bounds].size.height - dirtyRect.bottom());
+            dirtyRect.setY([view bounds].size.height - dirtyRect.maxY());
 
         BEGIN_BLOCK_OBJC_EXCEPTIONS;
         {
diff --git a/Source/WebCore/rendering/InlineFlowBox.cpp b/Source/WebCore/rendering/InlineFlowBox.cpp
index cafbae8..ada569e 100644
--- a/Source/WebCore/rendering/InlineFlowBox.cpp
+++ b/Source/WebCore/rendering/InlineFlowBox.cpp
@@ -718,14 +718,14 @@ void InlineFlowBox::addBoxShadowVisualOverflow(IntRect& logicalVisualOverflow)
     renderer()->style(m_firstLine)->getBoxShadowBlockDirectionExtent(boxShadowLogicalTop, boxShadowLogicalBottom);
     
     int logicalTopVisualOverflow = min(logicalTop() + boxShadowLogicalTop, logicalVisualOverflow.y());
-    int logicalBottomVisualOverflow = max(logicalBottom() + boxShadowLogicalBottom, logicalVisualOverflow.bottom());
+    int logicalBottomVisualOverflow = max(logicalBottom() + boxShadowLogicalBottom, logicalVisualOverflow.maxY());
     
     int boxShadowLogicalLeft;
     int boxShadowLogicalRight;
     renderer()->style(m_firstLine)->getBoxShadowInlineDirectionExtent(boxShadowLogicalLeft, boxShadowLogicalRight);
 
     int logicalLeftVisualOverflow = min(logicalLeft() + boxShadowLogicalLeft, logicalVisualOverflow.x());
-    int logicalRightVisualOverflow = max(logicalRight() + boxShadowLogicalRight, logicalVisualOverflow.right());
+    int logicalRightVisualOverflow = max(logicalRight() + boxShadowLogicalRight, logicalVisualOverflow.maxX());
     
     logicalVisualOverflow = IntRect(logicalLeftVisualOverflow, logicalTopVisualOverflow,
                                     logicalRightVisualOverflow - logicalLeftVisualOverflow, logicalBottomVisualOverflow - logicalTopVisualOverflow);
@@ -780,9 +780,9 @@ void InlineFlowBox::addTextBoxVisualOverflow(const InlineTextBox* textBox, Glyph
     int childOverflowLogicalRight = max(textShadowLogicalRight + rightGlyphOverflow, rightGlyphOverflow);
 
     int logicalTopVisualOverflow = min(textBox->logicalTop() + childOverflowLogicalTop, logicalVisualOverflow.y());
-    int logicalBottomVisualOverflow = max(textBox->logicalBottom() + childOverflowLogicalBottom, logicalVisualOverflow.bottom());
+    int logicalBottomVisualOverflow = max(textBox->logicalBottom() + childOverflowLogicalBottom, logicalVisualOverflow.maxY());
     int logicalLeftVisualOverflow = min(textBox->logicalLeft() + childOverflowLogicalLeft, logicalVisualOverflow.x());
-    int logicalRightVisualOverflow = max(textBox->logicalRight() + childOverflowLogicalRight, logicalVisualOverflow.right());
+    int logicalRightVisualOverflow = max(textBox->logicalRight() + childOverflowLogicalRight, logicalVisualOverflow.maxX());
     
     logicalVisualOverflow = IntRect(logicalLeftVisualOverflow, logicalTopVisualOverflow,
                                     logicalRightVisualOverflow - logicalLeftVisualOverflow, logicalBottomVisualOverflow - logicalTopVisualOverflow);
diff --git a/Source/WebCore/rendering/InlineTextBox.cpp b/Source/WebCore/rendering/InlineTextBox.cpp
index 00d4089..c16942f 100644
--- a/Source/WebCore/rendering/InlineTextBox.cpp
+++ b/Source/WebCore/rendering/InlineTextBox.cpp
@@ -169,7 +169,7 @@ IntRect InlineTextBox::selectionRect(int tx, int ty, int startPos, int endPos)
     int logicalWidth = r.width();
     if (r.x() > m_logicalWidth)
         logicalWidth  = 0;
-    else if (r.right() > m_logicalWidth)
+    else if (r.maxX() > m_logicalWidth)
         logicalWidth = m_logicalWidth - r.x();
     
     IntPoint topPoint = isHorizontal() ? IntPoint(tx + m_x + r.x(), ty + selTop) : IntPoint(tx + selTop, ty + m_y + r.x());
@@ -442,7 +442,7 @@ void InlineTextBox::paint(PaintInfo& paintInfo, int tx, int ty)
     int logicalStart = logicalLeft() - logicalLeftOverflow + (isHorizontal() ? tx : ty);
     int logicalExtent = logicalWidth() + logicalLeftOverflow + logicalRightOverflow;
     
-    int paintEnd = isHorizontal() ? paintInfo.rect.right() : paintInfo.rect.bottom();
+    int paintEnd = isHorizontal() ? paintInfo.rect.maxX() : paintInfo.rect.maxY();
     int paintStart = isHorizontal() ? paintInfo.rect.x() : paintInfo.rect.y();
     
     if (logicalStart >= paintEnd || logicalStart + logicalExtent <= paintStart)
@@ -491,9 +491,9 @@ void InlineTextBox::paint(PaintInfo& paintInfo, int tx, int ty)
     bool shouldRotate = !isHorizontal() && (!combinedText || !combinedText->isCombined());
     if (shouldRotate) {
         context->save();
-        context->translate(boxRect.x(), boxRect.bottom());
+        context->translate(boxRect.x(), boxRect.maxY());
         context->rotate(static_cast<float>(deg2rad(90.)));
-        context->translate(-boxRect.x(), -boxRect.bottom());
+        context->translate(-boxRect.x(), -boxRect.maxY());
     }
     
     
@@ -1216,7 +1216,7 @@ int InlineTextBox::positionForOffset(int offset) const
     int to = !isLeftToRightDirection() ? m_len : offset - m_start;
     // FIXME: Do we need to add rightBearing here?
     return enclosingIntRect(f.selectionRectForText(TextRun(text->text()->characters() + m_start, m_len, textRenderer()->allowTabs(), textPos(), m_expansion, trailingExpansionBehavior(), !isLeftToRightDirection(), m_dirOverride),
-                                                   IntPoint(logicalLeft(), 0), 0, from, to)).right();
+                                                   IntPoint(logicalLeft(), 0), 0, from, to)).maxX();
 }
 
 bool InlineTextBox::containsCaretOffset(int offset) const
diff --git a/Source/WebCore/rendering/RenderBlock.cpp b/Source/WebCore/rendering/RenderBlock.cpp
index 3fe51d8..1609e68 100644
--- a/Source/WebCore/rendering/RenderBlock.cpp
+++ b/Source/WebCore/rendering/RenderBlock.cpp
@@ -1325,13 +1325,13 @@ void RenderBlock::addOverflowFromChildren()
             IntRect lastRect = columnRectAt(colInfo, columnCount(colInfo) - 1);
             if (style()->isHorizontalWritingMode()) {
                 int overflowLeft = !style()->isLeftToRightDirection() ? min(0, lastRect.x()) : 0;
-                int overflowRight = style()->isLeftToRightDirection() ? max(width(), lastRect.right()) : 0;
+                int overflowRight = style()->isLeftToRightDirection() ? max(width(), lastRect.maxX()) : 0;
                 int overflowHeight = borderBefore() + paddingBefore() + colInfo->columnHeight();
                 addLayoutOverflow(IntRect(overflowLeft, 0, overflowRight - overflowLeft, overflowHeight));
             } else {
                 IntRect lastRect = columnRectAt(colInfo, columnCount(colInfo) - 1);
                 int overflowTop = !style()->isLeftToRightDirection() ? min(0, lastRect.y()) : 0;
-                int overflowBottom = style()->isLeftToRightDirection() ? max(height(), lastRect.bottom()) : 0;
+                int overflowBottom = style()->isLeftToRightDirection() ? max(height(), lastRect.maxY()) : 0;
                 int overflowWidth = borderBefore() + paddingBefore() + colInfo->columnHeight();
                 addLayoutOverflow(IntRect(0, overflowTop, overflowWidth, overflowBottom - overflowTop));
             }
@@ -2347,14 +2347,14 @@ void RenderBlock::paintChildren(PaintInfo& paintInfo, int tx, int ty)
         bool checkBeforeAlways = !childrenInline() && (usePrintRect && child->style()->pageBreakBefore() == PBALWAYS);
         if (checkBeforeAlways
             && (ty + child->y()) > paintInfo.rect.y()
-            && (ty + child->y()) < paintInfo.rect.bottom()) {
+            && (ty + child->y()) < paintInfo.rect.maxY()) {
             view()->setBestTruncatedAt(ty + child->y(), this, true);
             return;
         }
 
         if (!child->isFloating() && child->isReplaced() && usePrintRect && child->height() <= renderView->printRect().height()) {
             // Paginate block-level replaced elements.
-            if (ty + child->y() + child->height() > renderView->printRect().bottom()) {
+            if (ty + child->y() + child->height() > renderView->printRect().maxY()) {
                 if (ty + child->y() < renderView->truncatedAt())
                     renderView->setBestTruncatedAt(ty + child->y(), child);
                 // If we were able to truncate, don't paint.
@@ -2371,7 +2371,7 @@ void RenderBlock::paintChildren(PaintInfo& paintInfo, int tx, int ty)
         bool checkAfterAlways = !childrenInline() && (usePrintRect && child->style()->pageBreakAfter() == PBALWAYS);
         if (checkAfterAlways
             && (ty + child->y() + child->height()) > paintInfo.rect.y()
-            && (ty + child->y() + child->height()) < paintInfo.rect.bottom()) {
+            && (ty + child->y() + child->height()) < paintInfo.rect.maxY()) {
             view()->setBestTruncatedAt(ty + child->y() + child->height() + max(0, child->collapsedMarginAfter()), this, true);
             return;
         }
@@ -2537,7 +2537,7 @@ void RenderBlock::paintEllipsisBoxes(PaintInfo& paintInfo, int tx, int ty)
         // intersect.
         int yPos = ty + firstLineBox()->y();
         int h = lastLineBox()->y() + lastLineBox()->logicalHeight() - firstLineBox()->y();
-        if (yPos >= paintInfo.rect.bottom() || yPos + h <= paintInfo.rect.y())
+        if (yPos >= paintInfo.rect.maxY() || yPos + h <= paintInfo.rect.y())
             return;
 
         // See if our boxes intersect with the dirty rect.  If so, then we paint
@@ -2546,7 +2546,7 @@ void RenderBlock::paintEllipsisBoxes(PaintInfo& paintInfo, int tx, int ty)
         for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) {
             yPos = ty + curr->y();
             h = curr->logicalHeight();
-            if (curr->ellipsisBox() && yPos < paintInfo.rect.bottom() && yPos + h > paintInfo.rect.y())
+            if (curr->ellipsisBox() && yPos < paintInfo.rect.maxY() && yPos + h > paintInfo.rect.y())
                 curr->paintEllipsisBox(paintInfo, tx, ty);
         }
     }
@@ -2816,8 +2816,8 @@ GapRects RenderBlock::inlineSelectionGaps(RenderBlock* rootBlock, const IntPoint
         IntRect logicalRect(curr->logicalLeft(), selTop, curr->logicalWidth(), selTop + selHeight);
         logicalRect.move(style()->isHorizontalWritingMode() ? offsetFromRootBlock : IntSize(offsetFromRootBlock.height(), offsetFromRootBlock.width()));
         IntRect physicalRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalPosition, logicalRect);
-        if (!paintInfo || (style()->isHorizontalWritingMode() && physicalRect.y() < paintInfo->rect.bottom() && physicalRect.bottom() > paintInfo->rect.y())
-            || (!style()->isHorizontalWritingMode() && physicalRect.x() < paintInfo->rect.right() && physicalRect.right() > paintInfo->rect.x()))
+        if (!paintInfo || (style()->isHorizontalWritingMode() && physicalRect.y() < paintInfo->rect.maxY() && physicalRect.maxY() > paintInfo->rect.y())
+            || (!style()->isHorizontalWritingMode() && physicalRect.x() < paintInfo->rect.maxX() && physicalRect.maxX() > paintInfo->rect.x()))
             result.unite(curr->lineSelectionGap(rootBlock, rootBlockPhysicalPosition, offsetFromRootBlock, selTop, selHeight, paintInfo));
 
         lastSelectedLine = curr;
@@ -4322,7 +4322,7 @@ void RenderBlock::adjustPointToColumnContents(IntPoint& point) const
         IntRect colRect = columnRectAt(colInfo, i);
         if (style()->isHorizontalWritingMode()) {
             IntRect gapAndColumnRect(colRect.x() - halfColGap, colRect.y(), colRect.width() + colGap, colRect.height());
-            if (point.x() >= gapAndColumnRect.x() && point.x() < gapAndColumnRect.right()) {
+            if (point.x() >= gapAndColumnRect.x() && point.x() < gapAndColumnRect.maxX()) {
                 // FIXME: The clamping that follows is not completely right for right-to-left
                 // content.
                 // Clamp everything above the column to its top left.
@@ -4330,7 +4330,7 @@ void RenderBlock::adjustPointToColumnContents(IntPoint& point) const
                     point = gapAndColumnRect.location();
                 // Clamp everything below the column to the next column's top left. If there is
                 // no next column, this still maps to just after this column.
-                else if (point.y() >= gapAndColumnRect.bottom()) {
+                else if (point.y() >= gapAndColumnRect.maxY()) {
                     point = gapAndColumnRect.location();
                     point.move(0, gapAndColumnRect.height());
                 }
@@ -4344,7 +4344,7 @@ void RenderBlock::adjustPointToColumnContents(IntPoint& point) const
             logicalOffset += colRect.height();
         } else {
             IntRect gapAndColumnRect(colRect.x(), colRect.y() - halfColGap, colRect.width(), colRect.height() + colGap);
-            if (point.y() >= gapAndColumnRect.y() && point.y() < gapAndColumnRect.bottom()) {
+            if (point.y() >= gapAndColumnRect.y() && point.y() < gapAndColumnRect.maxY()) {
                 // FIXME: The clamping that follows is not completely right for right-to-left
                 // content.
                 // Clamp everything above the column to its top left.
@@ -4352,7 +4352,7 @@ void RenderBlock::adjustPointToColumnContents(IntPoint& point) const
                     point = gapAndColumnRect.location();
                 // Clamp everything below the column to the next column's top left. If there is
                 // no next column, this still maps to just after this column.
-                else if (point.x() >= gapAndColumnRect.right()) {
+                else if (point.x() >= gapAndColumnRect.maxX()) {
                     point = gapAndColumnRect.location();
                     point.move(gapAndColumnRect.width(), 0);
                 }
@@ -4429,9 +4429,9 @@ void RenderBlock::flipForWritingModeIncludingColumns(IntRect& rect) const
     int columnLogicalHeight = colInfo->columnHeight();
     int expandedLogicalHeight = borderBefore() + paddingBefore() + columnCount(colInfo) * columnLogicalHeight + borderAfter() + paddingAfter() + scrollbarLogicalHeight();
     if (style()->isHorizontalWritingMode())
-        rect.setY(expandedLogicalHeight - rect.bottom());
+        rect.setY(expandedLogicalHeight - rect.maxY());
     else
-        rect.setX(expandedLogicalHeight - rect.right());
+        rect.setX(expandedLogicalHeight - rect.maxX());
 }
 
 void RenderBlock::adjustForColumns(IntSize& offset, const IntPoint& point) const
@@ -4459,12 +4459,12 @@ void RenderBlock::adjustForColumns(IntSize& offset, const IntPoint& point) const
 
         // Now we're in the same coordinate space as the point.  See if it is inside the rectangle.
         if (style()->isHorizontalWritingMode()) {
-            if (point.y() >= sliceRect.y() && point.y() < sliceRect.bottom()) {
+            if (point.y() >= sliceRect.y() && point.y() < sliceRect.maxY()) {
                 offset.expand(columnRectAt(colInfo, i).x() - logicalLeft, -logicalOffset);
                 return;
             }
         } else {
-            if (point.x() >= sliceRect.x() && point.x() < sliceRect.right()) {
+            if (point.x() >= sliceRect.x() && point.x() < sliceRect.maxX()) {
                 offset.expand(-logicalOffset, columnRectAt(colInfo, i).y() - logicalLeft);
                 return;
             }
diff --git a/Source/WebCore/rendering/RenderBlock.h b/Source/WebCore/rendering/RenderBlock.h
index cc98000..25ec37a 100644
--- a/Source/WebCore/rendering/RenderBlock.h
+++ b/Source/WebCore/rendering/RenderBlock.h
@@ -398,9 +398,9 @@ private:
         void setIsPlaced(bool placed = true) { m_isPlaced = placed; }
 
         int left() const { ASSERT(isPlaced()); return m_frameRect.x(); }
-        int right() const { ASSERT(isPlaced()); return m_frameRect.right(); }
+        int right() const { ASSERT(isPlaced()); return m_frameRect.maxX(); }
         int top() const { ASSERT(isPlaced()); return m_frameRect.y(); }
-        int bottom() const { ASSERT(isPlaced()); return m_frameRect.bottom(); }
+        int bottom() const { ASSERT(isPlaced()); return m_frameRect.maxY(); }
         int width() const { return m_frameRect.width(); }
         int height() const { return m_frameRect.height(); }
 
diff --git a/Source/WebCore/rendering/RenderBox.cpp b/Source/WebCore/rendering/RenderBox.cpp
index 9428519..ccb8725 100644
--- a/Source/WebCore/rendering/RenderBox.cpp
+++ b/Source/WebCore/rendering/RenderBox.cpp
@@ -548,16 +548,16 @@ IntRect RenderBox::reflectedRect(const IntRect& r) const
     IntRect result = r;
     switch (style()->boxReflect()->direction()) {
         case ReflectionBelow:
-            result.setY(box.bottom() + reflectionOffset() + (box.bottom() - r.bottom()));
+            result.setY(box.maxY() + reflectionOffset() + (box.maxY() - r.maxY()));
             break;
         case ReflectionAbove:
-            result.setY(box.y() - reflectionOffset() - box.height() + (box.bottom() - r.bottom()));
+            result.setY(box.y() - reflectionOffset() - box.height() + (box.maxY() - r.maxY()));
             break;
         case ReflectionLeft:
-            result.setX(box.x() - reflectionOffset() - box.width() + (box.right() - r.right()));
+            result.setX(box.x() - reflectionOffset() - box.width() + (box.maxX() - r.maxX()));
             break;
         case ReflectionRight:
-            result.setX(box.right() + reflectionOffset() + (box.right() - r.right()));
+            result.setX(box.maxX() + reflectionOffset() + (box.maxX() - r.maxX()));
             break;
     }
     return result;
@@ -2987,7 +2987,7 @@ IntRect RenderBox::localCaretRect(InlineBox* box, int caretOffset, int* extraWid
         rect.setHeight(fontHeight);
 
     if (extraWidthToEndOfLine)
-        *extraWidthToEndOfLine = x() + width() - rect.right();
+        *extraWidthToEndOfLine = x() + width() - rect.maxX();
 
     // Move to local coords
     rect.move(-x(), -y());
@@ -3108,9 +3108,9 @@ void RenderBox::addShadowOverflow()
     style()->getBoxShadowExtent(shadowTop, shadowRight, shadowBottom, shadowLeft);
     IntRect borderBox = borderBoxRect();
     int overflowLeft = borderBox.x() + shadowLeft;
-    int overflowRight = borderBox.right() + shadowRight;
+    int overflowRight = borderBox.maxX() + shadowRight;
     int overflowTop = borderBox.y() + shadowTop;
-    int overflowBottom = borderBox.bottom() + shadowBottom;
+    int overflowBottom = borderBox.maxY() + shadowBottom;
     addVisualOverflow(IntRect(overflowLeft, overflowTop, overflowRight - overflowLeft, overflowBottom - overflowTop));
 }
 
@@ -3149,13 +3149,13 @@ void RenderBox::addLayoutOverflow(const IntRect& rect)
         bool hasLeftOverflow = !style()->isLeftToRightDirection() && style()->isHorizontalWritingMode();
         
         if (!hasTopOverflow)
-            overflowRect.shiftTopEdgeTo(max(overflowRect.y(), clientBox.y()));
+            overflowRect.shiftYEdgeTo(max(overflowRect.y(), clientBox.y()));
         else
-            overflowRect.shiftBottomEdgeTo(min(overflowRect.bottom(), clientBox.bottom()));
+            overflowRect.shiftMaxYEdgeTo(min(overflowRect.maxY(), clientBox.maxY()));
         if (!hasLeftOverflow)
-            overflowRect.shiftLeftEdgeTo(max(overflowRect.x(), clientBox.x()));
+            overflowRect.shiftXEdgeTo(max(overflowRect.x(), clientBox.x()));
         else
-            overflowRect.shiftRightEdgeTo(min(overflowRect.right(), clientBox.right()));
+            overflowRect.shiftMaxXEdgeTo(min(overflowRect.maxX(), clientBox.maxX()));
         
         // Now re-test with the adjusted rectangle and see if it has become unreachable or fully
         // contained.
@@ -3244,9 +3244,9 @@ IntRect RenderBox::visualOverflowRectForPropagation(RenderStyle* parentStyle) co
     // We are putting ourselves into our parent's coordinate space.  If there is a flipped block mismatch
     // in a particular axis, then we have to flip the rect along that axis.
     if (style()->writingMode() == RightToLeftWritingMode || parentStyle->writingMode() == RightToLeftWritingMode)
-        rect.setX(width() - rect.right());
+        rect.setX(width() - rect.maxX());
     else if (style()->writingMode() == BottomToTopWritingMode || parentStyle->writingMode() == BottomToTopWritingMode)
-        rect.setY(height() - rect.bottom());
+        rect.setY(height() - rect.maxY());
 
     return rect;
 }
@@ -3290,9 +3290,9 @@ IntRect RenderBox::layoutOverflowRectForPropagation(RenderStyle* parentStyle) co
     // We are putting ourselves into our parent's coordinate space.  If there is a flipped block mismatch
     // in a particular axis, then we have to flip the rect along that axis.
     if (style()->writingMode() == RightToLeftWritingMode || parentStyle->writingMode() == RightToLeftWritingMode)
-        rect.setX(width() - rect.right());
+        rect.setX(width() - rect.maxX());
     else if (style()->writingMode() == BottomToTopWritingMode || parentStyle->writingMode() == BottomToTopWritingMode)
-        rect.setY(height() - rect.bottom());
+        rect.setY(height() - rect.maxY());
 
     return rect;
 }
@@ -3315,9 +3315,9 @@ void RenderBox::flipForWritingMode(IntRect& rect) const
         return;
 
     if (style()->isHorizontalWritingMode())
-        rect.setY(height() - rect.bottom());
+        rect.setY(height() - rect.maxY());
     else
-        rect.setX(width() - rect.right());
+        rect.setX(width() - rect.maxX());
 }
 
 int RenderBox::flipForWritingMode(int position) const
diff --git a/Source/WebCore/rendering/RenderFrameSet.cpp b/Source/WebCore/rendering/RenderFrameSet.cpp
index 498cbd7..5cf916f 100644
--- a/Source/WebCore/rendering/RenderFrameSet.cpp
+++ b/Source/WebCore/rendering/RenderFrameSet.cpp
@@ -93,8 +93,8 @@ void RenderFrameSet::paintColumnBorder(const PaintInfo& paintInfo, const IntRect
     // Now stroke the edges but only if we have enough room to paint both edges with a little
     // bit of the fill color showing through.
     if (borderRect.width() >= 3) {
-        context->fillRect(IntRect(borderRect.topLeft(), IntSize(1, height())), borderStartEdgeColor(), colorSpace);
-        context->fillRect(IntRect(borderRect.topRight(), IntSize(1, height())), borderEndEdgeColor(), colorSpace);
+        context->fillRect(IntRect(borderRect.location(), IntSize(1, height())), borderStartEdgeColor(), colorSpace);
+        context->fillRect(IntRect(IntPoint(borderRect.maxX() - 1, borderRect.y()), IntSize(1, height())), borderEndEdgeColor(), colorSpace);
     }
 }
 
@@ -113,8 +113,8 @@ void RenderFrameSet::paintRowBorder(const PaintInfo& paintInfo, const IntRect& b
     // Now stroke the edges but only if we have enough room to paint both edges with a little
     // bit of the fill color showing through.
     if (borderRect.height() >= 3) {
-        context->fillRect(IntRect(borderRect.topLeft(), IntSize(width(), 1)), borderStartEdgeColor(), colorSpace);
-        context->fillRect(IntRect(borderRect.bottomLeft(), IntSize(width(), 1)), borderEndEdgeColor(), colorSpace);
+        context->fillRect(IntRect(borderRect.location(), IntSize(width(), 1)), borderStartEdgeColor(), colorSpace);
+        context->fillRect(IntRect(IntPoint(borderRect.x(), borderRect.maxY() - 1), IntSize(width(), 1)), borderEndEdgeColor(), colorSpace);
     }
 }
 
diff --git a/Source/WebCore/rendering/RenderInline.cpp b/Source/WebCore/rendering/RenderInline.cpp
index ad0081d..243ce2d 100644
--- a/Source/WebCore/rendering/RenderInline.cpp
+++ b/Source/WebCore/rendering/RenderInline.cpp
@@ -1037,30 +1037,30 @@ void RenderInline::paintOutlineForLine(GraphicsContext* graphicsContext, int tx,
 
     int t = ty + thisline.y() - offset;
     int l = tx + thisline.x() - offset;
-    int b = ty + thisline.bottom() + offset;
-    int r = tx + thisline.right() + offset;
+    int b = ty + thisline.maxY() + offset;
+    int r = tx + thisline.maxX() + offset;
     
     // left edge
     drawLineForBoxSide(graphicsContext,
                l - ow,
-               t - (lastline.isEmpty() || thisline.x() < lastline.x() || (lastline.right() - 1) <= thisline.x() ? ow : 0),
+               t - (lastline.isEmpty() || thisline.x() < lastline.x() || (lastline.maxX() - 1) <= thisline.x() ? ow : 0),
                l,
-               b + (nextline.isEmpty() || thisline.x() <= nextline.x() || (nextline.right() - 1) <= thisline.x() ? ow : 0),
+               b + (nextline.isEmpty() || thisline.x() <= nextline.x() || (nextline.maxX() - 1) <= thisline.x() ? ow : 0),
                BSLeft,
                oc, os,
-               (lastline.isEmpty() || thisline.x() < lastline.x() || (lastline.right() - 1) <= thisline.x() ? ow : -ow),
-               (nextline.isEmpty() || thisline.x() <= nextline.x() || (nextline.right() - 1) <= thisline.x() ? ow : -ow));
+               (lastline.isEmpty() || thisline.x() < lastline.x() || (lastline.maxX() - 1) <= thisline.x() ? ow : -ow),
+               (nextline.isEmpty() || thisline.x() <= nextline.x() || (nextline.maxX() - 1) <= thisline.x() ? ow : -ow));
     
     // right edge
     drawLineForBoxSide(graphicsContext,
                r,
-               t - (lastline.isEmpty() || lastline.right() < thisline.right() || (thisline.right() - 1) <= lastline.x() ? ow : 0),
+               t - (lastline.isEmpty() || lastline.maxX() < thisline.maxX() || (thisline.maxX() - 1) <= lastline.x() ? ow : 0),
                r + ow,
-               b + (nextline.isEmpty() || nextline.right() <= thisline.right() || (thisline.right() - 1) <= nextline.x() ? ow : 0),
+               b + (nextline.isEmpty() || nextline.maxX() <= thisline.maxX() || (thisline.maxX() - 1) <= nextline.x() ? ow : 0),
                BSRight,
                oc, os,
-               (lastline.isEmpty() || lastline.right() < thisline.right() || (thisline.right() - 1) <= lastline.x() ? ow : -ow),
-               (nextline.isEmpty() || nextline.right() <= thisline.right() || (thisline.right() - 1) <= nextline.x() ? ow : -ow));
+               (lastline.isEmpty() || lastline.maxX() < thisline.maxX() || (thisline.maxX() - 1) <= lastline.x() ? ow : -ow),
+               (nextline.isEmpty() || nextline.maxX() <= thisline.maxX() || (thisline.maxX() - 1) <= nextline.x() ? ow : -ow));
     // upper edge
     if (thisline.x() < lastline.x())
         drawLineForBoxSide(graphicsContext,
@@ -1072,14 +1072,14 @@ void RenderInline::paintOutlineForLine(GraphicsContext* graphicsContext, int tx,
                    ow,
                    (!lastline.isEmpty() && tx + lastline.x() + 1 < r + ow) ? -ow : ow);
     
-    if (lastline.right() < thisline.right())
+    if (lastline.maxX() < thisline.maxX())
         drawLineForBoxSide(graphicsContext,
-                   max(lastline.isEmpty() ? -1000000 : tx + lastline.right(), l - ow),
+                   max(lastline.isEmpty() ? -1000000 : tx + lastline.maxX(), l - ow),
                    t - ow,
                    r + ow,
                    t ,
                    BSTop, oc, os,
-                   (!lastline.isEmpty() && l - ow < tx + lastline.right()) ? -ow : ow,
+                   (!lastline.isEmpty() && l - ow < tx + lastline.maxX()) ? -ow : ow,
                    ow);
     
     // lower edge
@@ -1093,14 +1093,14 @@ void RenderInline::paintOutlineForLine(GraphicsContext* graphicsContext, int tx,
                    ow,
                    (!nextline.isEmpty() && tx + nextline.x() + 1 < r + ow) ? -ow : ow);
     
-    if (nextline.right() < thisline.right())
+    if (nextline.maxX() < thisline.maxX())
         drawLineForBoxSide(graphicsContext,
-                   max(!nextline.isEmpty() ? tx + nextline.right() : -1000000, l - ow),
+                   max(!nextline.isEmpty() ? tx + nextline.maxX() : -1000000, l - ow),
                    b,
                    r + ow,
                    b + ow,
                    BSBottom, oc, os,
-                   (!nextline.isEmpty() && l - ow < tx + nextline.right()) ? -ow : ow,
+                   (!nextline.isEmpty() && l - ow < tx + nextline.maxX()) ? -ow : ow,
                    ow);
 }
 
diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp
index a9b005d..4d8601c 100644
--- a/Source/WebCore/rendering/RenderLayer.cpp
+++ b/Source/WebCore/rendering/RenderLayer.cpp
@@ -1516,7 +1516,7 @@ IntRect RenderLayer::getRectToExpose(const IntRect &visibleRect, const IntRect &
         scrollX = ScrollAlignment::getHiddenBehavior(alignX);
     // If we're trying to align to the closest edge, and the exposeRect is further right
     // than the visibleRect, and not bigger than the visible area, then align with the right.
-    if (scrollX == alignToClosestEdge && exposeRect.right() > visibleRect.right() && exposeRect.width() < visibleRect.width())
+    if (scrollX == alignToClosestEdge && exposeRect.maxX() > visibleRect.maxX() && exposeRect.width() < visibleRect.width())
         scrollX = alignRight;
 
     // Given the X behavior, compute the X coordinate.
@@ -1524,7 +1524,7 @@ IntRect RenderLayer::getRectToExpose(const IntRect &visibleRect, const IntRect &
     if (scrollX == noScroll) 
         x = visibleRect.x();
     else if (scrollX == alignRight)
-        x = exposeRect.right() - visibleRect.width();
+        x = exposeRect.maxX() - visibleRect.width();
     else if (scrollX == alignCenter)
         x = exposeRect.x() + (exposeRect.width() - visibleRect.width()) / 2;
     else
@@ -1549,7 +1549,7 @@ IntRect RenderLayer::getRectToExpose(const IntRect &visibleRect, const IntRect &
         scrollY = ScrollAlignment::getHiddenBehavior(alignY);
     // If we're trying to align to the closest edge, and the exposeRect is further down
     // than the visibleRect, and not bigger than the visible area, then align with the bottom.
-    if (scrollY == alignToClosestEdge && exposeRect.bottom() > visibleRect.bottom() && exposeRect.height() < visibleRect.height())
+    if (scrollY == alignToClosestEdge && exposeRect.maxY() > visibleRect.maxY() && exposeRect.height() < visibleRect.height())
         scrollY = alignBottom;
 
     // Given the Y behavior, compute the Y coordinate.
@@ -1557,7 +1557,7 @@ IntRect RenderLayer::getRectToExpose(const IntRect &visibleRect, const IntRect &
     if (scrollY == noScroll) 
         y = visibleRect.y();
     else if (scrollY == alignBottom)
-        y = exposeRect.bottom() - visibleRect.height();
+        y = exposeRect.maxY() - visibleRect.height();
     else if (scrollY == alignCenter)
         y = exposeRect.y() + (exposeRect.height() - visibleRect.height()) / 2;
     else
@@ -1694,8 +1694,8 @@ static IntRect cornerRect(const RenderLayer* layer, const IntRect& bounds)
         horizontalThickness = layer->verticalScrollbar()->width();
         verticalThickness = layer->horizontalScrollbar()->height();
     }
-    return IntRect(bounds.right() - horizontalThickness - layer->renderer()->style()->borderRightWidth(), 
-                   bounds.bottom() - verticalThickness - layer->renderer()->style()->borderBottomWidth(),
+    return IntRect(bounds.maxX() - horizontalThickness - layer->renderer()->style()->borderRightWidth(), 
+                   bounds.maxY() - verticalThickness - layer->renderer()->style()->borderBottomWidth(),
                    horizontalThickness, verticalThickness);
 }
 
@@ -1911,14 +1911,14 @@ void RenderLayer::positionOverflowControls(int tx, int ty)
     IntRect scrollCorner(scrollCornerRect(this, borderBox));
     IntRect absBounds(borderBox.x() + tx, borderBox.y() + ty, borderBox.width(), borderBox.height());
     if (m_vBar)
-        m_vBar->setFrameRect(IntRect(absBounds.right() - box->borderRight() - m_vBar->width(),
+        m_vBar->setFrameRect(IntRect(absBounds.maxX() - box->borderRight() - m_vBar->width(),
                                      absBounds.y() + box->borderTop(),
                                      m_vBar->width(),
                                      absBounds.height() - (box->borderTop() + box->borderBottom()) - scrollCorner.height()));
 
     if (m_hBar)
         m_hBar->setFrameRect(IntRect(absBounds.x() + box->borderLeft(),
-                                     absBounds.bottom() - box->borderBottom() - m_hBar->height(),
+                                     absBounds.maxY() - box->borderBottom() - m_hBar->height(),
                                      absBounds.width() - (box->borderLeft() + box->borderRight()) - scrollCorner.width(),
                                      m_hBar->height()));
     
@@ -1955,7 +1955,7 @@ int RenderLayer::overflowBottom() const
     RenderBox* box = renderBox();
     IntRect overflowRect(box->layoutOverflowRect());
     box->flipForWritingMode(overflowRect);
-    return overflowRect.bottom();
+    return overflowRect.maxY();
 }
 
 int RenderLayer::overflowLeft() const
@@ -1971,7 +1971,7 @@ int RenderLayer::overflowRight() const
     RenderBox* box = renderBox();
     IntRect overflowRect(box->layoutOverflowRect());
     box->flipForWritingMode(overflowRect);
-    return overflowRect.right();
+    return overflowRect.maxX();
 }
 
 void RenderLayer::computeScrollDimensions(bool* needHBar, bool* needVBar)
@@ -2197,7 +2197,7 @@ void RenderLayer::paintResizer(GraphicsContext* context, int tx, int ty, const I
 
     // Paint the resizer control.
     DEFINE_STATIC_LOCAL(RefPtr<Image>, resizeCornerImage, (Image::loadPlatformResource("textAreaResizeCorner")));
-    IntPoint imagePoint(absRect.right() - resizeCornerImage->width(), absRect.bottom() - resizeCornerImage->height());
+    IntPoint imagePoint(absRect.maxX() - resizeCornerImage->width(), absRect.maxY() - resizeCornerImage->height());
     context->drawImage(resizeCornerImage.get(), box->style()->colorSpace(), imagePoint);
 
     // Draw a frame around the resizer (1px grey line) if there are any scrollbars present.
diff --git a/Source/WebCore/rendering/RenderLineBoxList.cpp b/Source/WebCore/rendering/RenderLineBoxList.cpp
index 1488ecc..35ab7ba 100644
--- a/Source/WebCore/rendering/RenderLineBoxList.cpp
+++ b/Source/WebCore/rendering/RenderLineBoxList.cpp
@@ -160,11 +160,11 @@ bool RenderLineBoxList::rangeIntersectsRect(RenderBoxModelObject* renderer, int
     
     if (renderer->style()->isHorizontalWritingMode()) {
         physicalStart += ty;
-        if (physicalStart >= rect.bottom() || physicalStart + physicalExtent <= rect.y())
+        if (physicalStart >= rect.maxY() || physicalStart + physicalExtent <= rect.y())
             return false;
     } else {
         physicalStart += tx;
-        if (physicalStart >= rect.right() || physicalStart + physicalExtent <= rect.x())
+        if (physicalStart >= rect.maxX() || physicalStart + physicalExtent <= rect.x())
             return false;
     }
     
@@ -239,11 +239,11 @@ void RenderLineBoxList::paint(RenderBoxModelObject* renderer, PaintInfo& paintIn
                 bottomForPaginationCheck = max(bottomForPaginationCheck, curr->root()->lineBottom());
             }
             if (bottomForPaginationCheck - topForPaginationCheck <= v->printRect().height()) {
-                if (ty + bottomForPaginationCheck > v->printRect().bottom()) {
+                if (ty + bottomForPaginationCheck > v->printRect().maxY()) {
                     if (RootInlineBox* nextRootBox = curr->root()->nextRootBox())
                         bottomForPaginationCheck = min(bottomForPaginationCheck, min(nextRootBox->topVisualOverflow(), nextRootBox->lineTop()));
                 }
-                if (ty + bottomForPaginationCheck > v->printRect().bottom()) {
+                if (ty + bottomForPaginationCheck > v->printRect().maxY()) {
                     if (ty + topForPaginationCheck < v->truncatedAt())
                         v->setBestTruncatedAt(ty + topForPaginationCheck, renderer);
                     // If we were able to truncate, don't paint.
diff --git a/Source/WebCore/rendering/RenderListItem.cpp b/Source/WebCore/rendering/RenderListItem.cpp
index 65606f3..5cfb522 100644
--- a/Source/WebCore/rendering/RenderListItem.cpp
+++ b/Source/WebCore/rendering/RenderListItem.cpp
@@ -297,12 +297,12 @@ void RenderListItem::positionListMarker()
             for (InlineFlowBox* box = m_marker->inlineBoxWrapper()->parent(); box; box = box->parent()) {
                 IntRect newLogicalVisualOverflowRect = box->logicalVisualOverflowRect();
                 IntRect newLogicalLayoutOverflowRect = box->logicalLayoutOverflowRect();
-                if (markerLogicalLeft + m_marker->logicalWidth() > newLogicalVisualOverflowRect.right() && !hitSelfPaintingLayer) {
+                if (markerLogicalLeft + m_marker->logicalWidth() > newLogicalVisualOverflowRect.maxX() && !hitSelfPaintingLayer) {
                     newLogicalVisualOverflowRect.setWidth(markerLogicalLeft + m_marker->logicalWidth() - box->logicalLeftVisualOverflow());
                     if (box == root)
                         adjustOverflow = true;
                 }
-                if (markerLogicalLeft + m_marker->logicalWidth() > newLogicalLayoutOverflowRect.right()) {
+                if (markerLogicalLeft + m_marker->logicalWidth() > newLogicalLayoutOverflowRect.maxX()) {
                     newLogicalLayoutOverflowRect.setWidth(markerLogicalLeft + m_marker->logicalWidth() - box->logicalLeftLayoutOverflow());
                     if (box == root)
                         adjustOverflow = true;
diff --git a/Source/WebCore/rendering/RenderListMarker.cpp b/Source/WebCore/rendering/RenderListMarker.cpp
index bdf28dd..c1c7245 100644
--- a/Source/WebCore/rendering/RenderListMarker.cpp
+++ b/Source/WebCore/rendering/RenderListMarker.cpp
@@ -1260,9 +1260,9 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int tx, int ty)
         marker = marker.transposedRect();
         marker.move(box.x(), box.y() - logicalHeight());
         context->save();
-        context->translate(marker.x(), marker.bottom());
+        context->translate(marker.x(), marker.maxY());
         context->rotate(static_cast<float>(deg2rad(90.)));
-        context->translate(-marker.x(), -marker.bottom());
+        context->translate(-marker.x(), -marker.maxY());
     }
 
     IntPoint textOrigin = IntPoint(marker.x(), marker.y() + style()->fontMetrics().ascent());
diff --git a/Source/WebCore/rendering/RenderObject.cpp b/Source/WebCore/rendering/RenderObject.cpp
index 42b747a..d84fcd0 100644
--- a/Source/WebCore/rendering/RenderObject.cpp
+++ b/Source/WebCore/rendering/RenderObject.cpp
@@ -1378,11 +1378,11 @@ bool RenderObject::repaintAfterLayoutIfNeeded(RenderBoxModelObject* repaintConta
     else if (deltaLeft < 0)
         repaintUsingContainer(repaintContainer, IntRect(newBounds.x(), newBounds.y(), -deltaLeft, newBounds.height()));
 
-    int deltaRight = newBounds.right() - oldBounds.right();
+    int deltaRight = newBounds.maxX() - oldBounds.maxX();
     if (deltaRight > 0)
-        repaintUsingContainer(repaintContainer, IntRect(oldBounds.right(), newBounds.y(), deltaRight, newBounds.height()));
+        repaintUsingContainer(repaintContainer, IntRect(oldBounds.maxX(), newBounds.y(), deltaRight, newBounds.height()));
     else if (deltaRight < 0)
-        repaintUsingContainer(repaintContainer, IntRect(newBounds.right(), oldBounds.y(), -deltaRight, oldBounds.height()));
+        repaintUsingContainer(repaintContainer, IntRect(newBounds.maxX(), oldBounds.y(), -deltaRight, oldBounds.height()));
 
     int deltaTop = newBounds.y() - oldBounds.y();
     if (deltaTop > 0)
@@ -1390,11 +1390,11 @@ bool RenderObject::repaintAfterLayoutIfNeeded(RenderBoxModelObject* repaintConta
     else if (deltaTop < 0)
         repaintUsingContainer(repaintContainer, IntRect(newBounds.x(), newBounds.y(), newBounds.width(), -deltaTop));
 
-    int deltaBottom = newBounds.bottom() - oldBounds.bottom();
+    int deltaBottom = newBounds.maxY() - oldBounds.maxY();
     if (deltaBottom > 0)
-        repaintUsingContainer(repaintContainer, IntRect(newBounds.x(), oldBounds.bottom(), newBounds.width(), deltaBottom));
+        repaintUsingContainer(repaintContainer, IntRect(newBounds.x(), oldBounds.maxY(), newBounds.width(), deltaBottom));
     else if (deltaBottom < 0)
-        repaintUsingContainer(repaintContainer, IntRect(oldBounds.x(), newBounds.bottom(), oldBounds.width(), -deltaBottom));
+        repaintUsingContainer(repaintContainer, IntRect(oldBounds.x(), newBounds.maxY(), oldBounds.width(), -deltaBottom));
 
     if (newOutlineBox == oldOutlineBox)
         return false;
@@ -1416,7 +1416,7 @@ bool RenderObject::repaintAfterLayoutIfNeeded(RenderBoxModelObject* repaintConta
             newOutlineBox.y(),
             width + borderWidth,
             max(newOutlineBox.height(), oldOutlineBox.height()));
-        int right = min(newBounds.right(), oldBounds.right());
+        int right = min(newBounds.maxX(), oldBounds.maxX());
         if (rightRect.x() < right) {
             rightRect.setWidth(min(rightRect.width(), right - rightRect.x()));
             repaintUsingContainer(repaintContainer, rightRect);
@@ -1432,10 +1432,10 @@ bool RenderObject::repaintAfterLayoutIfNeeded(RenderBoxModelObject* repaintConta
         int boxHeight = isBox() ? toRenderBox(this)->height() : 0;
         int borderHeight = max(-outlineStyle->outlineOffset(), max(borderBottom, max(style()->borderBottomLeftRadius().height().calcValue(boxHeight), style()->borderBottomRightRadius().height().calcValue(boxHeight)))) + max(ow, shadowBottom);
         IntRect bottomRect(newOutlineBox.x(),
-            min(newOutlineBox.bottom(), oldOutlineBox.bottom()) - borderHeight,
+            min(newOutlineBox.maxY(), oldOutlineBox.maxY()) - borderHeight,
             max(newOutlineBox.width(), oldOutlineBox.width()),
             height + borderHeight);
-        int bottom = min(newBounds.bottom(), oldBounds.bottom());
+        int bottom = min(newBounds.maxY(), oldBounds.maxY());
         if (bottomRect.y() < bottom) {
             bottomRect.setHeight(min(bottomRect.height(), bottom - bottomRect.y()));
             repaintUsingContainer(repaintContainer, bottomRect);
diff --git a/Source/WebCore/rendering/RenderOverflow.h b/Source/WebCore/rendering/RenderOverflow.h
index 33e8cff..f9de789 100644
--- a/Source/WebCore/rendering/RenderOverflow.h
+++ b/Source/WebCore/rendering/RenderOverflow.h
@@ -42,13 +42,13 @@ class RenderOverflow {
 public:
     RenderOverflow(const IntRect& layoutRect, const IntRect& visualRect) 
         : m_topLayoutOverflow(layoutRect.y())
-        , m_bottomLayoutOverflow(layoutRect.bottom())
+        , m_bottomLayoutOverflow(layoutRect.maxY())
         , m_leftLayoutOverflow(layoutRect.x())
-        , m_rightLayoutOverflow(layoutRect.right())
+        , m_rightLayoutOverflow(layoutRect.maxX())
         , m_topVisualOverflow(visualRect.y())
-        , m_bottomVisualOverflow(visualRect.bottom())
+        , m_bottomVisualOverflow(visualRect.maxY())
         , m_leftVisualOverflow(visualRect.x())
-        , m_rightVisualOverflow(visualRect.right())
+        , m_rightVisualOverflow(visualRect.maxX())
     {
     }
    
@@ -122,41 +122,41 @@ inline void RenderOverflow::move(int dx, int dy)
 inline void RenderOverflow::addLayoutOverflow(const IntRect& rect)
 {
     m_topLayoutOverflow = std::min(rect.y(), m_topLayoutOverflow);
-    m_bottomLayoutOverflow = std::max(rect.bottom(), m_bottomLayoutOverflow);
+    m_bottomLayoutOverflow = std::max(rect.maxY(), m_bottomLayoutOverflow);
     m_leftLayoutOverflow = std::min(rect.x(), m_leftLayoutOverflow);
-    m_rightLayoutOverflow = std::max(rect.right(), m_rightLayoutOverflow);
+    m_rightLayoutOverflow = std::max(rect.maxX(), m_rightLayoutOverflow);
 }
 
 inline void RenderOverflow::addVisualOverflow(const IntRect& rect)
 {
     m_topVisualOverflow = std::min(rect.y(), m_topVisualOverflow);
-    m_bottomVisualOverflow = std::max(rect.bottom(), m_bottomVisualOverflow);
+    m_bottomVisualOverflow = std::max(rect.maxY(), m_bottomVisualOverflow);
     m_leftVisualOverflow = std::min(rect.x(), m_leftVisualOverflow);
-    m_rightVisualOverflow = std::max(rect.right(), m_rightVisualOverflow);
+    m_rightVisualOverflow = std::max(rect.maxX(), m_rightVisualOverflow);
 }
 
 inline void RenderOverflow::setLayoutOverflow(const IntRect& rect)
 {
     m_topLayoutOverflow = rect.y();
-    m_bottomLayoutOverflow = rect.bottom();
+    m_bottomLayoutOverflow = rect.maxY();
     m_leftLayoutOverflow = rect.x();
-    m_rightLayoutOverflow = rect.right();
+    m_rightLayoutOverflow = rect.maxX();
 }
 
 inline void RenderOverflow::setVisualOverflow(const IntRect& rect)
 {
     m_topVisualOverflow = rect.y();
-    m_bottomVisualOverflow = rect.bottom();
+    m_bottomVisualOverflow = rect.maxY();
     m_leftVisualOverflow = rect.x();
-    m_rightVisualOverflow = rect.right();
+    m_rightVisualOverflow = rect.maxX();
 }
 
 inline void RenderOverflow::resetLayoutOverflow(const IntRect& rect)
 {
     m_topLayoutOverflow = rect.y();
-    m_bottomLayoutOverflow = rect.bottom();
+    m_bottomLayoutOverflow = rect.maxY();
     m_leftLayoutOverflow = rect.x();
-    m_rightLayoutOverflow = rect.right();
+    m_rightLayoutOverflow = rect.maxX();
 }
 
 } // namespace WebCore
diff --git a/Source/WebCore/rendering/RenderReplaced.cpp b/Source/WebCore/rendering/RenderReplaced.cpp
index 0d72f95..2a83125 100644
--- a/Source/WebCore/rendering/RenderReplaced.cpp
+++ b/Source/WebCore/rendering/RenderReplaced.cpp
@@ -182,9 +182,9 @@ bool RenderReplaced::shouldPaint(PaintInfo& paintInfo, int& tx, int& ty)
     }
     
     int os = 2 * maximalOutlineSize(paintInfo.phase);
-    if (currentTX + leftVisualOverflow() >= paintInfo.rect.right() + os || currentTX + rightVisualOverflow() <= paintInfo.rect.x() - os)
+    if (currentTX + leftVisualOverflow() >= paintInfo.rect.maxX() + os || currentTX + rightVisualOverflow() <= paintInfo.rect.x() - os)
         return false;
-    if (top >= paintInfo.rect.bottom() + os || bottom <= paintInfo.rect.y() - os)
+    if (top >= paintInfo.rect.maxY() + os || bottom <= paintInfo.rect.y() - os)
         return false;
 
     return true;
diff --git a/Source/WebCore/rendering/RenderScrollbarTheme.cpp b/Source/WebCore/rendering/RenderScrollbarTheme.cpp
index e32d87a..87309d4 100644
--- a/Source/WebCore/rendering/RenderScrollbarTheme.cpp
+++ b/Source/WebCore/rendering/RenderScrollbarTheme.cpp
@@ -98,10 +98,10 @@ IntRect RenderScrollbarTheme::constrainTrackRectToTrackPieces(Scrollbar* scrollb
     IntRect result = rect;
     if (scrollbar->orientation() == HorizontalScrollbar) {
         result.setX(backRect.x());
-        result.setWidth(forwardRect.right() - backRect.x());
+        result.setWidth(forwardRect.maxX() - backRect.x());
     } else {
         result.setY(backRect.y());
-        result.setHeight(forwardRect.bottom() - backRect.y());
+        result.setHeight(forwardRect.maxY() - backRect.y());
     }
     return result;
 }
diff --git a/Source/WebCore/rendering/RenderTable.cpp b/Source/WebCore/rendering/RenderTable.cpp
index ca536bb..d17b95d 100644
--- a/Source/WebCore/rendering/RenderTable.cpp
+++ b/Source/WebCore/rendering/RenderTable.cpp
@@ -454,9 +454,9 @@ void RenderTable::paint(PaintInfo& paintInfo, int tx, int ty)
     PaintPhase paintPhase = paintInfo.phase;
 
     int os = 2 * maximalOutlineSize(paintPhase);
-    if (ty + topVisualOverflow() >= paintInfo.rect.bottom() + os || ty + bottomVisualOverflow() <= paintInfo.rect.y() - os)
+    if (ty + topVisualOverflow() >= paintInfo.rect.maxY() + os || ty + bottomVisualOverflow() <= paintInfo.rect.y() - os)
         return;
-    if (tx + leftVisualOverflow() >= paintInfo.rect.right() + os || tx + rightVisualOverflow() <= paintInfo.rect.x() - os)
+    if (tx + leftVisualOverflow() >= paintInfo.rect.maxX() + os || tx + rightVisualOverflow() <= paintInfo.rect.x() - os)
         return;
 
     bool pushedClip = pushContentsClip(paintInfo, tx, ty);    
diff --git a/Source/WebCore/rendering/RenderTableCell.cpp b/Source/WebCore/rendering/RenderTableCell.cpp
index 90d9865..c5eae2d 100644
--- a/Source/WebCore/rendering/RenderTableCell.cpp
+++ b/Source/WebCore/rendering/RenderTableCell.cpp
@@ -803,8 +803,8 @@ void RenderTableCell::paint(PaintInfo& paintInfo, int tx, int ty)
         tx += x();
         ty += y();
         int os = 2 * maximalOutlineSize(paintInfo.phase);
-        if (ty - table()->outerBorderTop() < paintInfo.rect.bottom() + os &&
-            ty + height() + table()->outerBorderBottom() > paintInfo.rect.y() - os)
+        if (ty - table()->outerBorderTop() < paintInfo.rect.maxY() + os
+            && ty + height() + table()->outerBorderBottom() > paintInfo.rect.y() - os)
             paintCollapsedBorder(paintInfo.context, tx, ty, width(), height());
         return;
     } 
diff --git a/Source/WebCore/rendering/RenderTableSection.cpp b/Source/WebCore/rendering/RenderTableSection.cpp
index 81b5fee..dee2225 100644
--- a/Source/WebCore/rendering/RenderTableSection.cpp
+++ b/Source/WebCore/rendering/RenderTableSection.cpp
@@ -964,9 +964,9 @@ void RenderTableSection::paintObject(PaintInfo& paintInfo, int tx, int ty)
     localRepaintRect.move(-tx, -ty);
     if (style()->isFlippedBlocksWritingMode()) {
         if (style()->isHorizontalWritingMode())
-            localRepaintRect.setY(height() - localRepaintRect.bottom());
+            localRepaintRect.setY(height() - localRepaintRect.maxY());
         else
-            localRepaintRect.setX(width() - localRepaintRect.right());
+            localRepaintRect.setX(width() - localRepaintRect.maxX());
     }
 
     // If some cell overflows, just paint all of them.
@@ -981,7 +981,7 @@ void RenderTableSection::paintObject(PaintInfo& paintInfo, int tx, int ty)
         if (startrow == m_rowPos.size() || (startrow > 0 && (m_rowPos[startrow] >  before)))
           --startrow;
 
-        int after = (style()->isHorizontalWritingMode() ? localRepaintRect.bottom() : localRepaintRect.right()) + os;
+        int after = (style()->isHorizontalWritingMode() ? localRepaintRect.maxY() : localRepaintRect.maxX()) + os;
         endrow = std::lower_bound(m_rowPos.begin(), m_rowPos.end(), after) - m_rowPos.begin();
         if (endrow == m_rowPos.size())
           --endrow;
@@ -1000,7 +1000,7 @@ void RenderTableSection::paintObject(PaintInfo& paintInfo, int tx, int ty)
         if ((startcol == columnPos.size()) || (startcol > 0 && (columnPos[startcol] > start)))
             --startcol;
 
-        int end = (style()->isHorizontalWritingMode() ? localRepaintRect.right() : localRepaintRect.bottom()) + os;
+        int end = (style()->isHorizontalWritingMode() ? localRepaintRect.maxX() : localRepaintRect.maxY()) + os;
         endcol = std::lower_bound(columnPos.begin(), columnPos.end(), end) - columnPos.begin();
         if (endcol == columnPos.size())
             --endcol;
diff --git a/Source/WebCore/rendering/RenderText.cpp b/Source/WebCore/rendering/RenderText.cpp
index 98452a4..4540cc8 100644
--- a/Source/WebCore/rendering/RenderText.cpp
+++ b/Source/WebCore/rendering/RenderText.cpp
@@ -348,9 +348,9 @@ void RenderText::absoluteQuads(Vector<FloatQuad>& quads, ClippingOption option)
         IntRect ellipsisRect = (option == ClipToEllipsis) ? ellipsisRectForBox(box, 0, textLength()) : IntRect();
         if (!ellipsisRect.isEmpty()) {
             if (style()->isHorizontalWritingMode())
-                boundaries.setWidth(ellipsisRect.right() - boundaries.x());
+                boundaries.setWidth(ellipsisRect.maxX() - boundaries.x());
             else
-                boundaries.setHeight(ellipsisRect.bottom() - boundaries.y());
+                boundaries.setHeight(ellipsisRect.maxY() - boundaries.y());
         }
         quads.append(localToAbsoluteQuad(FloatRect(boundaries)));
     }
diff --git a/Source/WebCore/rendering/RenderTextControlSingleLine.cpp b/Source/WebCore/rendering/RenderTextControlSingleLine.cpp
index 7372722..b23cbec 100644
--- a/Source/WebCore/rendering/RenderTextControlSingleLine.cpp
+++ b/Source/WebCore/rendering/RenderTextControlSingleLine.cpp
@@ -393,7 +393,7 @@ void RenderTextControlSingleLine::forwardEvent(Event* event)
 #endif
 
     FloatPoint localPoint = innerTextRenderer->absoluteToLocal(static_cast<MouseEvent*>(event)->absoluteLocation(), false, true);
-    int textRight = innerTextRenderer->borderBoxRect().right();
+    int textRight = innerTextRenderer->borderBoxRect().maxX();
 
     if (m_resultsButton && localPoint.x() < innerTextRenderer->borderBoxRect().x())
         m_resultsButton->defaultEventHandler(event);
diff --git a/Source/WebCore/rendering/RenderThemeMac.mm b/Source/WebCore/rendering/RenderThemeMac.mm
index 605e958..2a3f9fa 100644
--- a/Source/WebCore/rendering/RenderThemeMac.mm
+++ b/Source/WebCore/rendering/RenderThemeMac.mm
@@ -1041,20 +1041,20 @@ void RenderThemeMac::paintMenuListButtonGradients(RenderObject* o, const PaintIn
     FloatRect topGradient(r.x(), r.y(), r.width(), r.height() / 2.0f);
     struct CGFunctionCallbacks topCallbacks = { 0, TopGradientInterpolate, NULL };
     RetainPtr<CGFunctionRef> topFunction(AdoptCF, CGFunctionCreate(NULL, 1, NULL, 4, NULL, &topCallbacks));
-    RetainPtr<CGShadingRef> topShading(AdoptCF, CGShadingCreateAxial(cspace, CGPointMake(topGradient.x(), topGradient.y()), CGPointMake(topGradient.x(), topGradient.bottom()), topFunction.get(), false, false));
+    RetainPtr<CGShadingRef> topShading(AdoptCF, CGShadingCreateAxial(cspace, CGPointMake(topGradient.x(), topGradient.y()), CGPointMake(topGradient.x(), topGradient.maxY()), topFunction.get(), false, false));
 
     FloatRect bottomGradient(r.x() + radius, r.y() + r.height() / 2.0f, r.width() - 2.0f * radius, r.height() / 2.0f);
     struct CGFunctionCallbacks bottomCallbacks = { 0, BottomGradientInterpolate, NULL };
     RetainPtr<CGFunctionRef> bottomFunction(AdoptCF, CGFunctionCreate(NULL, 1, NULL, 4, NULL, &bottomCallbacks));
-    RetainPtr<CGShadingRef> bottomShading(AdoptCF, CGShadingCreateAxial(cspace, CGPointMake(bottomGradient.x(),  bottomGradient.y()), CGPointMake(bottomGradient.x(), bottomGradient.bottom()), bottomFunction.get(), false, false));
+    RetainPtr<CGShadingRef> bottomShading(AdoptCF, CGShadingCreateAxial(cspace, CGPointMake(bottomGradient.x(),  bottomGradient.y()), CGPointMake(bottomGradient.x(), bottomGradient.maxY()), bottomFunction.get(), false, false));
 
     struct CGFunctionCallbacks mainCallbacks = { 0, MainGradientInterpolate, NULL };
     RetainPtr<CGFunctionRef> mainFunction(AdoptCF, CGFunctionCreate(NULL, 1, NULL, 4, NULL, &mainCallbacks));
-    RetainPtr<CGShadingRef> mainShading(AdoptCF, CGShadingCreateAxial(cspace, CGPointMake(r.x(),  r.y()), CGPointMake(r.x(), r.bottom()), mainFunction.get(), false, false));
+    RetainPtr<CGShadingRef> mainShading(AdoptCF, CGShadingCreateAxial(cspace, CGPointMake(r.x(),  r.y()), CGPointMake(r.x(), r.maxY()), mainFunction.get(), false, false));
 
     RetainPtr<CGShadingRef> leftShading(AdoptCF, CGShadingCreateAxial(cspace, CGPointMake(r.x(),  r.y()), CGPointMake(r.x() + radius, r.y()), mainFunction.get(), false, false));
 
-    RetainPtr<CGShadingRef> rightShading(AdoptCF, CGShadingCreateAxial(cspace, CGPointMake(r.right(),  r.y()), CGPointMake(r.right() - radius, r.y()), mainFunction.get(), false, false));
+    RetainPtr<CGShadingRef> rightShading(AdoptCF, CGShadingCreateAxial(cspace, CGPointMake(r.maxX(),  r.y()), CGPointMake(r.maxX() - radius, r.y()), mainFunction.get(), false, false));
     paintInfo.context->save();
     CGContextClipToRect(context, r);
     paintInfo.context->addRoundedRectClip(border);
@@ -1099,7 +1099,7 @@ bool RenderThemeMac::paintMenuListButton(RenderObject* o, const PaintInfo& paint
     float centerY = bounds.y() + bounds.height() / 2.0f;
     float arrowHeight = baseArrowHeight * fontScale;
     float arrowWidth = baseArrowWidth * fontScale;
-    float leftEdge = bounds.right() - arrowPaddingRight * o->style()->effectiveZoom() - arrowWidth;
+    float leftEdge = bounds.maxX() - arrowPaddingRight * o->style()->effectiveZoom() - arrowWidth;
     float spaceBetweenArrows = baseSpaceBetweenArrows * fontScale;
 
     if (bounds.width() < arrowWidth + arrowPaddingLeft * o->style()->effectiveZoom())
@@ -1138,11 +1138,11 @@ bool RenderThemeMac::paintMenuListButton(RenderObject* o, const PaintInfo& paint
     paintInfo.context->setStrokeStyle(SolidStroke);
     paintInfo.context->setStrokeColor(leftSeparatorColor, ColorSpaceDeviceRGB);
     paintInfo.context->drawLine(IntPoint(leftEdgeOfSeparator, bounds.y()),
-                                IntPoint(leftEdgeOfSeparator, bounds.bottom()));
+                                IntPoint(leftEdgeOfSeparator, bounds.maxY()));
 
     paintInfo.context->setStrokeColor(rightSeparatorColor, ColorSpaceDeviceRGB);
     paintInfo.context->drawLine(IntPoint(leftEdgeOfSeparator + separatorSpace, bounds.y()),
-                                IntPoint(leftEdgeOfSeparator + separatorSpace, bounds.bottom()));
+                                IntPoint(leftEdgeOfSeparator + separatorSpace, bounds.maxY()));
 
     paintInfo.context->restore();
     return false;
@@ -1293,9 +1293,9 @@ bool RenderThemeMac::paintSliderTrack(RenderObject* o, const PaintInfo& paintInf
     RetainPtr<CGFunctionRef> mainFunction(AdoptCF, CGFunctionCreate(NULL, 1, NULL, 4, NULL, &mainCallbacks));
     RetainPtr<CGShadingRef> mainShading;
     if (o->style()->appearance() == SliderVerticalPart)
-        mainShading.adoptCF(CGShadingCreateAxial(cspace, CGPointMake(bounds.x(),  bounds.bottom()), CGPointMake(bounds.right(), bounds.bottom()), mainFunction.get(), false, false));
+        mainShading.adoptCF(CGShadingCreateAxial(cspace, CGPointMake(bounds.x(),  bounds.maxY()), CGPointMake(bounds.maxX(), bounds.maxY()), mainFunction.get(), false, false));
     else
-        mainShading.adoptCF(CGShadingCreateAxial(cspace, CGPointMake(bounds.x(),  bounds.y()), CGPointMake(bounds.x(), bounds.bottom()), mainFunction.get(), false, false));
+        mainShading.adoptCF(CGShadingCreateAxial(cspace, CGPointMake(bounds.x(),  bounds.y()), CGPointMake(bounds.x(), bounds.maxY()), mainFunction.get(), false, false));
 
     IntSize radius(trackRadius, trackRadius);
     paintInfo.context->addRoundedRectClip(RoundedIntRect(bounds, radius, radius, radius, radius));
diff --git a/Source/WebCore/rendering/RenderView.cpp b/Source/WebCore/rendering/RenderView.cpp
index d76b85d..4d49f65 100644
--- a/Source/WebCore/rendering/RenderView.cpp
+++ b/Source/WebCore/rendering/RenderView.cpp
@@ -304,9 +304,9 @@ void RenderView::computeRectForRepaint(RenderBoxModelObject* repaintContainer, I
         // We have to flip by hand since the view's logical height has not been determined.  We
         // can use the viewport width and height.
         if (style()->isHorizontalWritingMode())
-            rect.setY(viewHeight() - rect.bottom());
+            rect.setY(viewHeight() - rect.maxY());
         else
-            rect.setX(viewWidth() - rect.right());
+            rect.setX(viewWidth() - rect.maxX());
     }
 
     if (fixed && m_frameView)
@@ -664,7 +664,7 @@ int RenderView::docBottom() const
     flipForWritingMode(overflowRect);
     if (hasTransform())
         overflowRect = layer()->currentTransform().mapRect(overflowRect);
-    return overflowRect.bottom();
+    return overflowRect.maxY();
 }
 
 int RenderView::docLeft() const
@@ -682,7 +682,7 @@ int RenderView::docRight() const
     flipForWritingMode(overflowRect);
     if (hasTransform())
         overflowRect = layer()->currentTransform().mapRect(overflowRect);
-    return overflowRect.right();
+    return overflowRect.maxX();
 }
 
 int RenderView::viewHeight() const
diff --git a/Source/WebCore/rendering/RootInlineBox.cpp b/Source/WebCore/rendering/RootInlineBox.cpp
index e9e2029..aa87683 100644
--- a/Source/WebCore/rendering/RootInlineBox.cpp
+++ b/Source/WebCore/rendering/RootInlineBox.cpp
@@ -544,14 +544,14 @@ IntRect RootInlineBox::paddedLayoutOverflowRect(int endPadding) const
     
     if (isHorizontal()) {
         if (isLeftToRightDirection())
-            lineLayoutOverflow.shiftRightEdgeTo(max(lineLayoutOverflow.right(), logicalRight() + endPadding));
+            lineLayoutOverflow.shiftMaxXEdgeTo(max(lineLayoutOverflow.maxX(), logicalRight() + endPadding));
         else
-            lineLayoutOverflow.shiftLeftEdgeTo(min(lineLayoutOverflow.x(), logicalLeft() - endPadding));
+            lineLayoutOverflow.shiftXEdgeTo(min(lineLayoutOverflow.x(), logicalLeft() - endPadding));
     } else {
         if (isLeftToRightDirection())
-            lineLayoutOverflow.shiftBottomEdgeTo(max(lineLayoutOverflow.bottom(), logicalRight() + endPadding));
+            lineLayoutOverflow.shiftMaxYEdgeTo(max(lineLayoutOverflow.maxY(), logicalRight() + endPadding));
         else
-            lineLayoutOverflow.shiftTopEdgeTo(min(lineLayoutOverflow.y(), logicalRight() - endPadding));
+            lineLayoutOverflow.shiftYEdgeTo(min(lineLayoutOverflow.y(), logicalRight() - endPadding));
     }
     
     return lineLayoutOverflow;
diff --git a/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp b/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp
index ce2609d..173f815 100644
--- a/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp
+++ b/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp
@@ -103,12 +103,12 @@ IntRect RenderSVGInlineText::localCaretRect(InlineBox* box, int caretOffset, int
     // Use the edge of the selection rect to determine the caret rect.
     if (static_cast<unsigned>(caretOffset) < textBox->start() + textBox->len()) {
         IntRect rect = textBox->selectionRect(0, 0, caretOffset, caretOffset + 1);
-        int x = box->isLeftToRightDirection() ? rect.x() : rect.right();
+        int x = box->isLeftToRightDirection() ? rect.x() : rect.maxX();
         return IntRect(x, rect.y(), caretWidth, rect.height());
     }
 
     IntRect rect = textBox->selectionRect(0, 0, caretOffset - 1, caretOffset);
-    int x = box->isLeftToRightDirection() ? rect.right() : rect.x();
+    int x = box->isLeftToRightDirection() ? rect.maxX() : rect.x();
     return IntRect(x, rect.y(), caretWidth, rect.height());
 }
 
diff --git a/Source/WebKit/mac/ChangeLog b/Source/WebKit/mac/ChangeLog
index f3c4fa9..41a0afa 100644
--- a/Source/WebKit/mac/ChangeLog
+++ b/Source/WebKit/mac/ChangeLog
@@ -1,3 +1,21 @@
+2011-02-01  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Oliver Hunt.
+
+        https://bugs.webkit.org/show_bug.cgi?id=53520
+        
+        Remove the physical terminology from IntRect and FloatRect.
+        
+        Now that we have flipped RenderBlocks for vertical-rl and horizontal-bt writing modes,
+        we need to update our terminology to be more accurate.
+
+        I'm borrowing a page from AppKit here (which also supports flipped NSViews) and
+        renaming right() and bottom() to maxX() and maxY().  These terms remain accurate
+        even for flipped rectangles.
+
+        * WebView/WebHTMLView.mm:
+        (setNeedsDisplayInRect):
+
 2011-02-01  Beth Dakin  <bdakin at apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/Source/WebKit/mac/WebView/WebHTMLView.mm b/Source/WebKit/mac/WebView/WebHTMLView.mm
index 4a53f0c..46430da 100644
--- a/Source/WebKit/mac/WebView/WebHTMLView.mm
+++ b/Source/WebKit/mac/WebView/WebHTMLView.mm
@@ -312,7 +312,7 @@ static void setNeedsDisplayInRect(NSView *self, SEL cmd, NSRect invalidRect)
     NSRect invalidRectInWebFrameViewCoordinates = [enclosingWebFrameView convertRect:invalidRect fromView:self];
     IntRect invalidRectInFrameViewCoordinates(invalidRectInWebFrameViewCoordinates);
     if (![enclosingWebFrameView isFlipped])
-        invalidRectInFrameViewCoordinates.setY(frameView->frameRect().size().height() - invalidRectInFrameViewCoordinates.bottom());
+        invalidRectInFrameViewCoordinates.setY(frameView->frameRect().size().height() - invalidRectInFrameViewCoordinates.maxY());
 
     frameView->invalidateRect(invalidRectInFrameViewCoordinates);
 }
diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index 0dd34ca..8aadb0b 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,3 +1,33 @@
+2011-02-01  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Oliver Hunt.
+
+        https://bugs.webkit.org/show_bug.cgi?id=53520
+        
+        Remove the physical terminology from IntRect and FloatRect.
+        
+        Now that we have flipped RenderBlocks for vertical-rl and horizontal-bt writing modes,
+        we need to update our terminology to be more accurate.
+
+        I'm borrowing a page from AppKit here (which also supports flipped NSViews) and
+        renaming right() and bottom() to maxX() and maxY().  These terms remain accurate
+        even for flipped rectangles.
+
+        * Platform/Region.cpp:
+        (WebKit::Region::Shape::Shape):
+        * UIProcess/API/mac/WKPrintingView.mm:
+        (pageDidComputePageRects):
+        * UIProcess/FindIndicator.cpp:
+        (WebKit::FindIndicator::draw):
+        * UIProcess/TiledDrawingAreaProxy.cpp:
+        (WebKit::TiledDrawingAreaProxy::invalidate):
+        (WebKit::TiledDrawingAreaProxy::paint):
+        (WebKit::TiledDrawingAreaProxy::createTiles):
+        * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
+        (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
+        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+        (WebKit::NetscapePlugin::callSetWindow):
+
 2011-02-01  Anders Carlsson  <andersca at apple.com>
 
         Reviewed by Adam Roben.
diff --git a/Source/WebKit2/Platform/Region.cpp b/Source/WebKit2/Platform/Region.cpp
index c289078..f266dbe 100644
--- a/Source/WebKit2/Platform/Region.cpp
+++ b/Source/WebKit2/Platform/Region.cpp
@@ -73,8 +73,8 @@ Region::Shape::Shape(const IntRect& rect)
 {
     appendSpan(rect.y());
     appendSegment(rect.x());
-    appendSegment(rect.right());
-    appendSpan(rect.bottom());
+    appendSegment(rect.maxX());
+    appendSpan(rect.maxY());
 }
 
 void Region::Shape::appendSpan(int y)
diff --git a/Source/WebKit2/UIProcess/API/mac/WKPrintingView.mm b/Source/WebKit2/UIProcess/API/mac/WKPrintingView.mm
index 9b91345..9ca5bf1 100644
--- a/Source/WebKit2/UIProcess/API/mac/WKPrintingView.mm
+++ b/Source/WebKit2/UIProcess/API/mac/WKPrintingView.mm
@@ -233,8 +233,8 @@ static void pageDidComputePageRects(const Vector<WebCore::IntRect>& pageRects, d
 
         const IntRect& lastPrintingPageRect = view->_printingPageRects[view->_printingPageRects.size() - 1];
         NSRect newFrameSize = NSMakeRect(0, 0, 
-            ceil(lastPrintingPageRect.right() * view->_totalScaleFactorForPrinting), 
-            ceil(lastPrintingPageRect.bottom() * view->_totalScaleFactorForPrinting));
+            ceil(lastPrintingPageRect.maxX() * view->_totalScaleFactorForPrinting), 
+            ceil(lastPrintingPageRect.maxY() * view->_totalScaleFactorForPrinting));
         LOG(View, "WKPrintingView setting frame size to x:%g y:%g width:%g height:%g", newFrameSize.origin.x, newFrameSize.origin.y, newFrameSize.size.width, newFrameSize.size.height);
         [view setFrame:newFrameSize];
 
diff --git a/Source/WebKit2/UIProcess/FindIndicator.cpp b/Source/WebKit2/UIProcess/FindIndicator.cpp
index e7053f6..d6ac461 100644
--- a/Source/WebKit2/UIProcess/FindIndicator.cpp
+++ b/Source/WebKit2/UIProcess/FindIndicator.cpp
@@ -157,7 +157,7 @@ void FindIndicator::draw(GraphicsContext& graphicsContext, const IntRect& dirtyR
         graphicsContext.save();
         FloatRect innerPathRect = inflateRect(textRect, horizontalPaddingInsideLightBorder, verticalPaddingInsideLightBorder);
         graphicsContext.clip(pathWithRoundedRect(innerPathRect, cornerRadius));
-        RefPtr<Gradient> gradient = Gradient::create(FloatPoint(innerPathRect.x(), innerPathRect.y()), FloatPoint(innerPathRect.x(), innerPathRect.bottom()));
+        RefPtr<Gradient> gradient = Gradient::create(FloatPoint(innerPathRect.x(), innerPathRect.y()), FloatPoint(innerPathRect.x(), innerPathRect.maxY()));
         gradient->addColorStop(0, gradientLightColor());
         gradient->addColorStop(1, gradientDarkColor());
         graphicsContext.setFillGradient(gradient);
diff --git a/Source/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp b/Source/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
index d487dfe..6a54723 100644
--- a/Source/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
+++ b/Source/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
@@ -240,15 +240,15 @@ void TiledDrawingAreaProxy::invalidate(const IntRect& contentsDirtyRect)
 {
     IntRect dirtyRect(mapFromContents(contentsDirtyRect));
 
-    TiledDrawingAreaTile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.topLeft());
-    TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(dirtyRect.bottomRight());
+    TiledDrawingAreaTile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.location());
+    TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(IntPoint(dirtyRect.maxX(), dirtyRect.maxY()));
 
     IntRect coverRect = calculateCoverRect(m_previousVisibleRect);
 
     Vector<TiledDrawingAreaTile::Coordinate> tilesToRemove;
 
-    for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
-        for (unsigned xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) {
+    for (unsigned yCoordinate = topLeft.y(); yCoordinate < bottomRight.y(); ++yCoordinate) {
+        for (unsigned xCoordinate = topLeft.x(); xCoordinate < bottomRight.x(); ++xCoordinate) {
             RefPtr<TiledDrawingAreaTile> currentTile = tileAt(TiledDrawingAreaTile::Coordinate(xCoordinate, yCoordinate));
             if (!currentTile)
                 continue;
@@ -338,11 +338,11 @@ bool TiledDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext co
 
     IntRect dirtyRect = mapFromContents(rect);
 
-    TiledDrawingAreaTile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.topLeft());
-    TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(dirtyRect.bottomRight());
+    TiledDrawingAreaTile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.location());
+    TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(IntPoint(dirtyRect.maxX(), dirtyRect.maxY()));
 
-    for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
-        for (unsigned xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) {
+    for (unsigned yCoordinate = topLeft.y(); yCoordinate < bottomRight.y(); ++yCoordinate) {
+        for (unsigned xCoordinate = topLeft.x(); xCoordinate < bottomRight.x(); ++xCoordinate) {
             TiledDrawingAreaTile::Coordinate currentCoordinate(xCoordinate, yCoordinate);
             RefPtr<TiledDrawingAreaTile> currentTile = tileAt(currentCoordinate);
             if (currentTile && currentTile->isReadyToPaint())
@@ -436,10 +436,10 @@ void TiledDrawingAreaProxy::createTiles()
     Vector<TiledDrawingAreaTile::Coordinate> tilesToCreate;
     unsigned requiredTileCount = 0;
     bool hasVisibleCheckers = false;
-    TiledDrawingAreaTile::Coordinate topLeft = tileCoordinateForPoint(coverRect.topLeft());
-    TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(coverRect.bottomRight());
-    for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
-        for (unsigned xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) {
+    TiledDrawingAreaTile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.location());
+    TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(IntPoint(dirtyRect.maxX(), dirtyRect.maxY()));
+    for (unsigned yCoordinate = topLeft.y(); yCoordinate < bottomRight.y(); ++yCoordinate) {
+        for (unsigned xCoordinate = topLeft.x(); xCoordinate < bottomRight.x(); ++xCoordinate) {
             TiledDrawingAreaTile::Coordinate currentCoordinate(xCoordinate, yCoordinate);
             // Distance is 0 for all currently visible tiles.
             double distance = tileDistance(visibleRect, currentCoordinate);
diff --git a/Source/WebKit2/UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm b/Source/WebKit2/UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm
index 3ed97f3..a580a57 100644
--- a/Source/WebKit2/UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm
+++ b/Source/WebKit2/UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm
@@ -97,7 +97,7 @@ void ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore(UpdateChunk*
 
     // Flip the destination.
     CGContextScaleCTM(m_bitmapContext.get(), 1, -1);
-    CGContextTranslateCTM(m_bitmapContext.get(), 0, -(updateChunkRect.y() + updateChunkRect.bottom()));
+    CGContextTranslateCTM(m_bitmapContext.get(), 0, -(updateChunkRect.y() + updateChunkRect.maxY()));
 
     CGContextDrawImage(m_bitmapContext.get(), updateChunkRect, image.get());
 
diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
index d82dbd3..e746d5a 100644
--- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
+++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
@@ -352,8 +352,8 @@ void NetscapePlugin::callSetWindow()
     m_npWindow.height = m_frameRect.height();
     m_npWindow.clipRect.top = m_clipRect.y();
     m_npWindow.clipRect.left = m_clipRect.x();
-    m_npWindow.clipRect.bottom = m_clipRect.bottom();
-    m_npWindow.clipRect.right = m_clipRect.right();
+    m_npWindow.clipRect.bottom = m_clipRect.maxY();
+    m_npWindow.clipRect.right = m_clipRect.maxX();
 
     NPP_SetWindow(&m_npWindow);
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list