[Webkit-unassigned] [Bug 30116] WebCore::InsertLineBreakCommand::shouldUseBreakElement ReadAV at NULL

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 7 02:35:18 PDT 2010


--- Comment #7 from Tony Chang (Google) <tony at chromium.org>  2010-06-07 02:35:17 PST ---
Ryosuke's analysis is correct.  The textarea is hidden in keydown, but we try to use the visible position when inserting the line break.  There is no visible position since the textarea is hidden, so we dereference a null pointer.

This patch just does a null pointer check on the visible position.

A few notes:
- This means that when the textarea is hidden, we don't insert the linebreak because we bail out early.
- This doesn't match what happens when you type any other character, which we can insert because it goes through a different code path that doesn't depend on visible positions.
- I tried to make this code not depend on visible positions (pretty straight forward), but then you get a different behavior if you have a selection or not.  Whenever there's a selection, we bail out in the selection.isNone() check.  To try to stay consistent with this behavior, I had us just bail out rather than trying to insert the line break.
- Firefox is able to insert the line break in this test case.

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