Update LayoutUnit usage in Editor and Frame
authorleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Apr 2012 18:34:43 +0000 (18:34 +0000)
committerleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Apr 2012 18:34:43 +0000 (18:34 +0000)
commit80d5568049f354a0ee7e4f5676a3fc45af9e3849
treecfd0073e4c0f1552874aeb49dafbf399f9f006f7
parentf911a9cc9d24c1ac16c3b094b850058b832dbf18
Update LayoutUnit usage in Editor and Frame
https://bugs.webkit.org/show_bug.cgi?id=83278

Reviewed by Eric Seidel.

Frame and Editor both take input from the embedder, which passes along coordinates in screen
coordinates, which aren't fractional. Updating a few remaining functions to show this, and correcting
some inconsistencies in LayoutUnit usage.

No new tests. No change in behavior.

* editing/Editor.cpp:
(WebCore::Editor::rangeForPoint): windowToContents returns an IntPoint.
(WebCore::Editor::countMatchesForText): Using enclosingIntRect since we're (fake) repainting the entire
view rect.
* editing/Editor.h:
(Editor): Correcting mismatched function signature.
* page/Frame.cpp:
(WebCore::Frame::visiblePositionForPoint): Frame takes points in screen coordinates, usually from the
embedder. Changing these functions to be in IntPoints.
(WebCore::Frame::documentAtPoint): Ditto.
(WebCore::Frame::rangeForPoint): Ditto.
* page/Frame.h:
(Frame):
* platform/graphics/IntRect.h:
(enclosingIntRect): Adding an inline no-op copy of the FractionalLayoutRect method enclosingIntRect.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@113466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/Editor.h
Source/WebCore/page/Frame.cpp
Source/WebCore/page/Frame.h
Source/WebCore/platform/graphics/IntRect.h