Title: [105152] trunk/Source/WebKit/efl
Revision
105152
Author
[email protected]
Date
2012-01-17 07:02:37 -0800 (Tue, 17 Jan 2012)

Log Message

[EFL] Emit "resource,request,willsend" from ewk_view.
https://bugs.webkit.org/show_bug.cgi?id=76292

Reviewed by Andreas Kling.

Make ewk_view dispatch the "resource,request,willsend" signal as well,
so that it is possible to know whether the request is for the main
frame itself or for anything else.

* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::dispatchWillSendRequest):
* ewk/ewk_view.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/efl/ChangeLog (105151 => 105152)


--- trunk/Source/WebKit/efl/ChangeLog	2012-01-17 14:35:29 UTC (rev 105151)
+++ trunk/Source/WebKit/efl/ChangeLog	2012-01-17 15:02:37 UTC (rev 105152)
@@ -1,3 +1,18 @@
+2012-01-13  Raphael Kubo da Costa  <[email protected]>
+
+        [EFL] Emit "resource,request,willsend" from ewk_view.
+        https://bugs.webkit.org/show_bug.cgi?id=76292
+
+        Reviewed by Andreas Kling.
+
+        Make ewk_view dispatch the "resource,request,willsend" signal as well,
+        so that it is possible to know whether the request is for the main
+        frame itself or for anything else.
+
+        * WebCoreSupport/FrameLoaderClientEfl.cpp:
+        (WebCore::FrameLoaderClientEfl::dispatchWillSendRequest):
+        * ewk/ewk_view.h:
+
 2012-01-16  Ryuan Choi  <[email protected]>
 
         [EFL] Build fix when using pango as font backends.

Modified: trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp (105151 => 105152)


--- trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp	2012-01-17 14:35:29 UTC (rev 105151)
+++ trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp	2012-01-17 15:02:37 UTC (rev 105152)
@@ -172,6 +172,15 @@
 
     ewk_frame_request_will_send(m_frame, &request);
 
+    // We want to distinguish between a request for a document to be loaded into
+    // the main frame, a sub-frame, or the sub-objects in that document (via Chromium).
+    if (loader) {
+        const FrameLoader* frameLoader = loader->frameLoader();
+        const bool isMainFrameRequest = (loader == frameLoader->provisionalDocumentLoader() && frameLoader->isLoadingMainFrame());
+        if (isMainFrameRequest)
+            evas_object_smart_callback_call(m_view, "resource,request,willsend", &request);
+    }
+
     if (request.url != orig.url) {
         coreRequest.setURL(KURL(KURL(), request.url));
 

Modified: trunk/Source/WebKit/efl/ewk/ewk_view.h (105151 => 105152)


--- trunk/Source/WebKit/efl/ewk/ewk_view.h	2012-01-17 14:35:29 UTC (rev 105151)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.h	2012-01-17 15:02:37 UTC (rev 105152)
@@ -61,6 +61,7 @@
  *  - "mixedcontent,displayed", void: any of the containing frames has loaded and displayed mixed content.
  *  - "mixedcontent,run", void: any of the containing frames has loaded and run mixed content.
  *  - "ready", void: page is fully loaded.
+ *  - "resource,request,willsend", Ewk_Frame_Resource_Request*: the network request for the main frame will be sent.
  *  - "scrollbars,visible,get", Eina_Bool *: expects a @c EINA_TRUE if scrollbars
  *    are visible; @c EINA_FALSE, otherwise.
  *  - "scrollbars,visible,set", Eina_Bool: sets scrollbars visibility.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to