[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 7 20:47:32 PDT 2011


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





--- Comment #17 from Ryosuke Niwa <rniwa at webkit.org>  2011-06-07 20:47:32 PST ---
(From update of attachment 96368)
View in context: https://bugs.webkit.org/attachment.cgi?id=96368&action=review

> Source/WebCore/editing/CompositeEditCommand.cpp:1246
> +        if (start.offsetInContainerNode() == caretMaxOffset(start.containerNode()))

should be >= instead of ==.

> Source/WebCore/editing/CompositeEditCommand.h:40
> +enum AncestorSplitPolicy { DoNotSplit, Split };

I'm not sure if 'policy' is a good noun here.  Maybe rule?  I'd also declare it inside CompositeEditCommand to avoid polluting WebCore namespace.  And I'd name values DoNotSplitEnd and SplitEnd.

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

You shouldn't be calling deprecatedNode here.

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

Ditto.

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