[webkit-reviews] review granted: [Bug 25228] SelectionController::absoluteCaretBounds returns an inflated caret (the caret repaint rect) : [Attachment 29531] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 16 08:36:04 PDT 2009


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Justin Garcia
<justin.garcia at apple.com>'s request for review:
Bug 25228: SelectionController::absoluteCaretBounds returns an inflated caret
(the caret repaint rect)
https://bugs.webkit.org/show_bug.cgi?id=25228

Attachment 29531: patch
https://bugs.webkit.org/attachment.cgi?id=29531&action=review

------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
> Index: WebCore/editing/SelectionController.cpp
> ===================================================================

> +    IntRect oldAbsCaretBounds = m_absCaretBounds;
> +    // FIXME: Rename m_caretRect to m_localCaretRect.
> +    m_absCaretBounds = absoluteBoundsForLocalRect(m_caretRect);
>      
> -    if (oldAbsRepaintRect == m_absCaretBounds)
> +    if (oldAbsCaretBounds == m_absCaretBounds)
>	   return false;
> +	   
> +    IntRect oldAbsoluteCaretRepaintBounds = m_absoluteCaretRepaintBounds;
> +    // We believe that we need to inflate the local rect before transforming
it to obtain the repaint bounds.
> +    m_absoluteCaretRepaintBounds =
absoluteBoundsForLocalRect(repaintRectForCaret(m_caretRect));

You could just call caretRepaintRect() here.

r=me.


More information about the webkit-reviews mailing list