[webkit-reviews] review granted: [Bug 60273] Extract a DragCaretController from FrameSelection : [Attachment 92747] Fixed per comments
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun May 8 15:54:46 PDT 2011
Darin Adler <darin at apple.com> has granted Ryosuke Niwa <rniwa at webkit.org>'s
request for review:
Bug 60273: Extract a DragCaretController from FrameSelection
https://bugs.webkit.org/show_bug.cgi?id=60273
Attachment 92747: Fixed per comments
https://bugs.webkit.org/attachment.cgi?id=92747&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=92747&action=review
> Source/WebCore/editing/FrameSelection.cpp:155
> +void DragCaretController::setCaretPosition(const VisiblePosition& position)
> +{
> + if (Node* node = m_position.deepEquivalent().containerNode())
> + invalidateCaretRect(node);
> + m_position = position;
> + m_caretRectNeedsUpdate = true;
> + Document* document = 0;
> + if (Node* node = m_position.deepEquivalent().containerNode()) {
> + invalidateCaretRect(node);
> + document = node->document();
> + }
> + updateCaretRect(document, m_position, m_position.isNotNull() ?
VisibleSelection::CaretSelection : VisibleSelection::NoSelection,
m_position.isOrphan());
> +}
Should this function have an early exit for the case where the position is not
changing?
> Source/WebCore/editing/FrameSelection.cpp:261
> +void FrameSelection::nodeWillBeRemoved(Node *node)
Should be Node* rather than Node *.
More information about the webkit-reviews
mailing list