[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
Fri Jun 3 19:10:32 PDT 2011


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





--- Comment #5 from Annie Sullivan <sullivan at chromium.org>  2011-06-03 19:10:32 PST ---
Some notes about this patch:

I wasn't sure whether to implement a new splitTreeToPosition method, or modify splitTreeToNode to take either. Please let me know what you think.

splitTreeToPosition currently doesn't handle splitting nodes if the position is not at the start or end of the node. Currently InsertParagraphSeparatorCommand is the only caller, and it never creates a case like that because it splits text nodes before calling splitTreeTo(Node|Position). I worry that callers may expect the method to split a node if the position is in the middle, but I don't want to add code that's not used or tested. What do you think? If you think I should add the code, I could try to use window.internal to add a test for it.

I was pretty surprised at the results for the layout test when the cursor is at the start of the text node. It turns out that this is handled by a different codepath in InsertParagraphSeparatorCommand. I get the same results in Safari 5. The reason that the id is duplicated for the span "wrapper" is that InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock() doesn't avoid duplicating ids, as SplitElementCommand::executeApply() does. Should I file a separate bug/write a separate patch for that?

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