This is a cleanup
Created attachment 79345 [details] cleanup
Created attachment 79347 [details] cleanup
Could someone review my patch?
Comment on attachment 79347 [details] cleanup 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?
Comment on attachment 79347 [details] cleanup View in context: https://bugs.webkit.org/attachment.cgi?id=79347&action=review >> 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? It won't be because we're inserting text at offset. So endPosition is basically the position immediately after the text we just inserted. >> 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. I totally agree but we can probably do that kind of cleanup after we're done with the first phase of cleanup.
Committed r76560: <http://trac.webkit.org/changeset/76560>