Commit 9aaa6b4d authored by xan@webkit.org's avatar xan@webkit.org

2010-08-17 Xan Lopez <xlopez@igalia.com>

        Reviewed by Gustavo Noronha.

        [GTK] Fix wrapping of core Events in the bindings
        https://bugs.webkit.org/show_bug.cgi?id=44095

        Return the proper GObject type instead of hardcoding
        WebKitDOMEvent for all Event types.

        * bindings/gobject/GObjectEventListener.cpp:
        (WebCore::GObjectEventListener::handleEvent):
        * bindings/gobject/WebKitDOMBinding.cpp:
        (WebKit::kit):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1b9757f3
2010-08-17 Xan Lopez <xlopez@igalia.com>
Reviewed by Gustavo Noronha.
[GTK] Fix wrapping of core Events in the bindings
https://bugs.webkit.org/show_bug.cgi?id=44095
Return the proper GObject type instead of hardcoding
WebKitDOMEvent for all Event types.
* bindings/gobject/GObjectEventListener.cpp:
(WebCore::GObjectEventListener::handleEvent):
* bindings/gobject/WebKitDOMBinding.cpp:
(WebKit::kit):
2010-08-17 Xan Lopez <xlopez@igalia.com>
Reviewed by Gustavo Noronha.
......@@ -21,6 +21,7 @@
#include "Event.h"
#include "EventListener.h"
#include "webkit/WebKitDOMEvent.h"
#include "webkit/WebKitDOMEventPrivate.h"
#include <wtf/HashMap.h>
#include <wtf/text/CString.h>
......@@ -30,7 +31,7 @@ namespace WebCore {
void GObjectEventListener::handleEvent(ScriptExecutionContext*, Event* event)
{
gboolean handled = FALSE;
WebKitDOMEvent* gobjectEvent = WebKit::wrapEvent(event);
WebKitDOMEvent* gobjectEvent = WEBKIT_DOM_EVENT(WebKit::kit(event));
g_signal_emit_by_name(m_object, m_signalName.utf8().data(), gobjectEvent, &handled);
}
......
......@@ -32,6 +32,7 @@
#include "UIEvent.h"
#include "WebKitDOMDOMWindowPrivate.h"
#include "WebKitDOMElementPrivate.h"
#include "WebKitDOMEventPrivate.h"
#include "WebKitDOMNode.h"
#include "WebKitDOMNodePrivate.h"
#include "WebKitHTMLElementWrapperFactory.h"
......@@ -140,7 +141,7 @@ gpointer kit(Event* event)
else if (event->isUIEvent())
wrappedEvent = wrapUIEvent(static_cast<UIEvent*>(event));
else
wrappedEvent = 0;
wrappedEvent = wrapEvent(event);
return DOMObjectCache::put(event, wrappedEvent);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment