Add FractionalLayoutPoint/Size/Rect for sub-pixel layout
authorleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Feb 2012 06:40:30 +0000 (06:40 +0000)
committerleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Feb 2012 06:40:30 +0000 (06:40 +0000)
commita970d2f1219ed4cda3eff41cce13c1567a5d7169
treee056fd79f19d76facc18f90387d3bc2ff95d1794
parent75aca6928b92795dc35dab111a83eedcb6c87b23
Add FractionalLayoutPoint/Size/Rect for sub-pixel layout
https://bugs.webkit.org/show_bug.cgi?id=76571

Reviewed by Eric Seidel.

Add fixed point versions of the Point, Size and Rect classes using
the new FractionalLayoutPoint type and.

FractionalLayoutPoint, FractionalLayoutSize and FractionalLayoutRect are
Point, Size and Rect implementations respectively using this new type.

No new tests.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.order:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/FractionalLayoutUnit.h:
Fixed a couple of typos and signed/unsigned bugs.

* platform/graphics/FloatPoint.cpp:
(WebCore::FloatPoint::FloatPoint):
Add explicit FloatPoint(FractionalLayoutPoint) constructor.

(WebCore::FloatPoint::move):
Add move(FractionalLayoutSize) implementation.

(WebCore::FloatPoint::moveBy):
Add moveBy(FractionalLayoutPoint) implementation.

* platform/graphics/FloatPoint.h:
* platform/graphics/FloatRect.cpp:
(WebCore::FloatRect::FloatRect):
Add explicit FloatRectFractionalLayoutRect) constructor.

* platform/graphics/FloatRect.h:
(WebCore):
(FloatRect):
* platform/graphics/FloatSize.cpp:
(WebCore::FloatSize::FloatSize):
Add explicit FloatSize(FractionalLayoutSize) constructor.

* platform/graphics/FloatSize.h:
* platform/graphics/FractionalLayoutPoint.h: Added.
* platform/graphics/FractionalLayoutRect.cpp: Added.
* platform/graphics/FractionalLayoutRect.h: Added.
* platform/graphics/FractionalLayoutSize.cpp: Added.
* platform/graphics/FractionalLayoutSize.h: Added.
* platform/graphics/IntRect.cpp:
(WebCore::IntRect::IntRect):
Add explicit IntRect(FractionalLayoutRect) constructor.

* platform/graphics/IntRect.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.order
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/FractionalLayoutUnit.h
Source/WebCore/platform/graphics/FloatPoint.cpp
Source/WebCore/platform/graphics/FloatPoint.h
Source/WebCore/platform/graphics/FloatRect.cpp
Source/WebCore/platform/graphics/FloatRect.h
Source/WebCore/platform/graphics/FloatSize.cpp
Source/WebCore/platform/graphics/FloatSize.h
Source/WebCore/platform/graphics/FractionalLayoutPoint.h [new file with mode: 0644]
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/FractionalLayoutSize.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/FractionalLayoutSize.h [new file with mode: 0644]
Source/WebCore/platform/graphics/IntRect.cpp
Source/WebCore/platform/graphics/IntRect.h