[Webkit-unassigned] [Bug 9736] -(void)init*Event missing in DOMKeyboardEvent and DOMWheelEvent
bugzilla-daemon at opendarwin.org
bugzilla-daemon at opendarwin.org
Wed Jul 5 01:48:18 PDT 2006
http://bugzilla.opendarwin.org/show_bug.cgi?id=9736
------- Comment #1 from jonas.witt at gmail.com 2006-07-05 01:48 PDT -------
Created an attachment (id=9202)
--> (http://bugzilla.opendarwin.org/attachment.cgi?id=9202&action=view)
initKeyboardEvent attempt
This is what I've got for the DOMKeyboardEvent so far.
However, I'm having a problem with WebKit that is likely related to this code.
I'm creating a DOMKeyboardEvent with [DOMDocument
createEvent:@"KeyboardEvent"], then I use the initializer from the patch with
the following values (from the XML my app reads):
<event>
<target domindex="0,1,0,5,2,0,0,1,1"/>
<property name="type" value="keypress"/>
<property name="class" value="KeyboardEvent"/>
<property name="bubbles" value="true"/>
<property name="cancelable" value="true"/>
<property name="detail" value="0"/>
<property name="ctrlKey" value="false"/>
<property name="shiftKey" value="false"/>
<property name="altKey" value="false"/>
<property name="metaKey" value="false"/>
<property name="keyIndentifier" value="U+000041"/>
<property name="keyLocation" value="0"/>
</event>
(For the abstract view argument, I pass NULL. Maybe that could be the
problem...)
Then I dispatch this event to a <input> field in my WebView. When I do this,
WebKit crashes:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000004
WebCore::FrameMac::doTextFieldCommandFromEvent (this=0x14a0cf20,
input=0x14a2ce10, event=0x0) at
/Users/jonas/Desktop/itCampus/WebKit/WebKitBuild/Release/JavaScriptCore.framework/PrivateHeaders/RefPtr.h:37
37 RefPtr(const RefPtr& o) : m_ptr(o.m_ptr) { if (T *ptr = m_ptr)
ptr->ref(); }
(gdb) bt
#0 WebCore::FrameMac::doTextFieldCommandFromEvent (this=0x14a0cf20,
input=0x14a2ce10, event=0x0) at
/Users/jonas/Desktop/itCampus/WebKit/WebKitBuild/Release/JavaScriptCore.framework/PrivateHeaders/RefPtr.h:37
#1 0x010d00a4 in WebCore::HTMLInputElement::defaultEventHandler
(this=0x14a2ce10, evt=0x14a52688) at
/Users/jonas/Desktop/itCampus/WebKit/WebCore/html/HTMLInputElement.cpp:1245
#2 0x0127a9d8 in WebCore::EventTargetNode::dispatchGenericEvent
(this=0x14a2ce10, e=@0x48, tempEvent=false) at
/Users/jonas/Desktop/itCampus/WebKit/WebCore/dom/EventTargetNode.cpp:255
#3 0x0127ae04 in WebCore::EventTargetNode::dispatchEvent (this=0x14a2ce10,
e=@0x48, ec=@0xbfffd35c, tempEvent=false) at
/Users/jonas/Desktop/itCampus/WebKit/WebCore/dom/EventTargetNode.cpp:290
#4 0x0113fb94 in -[DOMNode dispatchEvent:] (self=0x186e9600, _cmd=0x48,
event=0x186f4170) at
/Users/jonas/Desktop/itCampus/WebKit/WebCore/bindings/objc/DOM.mm:440
#5 0x90a431f4 in objc_msgSendv ()
#6 0x9293fce0 in -[NSInvocation invoke] ()
[...]
What's wrong with the initializer?
--
Configure bugmail: http://bugzilla.opendarwin.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