ui: Create the gfx::QuadF class.

This class is composed of four points representing its corners. It does not
have to be axis-aligned, unlike a rectangle. The class supports the following
operations:

IsRectilinear()
- True if the quad is an axis-aligned rectangle.
IsCounterClockwise()
- True if the points of the quad are in counter-clockwise order.
Contains(Point)
- True if Point is inside the quad or on its boundary.
BoundingBox()
- A Rectangle whose edges are defined by the four points of the quad.
Scale()
- Scales each point on the quad by the given scale factors.
operator+/-
- Moves each point in the quad by the given offset.

The operations on this class are inspired by, but not copied from, the
FloatQuad class in WebCore. I've written my own implementation to match those
in WebCore for each of them, with exception of IsRectilinear() as I also
wrote the current method in WebCore.

Tests:
ui_unittests:QuadTest.Construction
ui_unittests:QuadTest.AddingVectors
ui_unittests:QuadTest.IsRectilinear
ui_unittests:QuadTest.IsCounterClockwise
ui_unittests:QuadTest.BoundingBox
ui_unittests:QuadTest.ContainsPoint
ui_unittests:QuadTest.Scale

BUG=147395
R=sky,pkasting

Review URL: https://codereview.chromium.org/11369043

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165689 0039d316-1c4b-4281-b951-d872f2087c98
8 files changed