Title: [93572] trunk/Source/WebKit/efl
- Revision
- 93572
- Author
- [email protected]
- Date
- 2011-08-22 19:02:35 -0700 (Mon, 22 Aug 2011)
Log Message
[EFL] Implement FrameLoaderClient::dispatchDidClearWindowObjectInWorld
https://bugs.webkit.org/show_bug.cgi?id=66685
Patch by Raphael Kubo da Costa <[email protected]> on 2011-08-22
Reviewed by Kent Tamura.
Implement dispatchDidClearWindowObjectInWorld, as it is needed by
DumpRenderTree to, among other things, properly install the event
sender in the window object.
This implementation works by emitting a "window,object,cleared" signal
with a private struct containing the required information (context,
window object and frame).
* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::dispatchDidClearWindowObjectInWorld):
* WebCoreSupport/FrameLoaderClientEfl.h:
* ewk/ewk_private.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit/efl/ChangeLog (93571 => 93572)
--- trunk/Source/WebKit/efl/ChangeLog 2011-08-23 01:35:48 UTC (rev 93571)
+++ trunk/Source/WebKit/efl/ChangeLog 2011-08-23 02:02:35 UTC (rev 93572)
@@ -1,3 +1,23 @@
+2011-08-22 Raphael Kubo da Costa <[email protected]>
+
+ [EFL] Implement FrameLoaderClient::dispatchDidClearWindowObjectInWorld
+ https://bugs.webkit.org/show_bug.cgi?id=66685
+
+ Reviewed by Kent Tamura.
+
+ Implement dispatchDidClearWindowObjectInWorld, as it is needed by
+ DumpRenderTree to, among other things, properly install the event
+ sender in the window object.
+
+ This implementation works by emitting a "window,object,cleared" signal
+ with a private struct containing the required information (context,
+ window object and frame).
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::dispatchDidClearWindowObjectInWorld):
+ * WebCoreSupport/FrameLoaderClientEfl.h:
+ * ewk/ewk_private.h:
+
2011-08-20 Grzegorz Czajkowski <[email protected]>
[EFL] Fix and update doxygen documentation for ewk_view.
Modified: trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp (93571 => 93572)
--- trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp 2011-08-23 01:35:48 UTC (rev 93571)
+++ trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp 2011-08-23 02:02:35 UTC (rev 93572)
@@ -35,6 +35,7 @@
#include "config.h"
#include "FrameLoaderClientEfl.h"
+#include "APICast.h"
#include "DocumentLoader.h"
#include "EWebKit.h"
#include "FormState.h"
@@ -193,11 +194,6 @@
notImplemented();
}
-void FrameLoaderClientEfl::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*)
-{
- notImplemented();
-}
-
void FrameLoaderClientEfl::dispatchDidReceiveAuthenticationChallenge(DocumentLoader*, unsigned long identifier, const AuthenticationChallenge&)
{
notImplemented();
@@ -426,9 +422,24 @@
return String();
}
-void FrameLoaderClientEfl::windowObjectCleared()
+void FrameLoaderClientEfl::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* world)
{
- notImplemented();
+ if (world != mainThreadNormalWorld())
+ return;
+
+ Frame* coreFrame = ewk_frame_core_get(m_frame);
+ ASSERT(f);
+
+ Settings* settings = coreFrame->settings();
+ if (!settings || !settings->isJavaScriptEnabled())
+ return;
+
+ Ewk_Window_Object_Cleared_Event event;
+ event.context = toGlobalRef(coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec());
+ event.windowObject = toRef(coreFrame->script()->globalObject(mainThreadNormalWorld()));
+ event.frame = m_frame;
+
+ evas_object_smart_callback_call(m_view, "window,object,cleared", &event);
}
void FrameLoaderClientEfl::documentElementAvailable()
Modified: trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h (93571 => 93572)
--- trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h 2011-08-23 01:35:48 UTC (rev 93571)
+++ trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h 2011-08-23 02:02:35 UTC (rev 93572)
@@ -142,7 +142,6 @@
virtual void redirectDataToPlugin(Widget* pluginWidget);
virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const WTF::Vector<String>& paramNames, const WTF::Vector<String>& paramValues);
virtual String overrideMediaType() const;
- virtual void windowObjectCleared();
virtual void documentElementAvailable();
virtual void didPerformFirstNavigation() const;
Modified: trunk/Source/WebKit/efl/ewk/ewk_private.h (93571 => 93572)
--- trunk/Source/WebKit/efl/ewk/ewk_private.h 2011-08-23 01:35:48 UTC (rev 93571)
+++ trunk/Source/WebKit/efl/ewk/ewk_private.h 2011-08-23 02:02:35 UTC (rev 93572)
@@ -26,6 +26,7 @@
#ifndef ewk_private_h
#define ewk_private_h
+#include "APICast.h"
#include "BackForwardListImpl.h"
#include "EWebKit.h"
#include "Frame.h"
@@ -53,6 +54,12 @@
struct ContextMenuItem;
}
+struct Ewk_Window_Object_Cleared_Event {
+ JSContextRef context;
+ JSObjectRef windowObject;
+ Evas_Object* frame;
+};
+
void ewk_view_ready(Evas_Object *o);
void ewk_view_input_method_state_set(Evas_Object *o, Eina_Bool active);
void ewk_view_title_set(Evas_Object *o, const char *title);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes