[webkit-reviews] review granted: [Bug 52676] Stop instantiating legacy editing positions in InsertTextCommand, MoveSelectionCommand, ReplaceSelectionCommand, SelectionController, SpellChecker, TypingCommand, and markup.cpp : [Attachment 79347] cleanup

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 24 12:03:09 PST 2011


Eric Seidel <eric at webkit.org> has granted Ryosuke Niwa <rniwa at webkit.org>'s
request for review:
Bug 52676: Stop instantiating legacy editing positions in InsertTextCommand,
MoveSelectionCommand, ReplaceSelectionCommand, SelectionController,
SpellChecker, TypingCommand, and markup.cpp
https://bugs.webkit.org/show_bug.cgi?id=52676

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

------- Additional Comments from Eric Seidel <eric at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=79347&action=review

Seems sane.  Please see comments.

> Source/WebCore/editing/InsertTextCommand.cpp:175
> +	   endPosition = Position(textNode, offset + text.length(),
Position::PositionIsOffsetInAnchor);

This seems like it will be off the end of the node?

> Source/WebCore/editing/MoveSelectionCommand.cpp:50
> +    if (pos.anchorType() == Position::PositionIsOffsetInAnchor &&
selectionEnd.anchorType() == Position::PositionIsOffsetInAnchor

We need a less cumbersome way to write this check.

> Source/WebCore/editing/TypingCommand.cpp:493
> +	       setEndingSelection(VisibleSelection(positionAfterNode(table),
endingSelection().start(), DOWNSTREAM));

After node?


More information about the webkit-reviews mailing list