RESOLVED FIXED 69023
Remove direct reads to m_firstNodeInserted and m_lastLeafInserted in ReplaceSelectionCommand
https://bugs.webkit.org/show_bug.cgi?id=69023
Summary Remove direct reads to m_firstNodeInserted and m_lastLeafInserted in ReplaceS...
Ryosuke Niwa
Reported 2011-09-28 13:30:57 PDT
To resolve the bug 68874, we need to encapsulate all access to m_firstNodeInserted and m_lastLeafInserted except updates.
Attachments
Patch (23.39 KB, patch)
2011-09-28 13:42 PDT, Ryosuke Niwa
no flags
Ryosuke Niwa
Comment 1 2011-09-28 13:42:18 PDT
Ryosuke Niwa
Comment 2 2011-09-29 11:00:31 PDT
Any reviewers?
Enrica Casucci
Comment 3 2011-09-29 11:18:45 PDT
Comment on attachment 109066 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=109066&action=review Looks good to me. > Source/WebCore/editing/ReplaceSelectionCommand.cpp:1226 > + } I know the original code was already like this, but it would be nice to have methods to update m_firstNodeInserted and m_lastLeafInserted in a consistent way. It is a bit unclear when reading this code that, in the case of the trailing space there is no explicit update of m_lastLeafInserted, but there is an explicit updated of m_firstNodeInserted in case of the leading space. Only reading the comment above helps you understand.
Ryosuke Niwa
Comment 4 2011-09-29 11:27:21 PDT
(In reply to comment #3) > (From update of attachment 109066 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=109066&action=review > > Looks good to me. > > > Source/WebCore/editing/ReplaceSelectionCommand.cpp:1226 > > + } > > I know the original code was already like this, but it would be nice to have methods to update m_firstNodeInserted and m_lastLeafInserted in a consistent way. It is a bit unclear when reading this code that, in the case of the trailing space there is no explicit update of m_lastLeafInserted, but there is an explicit updated of m_firstNodeInserted in case of the leading space. Only reading the comment above helps you understand. Right. The next patch should be able to eliminate all of that.
WebKit Review Bot
Comment 5 2011-09-29 13:30:49 PDT
Comment on attachment 109066 [details] Patch Clearing flags on attachment: 109066 Committed r96353: <http://trac.webkit.org/changeset/96353>
WebKit Review Bot
Comment 6 2011-09-29 13:30:53 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.