[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:26:26 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=61594
--- Comment #31 from Ryosuke Niwa <rniwa at webkit.org> 2011-06-21 18:26:26 PST ---
(From update of attachment 97678)
View in context: https://bugs.webkit.org/attachment.cgi?id=97678&action=review
>>>>> Source/WebCore/editing/FormatBlockCommand.cpp:64
>>>>> + RefPtr<Node> outerBlock = (start.deprecatedNode() == nodeToSplitTo) ? start.deprecatedNode() : splitTree(firstPositionInNode(start.deprecatedNode()), nodeToSplitTo);
>>>>
>>>> So you can't just pass start here? Also, you should probably call firstPositionInOrBeforeNode instead.
>>>
>>> Unfortunately, a lot of edge cases around top-level non-block elements fail here. For example, if the editable div contains only a <hr>, start.deprectatedNode() is the <hr> and start.containerNode() is the editable div. The ASSERT(start.containerNode() != end) fails, and if I take it out I end up with a crash later on.
>>>
>>> I'll try firstPositionInOrBeforeNode instead.
>>
>> I see. Okay. I suppose we can live with this code for now.
>
> It turns out that calling firstPositionInOrBeforeNode trips on the same edge cases that break when I pass the position into splitTree directly--the container node of the position ends up being the editable div instead of the <hr>, and I hit the assert and it crashes.
That makes me think that we should probably be instantiating a legacy editing position here.
--
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