[Webkit-unassigned] [Bug 18510] Text controls only emit the start editing signal after the first keypress
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat May 24 23:20:12 PDT 2008
http://bugs.webkit.org/show_bug.cgi?id=18510
darin at apple.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #20549|review? |review-
Flag| |
------- Comment #4 from darin at apple.com 2008-05-24 23:20 PDT -------
(From update of attachment 20549)
Thanks for tackling this!
The indentation of the code looks wrong, and part of the patch is only this
indentation change on some existing code.
+ HTMLInputElement* input =
static_cast<HTMLInputElement*>(shadowAncestor);
This cast is incorrect. As you can see above, the shadowAncestor might be a
HTMLTextAreaElement.
+
static_cast<RenderTextControl*>(shadowAncestor->renderer())->document()->frame()->textFieldDidBeginEditing(input);
Doing this without any null checks is almost certainly incorrect. It may be
possible for events to be dispatched in a document that no longer is in a
frame, for example. And the old code that's being replaced was doing the null
checks.
As with any WebKit bug fix, the patch needs to include a regression test that
demonstrates the problem. And a ChangeLog entry.
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list