[Webkit-unassigned] [Bug 61594] REGRESSION: Hitting enter in the middle of this span causes the cursor to go to the end of the span

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 21 18:32:53 PDT 2011


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


Ryosuke Niwa <rniwa at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #98094|review?                     |review-
               Flag|                            |




--- Comment #33 from Ryosuke Niwa <rniwa at webkit.org>  2011-06-21 18:32:52 PST ---
(From update of attachment 98094)
View in context: https://bugs.webkit.org/attachment.cgi?id=98094&action=review

> Source/WebCore/editing/CompositeEditCommand.cpp:1246
> +        // FIXME: startNode can be null if traverseNextNode returns null. What should it be set to in that case?

You should remove this comment now that you handle this case.

> Source/WebCore/editing/FormatBlockCommand.cpp:64
> +    RefPtr<Node> outerBlock = (start.deprecatedNode() == nodeToSplitTo) ? start.deprecatedNode() : splitTree(firstPositionInNode(start.deprecatedNode()), nodeToSplitTo);

We should really be cautious when we call firstPositionInNode because we really don't want to instantiate a position inside a br, hr, etc... So whenever there's a chance that a node can be one of those atomic/content-ignored node, we can't pass it to firstPositionInNode as it creates a new kind of position that doesn't have legacy editing quirks. r- because deprecatedNode can be one of those elements.

> Source/WebCore/editing/IndentOutdentCommand.cpp:106
> +    RefPtr<Node> outerBlock = (start.deprecatedNode() == nodeToSplitTo) ? start.deprecatedNode() : splitTree(firstPositionInNode(start.deprecatedNode()), nodeToSplitTo);

Ditto.

> Source/WebCore/editing/InsertListCommand.cpp:279
> +    // Insert a placeholder to avoid texts nodes of splitAt and the node before the placeholder won't get merged

Nit: avoid ~~ won't get merged.  Maybe it was my fault?

-- 
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