[Webkit-unassigned] [Bug 74585] Crash when navigating with arrow key into empty anchor block with padding

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Dec 31 05:26:26 PST 2011


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





--- Comment #18 from Daniel Jalkut <jalkut at red-sweater.com>  2011-12-31 05:26:26 PST ---
(In reply to comment #17)
> Okay. Thanks for the clarification. I think we need to deal it around line 677 and add a similar bail out as line 706: return VisiblePosition(pos, DOWNSTREAM);.
> 
> Also, I'd like to see a test case where we have some contents after the anchor. I bet your current patch won't work as expected in such case.

Can you give me some advice for how I could test the box and its children for this situation? Should it literally look for a "no leaf children" situation or is there a higher-level test of the found root that makes more sense? I'm still very shaky on the box classes and only know a little from poking around at this bug.

I will amend the test case to have content on the bottom, too. I actually tested this manually to make sure that up-arrowing (which also crashed) is fixed as well. In the scenario where there is content on the other side of the anchor (another line), my patch does still prevent the crash, and the selection ends up at the end of the anchor line, where further arrowing will continue moving the cursor to the good line of content that follows.

Sample source for this which I will be incorporating into the test case:

<div contentEditable="true">
Click to place the editing cursor anywhere on this line ... then click the down arrow.<br />
<a style="background-color:red; padding-left:200px;"></a><br />
Or click here, then click the up arrow.
</div>

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