Add FractionalLayoutRect for sub-pixel layout
authoreae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2012 01:19:11 +0000 (01:19 +0000)
committereae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2012 01:19:11 +0000 (01:19 +0000)
commit015974c007403fcb603f0c8cfaf180ac5592714b
treef0a7e0006e0caa1d3ed66597202913937a0c897c
parent18f38d77b4b0f873532d6d819578ef732b8d6432
Add FractionalLayoutRect for sub-pixel layout
https://bugs.webkit.org/show_bug.cgi?id=78924

Reviewed by Eric Seidel.

Add FractionalLayoutUnit version of Rect class. Uses FractionalLayoutPoint
and FractionalLayoutSize internally.

Also add conversions to int/float versions of same.

No new tests.

* GNUmakefile.list.am:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/FloatRect.cpp:
(WebCore::FloatRect::FloatRect):
(WebCore):
* platform/graphics/FloatRect.h:
(WebCore):
(FloatRect):
* platform/graphics/FractionalLayoutRect.cpp: Added.
(WebCore):
(WebCore::FractionalLayoutRect::FractionalLayoutRect):
(WebCore::FractionalLayoutRect::intersects):
(WebCore::FractionalLayoutRect::contains):
(WebCore::FractionalLayoutRect::intersect):
(WebCore::FractionalLayoutRect::unite):
(WebCore::FractionalLayoutRect::uniteIfNonZero):
(WebCore::FractionalLayoutRect::scale):
(WebCore::unionRect):
(WebCore::enclosingIntRect):
(WebCore::enclosingFractionalLayoutRect):
(WebCore::pixelSnappedIntRect):
* platform/graphics/FractionalLayoutRect.h: Added.
(WebCore):
(FractionalLayoutRect):
(WebCore::FractionalLayoutRect::FractionalLayoutRect):
(WebCore::FractionalLayoutRect::location):
(WebCore::FractionalLayoutRect::size):
(WebCore::FractionalLayoutRect::setLocation):
(WebCore::FractionalLayoutRect::setSize):
(WebCore::FractionalLayoutRect::x):
(WebCore::FractionalLayoutRect::y):
(WebCore::FractionalLayoutRect::maxX):
(WebCore::FractionalLayoutRect::maxY):
(WebCore::FractionalLayoutRect::width):
(WebCore::FractionalLayoutRect::height):
(WebCore::FractionalLayoutRect::setX):
(WebCore::FractionalLayoutRect::setY):
(WebCore::FractionalLayoutRect::setWidth):
(WebCore::FractionalLayoutRect::setHeight):
(WebCore::FractionalLayoutRect::isEmpty):
(WebCore::FractionalLayoutRect::center):
(WebCore::FractionalLayoutRect::move):
(WebCore::FractionalLayoutRect::moveBy):
(WebCore::FractionalLayoutRect::expand):
(WebCore::FractionalLayoutRect::contract):
(WebCore::FractionalLayoutRect::shiftXEdgeTo):
(WebCore::FractionalLayoutRect::shiftMaxXEdgeTo):
(WebCore::FractionalLayoutRect::shiftYEdgeTo):
(WebCore::FractionalLayoutRect::shiftMaxYEdgeTo):
(WebCore::FractionalLayoutRect::minXMinYCorner):
(WebCore::FractionalLayoutRect::maxXMinYCorner):
(WebCore::FractionalLayoutRect::minXMaxYCorner):
(WebCore::FractionalLayoutRect::maxXMaxYCorner):
(WebCore::FractionalLayoutRect::contains):
(WebCore::FractionalLayoutRect::inflateX):
(WebCore::FractionalLayoutRect::inflateY):
(WebCore::FractionalLayoutRect::inflate):
(WebCore::FractionalLayoutRect::transposedRect):
(WebCore::FractionalLayoutRect::infiniteRect):
(WebCore::intersection):
(WebCore::unionRect):
(WebCore::operator==):
(WebCore::operator!=):
* platform/graphics/IntRect.cpp:
(WebCore::IntRect::IntRect):
(WebCore):
* platform/graphics/IntRect.h:
(WebCore):
(IntRect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108423 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/graphics/FloatRect.cpp
Source/WebCore/platform/graphics/FloatRect.h
Source/WebCore/platform/graphics/FractionalLayoutRect.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/FractionalLayoutRect.h [new file with mode: 0644]
Source/WebCore/platform/graphics/IntRect.cpp
Source/WebCore/platform/graphics/IntRect.h