[Webkit-unassigned] [Bug 71207] An extra line break is inserted when pasting into a font element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 22 15:04:19 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=71207





--- Comment #5 from yi shen <yi.4.shen at nokia.com>  2012-03-22 15:04:19 PST ---
Thanks for the reviewing.
(In reply to comment #4)
> (From update of attachment 133329 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=133329&action=review
> 
> > Source/WebCore/editing/ReplaceSelectionCommand.cpp:116
> > +static Position nextPositionInContainerNode(Position pos)
> 
> Please don't use abbreviations like pos.
Will fix it.
> 
> > Source/WebCore/editing/ReplaceSelectionCommand.cpp:120
> > +    Node* n = pos.deprecatedNode();    
> 
> You should use pos.containerNode(). Also please don't use one-letter variable like n.
Will fix it.
> 
> > Source/WebCore/editing/ReplaceSelectionCommand.cpp:125
> > +    return createLegacyEditingPosition(parent, n->nodeIndex() + 1);
> 
> Why do we always want to move up in the node hierarchy? If we had a bunch of siblings after pos's container node, then we'll still want to skip those. r- because I don't think this is a correct fix.

The insertion position only move up if the visible positions of the current position and the high level node's position are the same. So, if we had a bunch of siblings after pos's container node, they won't get skipped because of the difference visible positions.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list