Bug 83604 - Clean up multiple RenderedPosition::absoluteRect definitions and correct LayoutUnit usage
Summary: Clean up multiple RenderedPosition::absoluteRect definitions and correct Layo...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Levi Weintraub
Depends on:
Blocks: 60318
  Show dependency treegraph
Reported: 2012-04-10 12:21 PDT by Levi Weintraub
Modified: 2012-04-10 16:44 PDT (History)
5 users (show)

See Also:

Patch (4.59 KB, patch)
2012-04-10 12:26 PDT, Levi Weintraub
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Levi Weintraub 2012-04-10 12:21:30 PDT
There are currently 3 definitions of RenderedPosition::absoluteRect where only one is needed. It also currently returns a LayoutRect despite being in absolute coordinates, which should be integers.
Comment 1 Levi Weintraub 2012-04-10 12:26:17 PDT
Created attachment 136508 [details]
Comment 2 Julien Chaffraix 2012-04-10 14:07:09 PDT
Comment on attachment 136508 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=136508&action=review

> Source/WebCore/editing/RenderedPosition.cpp:232
> +    IntRect localRect = pixelSnappedIntRect(m_renderer->localCaretRect(m_inlineBox, m_offset, extraWidthToEndOfLine));

For people watching at home, the pixelSnappedIntRect confused me a lot and I pinged leviw@ about that. Currently we want to snap our rectangles before calling localToAbsoluteQuad to be consistent across all the painting code.

We may lose some precision by doing so (if we have a transform that is not pixel aligned for example), but coherency is better for now. We may relax this requirement later.
Comment 3 Levi Weintraub 2012-04-10 14:19:18 PDT
Comment on attachment 136508 [details]

Thanks Julien!
Comment 4 WebKit Review Bot 2012-04-10 16:44:44 PDT
Comment on attachment 136508 [details]

Clearing flags on attachment: 136508

Committed r113792: <http://trac.webkit.org/changeset/113792>
Comment 5 WebKit Review Bot 2012-04-10 16:44:48 PDT
All reviewed patches have been landed.  Closing bug.