Title: [117720] trunk/Source/WebKit/efl
Revision
117720
Author
[email protected]
Date
2012-05-20 18:25:04 -0700 (Sun, 20 May 2012)

Log Message

[EFL] ewk_view navigation_policy_decision() input parameters should be extended
https://bugs.webkit.org/show_bug.cgi?id=85048

Patch by Mikhail Pozdnyakov <[email protected]> on 2012-05-20
Reviewed by Antonio Gomes.

Introduced new enum Ewk_Navigation_Type cloning WebCore::NavigationType.
Extended ewk_view navigation_policy_decision() input parameters with new
navigationType parameter. This paramater gives more data for making a
navigation policy decision and also provides dumping necessary for many Layout
testcases.

* WebCoreSupport/AssertMatchingEnums.cpp:
* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::dispatchDecidePolicyForNavigationAction):
* ewk/ewk_frame.h:
* ewk/ewk_view_private.h:
* ewk/ewk_view.cpp:
(_Ewk_View_Private_Data):
(ewk_view_navigation_policy_decision):
* ewk/ewk_view.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/efl/ChangeLog (117719 => 117720)


--- trunk/Source/WebKit/efl/ChangeLog	2012-05-21 01:01:25 UTC (rev 117719)
+++ trunk/Source/WebKit/efl/ChangeLog	2012-05-21 01:25:04 UTC (rev 117720)
@@ -1,3 +1,26 @@
+2012-05-20  Mikhail Pozdnyakov  <[email protected]>
+
+        [EFL] ewk_view navigation_policy_decision() input parameters should be extended
+        https://bugs.webkit.org/show_bug.cgi?id=85048
+
+        Reviewed by Antonio Gomes.
+
+        Introduced new enum Ewk_Navigation_Type cloning WebCore::NavigationType.
+        Extended ewk_view navigation_policy_decision() input parameters with new
+        navigationType parameter. This paramater gives more data for making a
+        navigation policy decision and also provides dumping necessary for many Layout
+        testcases.
+
+        * WebCoreSupport/AssertMatchingEnums.cpp:
+        * WebCoreSupport/FrameLoaderClientEfl.cpp:
+        (WebCore::FrameLoaderClientEfl::dispatchDecidePolicyForNavigationAction):
+        * ewk/ewk_frame.h:
+        * ewk/ewk_view_private.h:
+        * ewk/ewk_view.cpp:
+        (_Ewk_View_Private_Data):
+        (ewk_view_navigation_policy_decision):
+        * ewk/ewk_view.h:
+
 2012-05-18  Raphael Kubo da Costa  <[email protected]>
 
         [EFL][DRT] Make it possible to enable CSS Grid Layout.

Modified: trunk/Source/WebKit/efl/WebCoreSupport/AssertMatchingEnums.cpp (117719 => 117720)


--- trunk/Source/WebKit/efl/WebCoreSupport/AssertMatchingEnums.cpp	2012-05-21 01:01:25 UTC (rev 117719)
+++ trunk/Source/WebKit/efl/WebCoreSupport/AssertMatchingEnums.cpp	2012-05-21 01:25:04 UTC (rev 117720)
@@ -24,6 +24,7 @@
 #include "config.h"
 
 #include "ContextMenuItem.h"
+#include "FrameLoaderTypes.h"
 #include "Page.h"
 #include "VisibleSelection.h"
 #include "ewk_contextmenu.h"
@@ -50,6 +51,13 @@
 COMPILE_ASSERT_MATCHING_ENUM(EWK_TEXT_SELECTION_CARET, VisibleSelection::CaretSelection);
 COMPILE_ASSERT_MATCHING_ENUM(EWK_TEXT_SELECTION_RANGE, VisibleSelection::RangeSelection);
 
+COMPILE_ASSERT_MATCHING_ENUM(EWK_NAVIGATION_TYPE_LINK_CLICKED, NavigationTypeLinkClicked);
+COMPILE_ASSERT_MATCHING_ENUM(EWK_NAVIGATION_TYPE_FORM_SUBMITTED, NavigationTypeFormSubmitted);
+COMPILE_ASSERT_MATCHING_ENUM(EWK_NAVIGATION_TYPE_BACK_FORWARD, NavigationTypeBackForward);
+COMPILE_ASSERT_MATCHING_ENUM(EWK_NAVIGATION_TYPE_RELOAD, NavigationTypeReload);
+COMPILE_ASSERT_MATCHING_ENUM(EWK_NAVIGATION_TYPE_FORM_RESUBMITTED, NavigationTypeFormResubmitted);
+COMPILE_ASSERT_MATCHING_ENUM(EWK_NAVIGATION_TYPE_OTHER, NavigationTypeOther);
+
 #if ENABLE(TOUCH_EVENTS)
 COMPILE_ASSERT_MATCHING_ENUM(EWK_TOUCH_POINT_RELEASED, PlatformTouchPoint::TouchReleased);
 COMPILE_ASSERT_MATCHING_ENUM(EWK_TOUCH_POINT_PRESSED, PlatformTouchPoint::TouchPressed);

Modified: trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp (117719 => 117720)


--- trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp	2012-05-21 01:01:25 UTC (rev 117719)
+++ trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp	2012-05-21 01:25:04 UTC (rev 117720)
@@ -334,7 +334,7 @@
     CString firstParty = resourceRequest.firstPartyForCookies().string().utf8();
     CString httpMethod = resourceRequest.httpMethod().utf8();
     Ewk_Frame_Resource_Request request = { url.data(), firstParty.data(), httpMethod.data(), 0, m_frame, false };
-    bool ret = ewk_view_navigation_policy_decision(m_view, &request);
+    bool ret = ewk_view_navigation_policy_decision(m_view, &request, static_cast<Ewk_Navigation_Type>(action.type()));
 
     PolicyAction policy;
     if (!ret)

Modified: trunk/Source/WebKit/efl/ewk/ewk_frame.h (117719 => 117720)


--- trunk/Source/WebKit/efl/ewk/ewk_frame.h	2012-05-21 01:01:25 UTC (rev 117719)
+++ trunk/Source/WebKit/efl/ewk/ewk_frame.h	2012-05-21 01:25:04 UTC (rev 117720)
@@ -176,6 +176,16 @@
     EWK_HIT_TEST_RESULT_CONTEXT_EDITABLE = 1 << 6
 } Ewk_Hit_Test_Result_Context;
 
+/// Enum containing navigation types
+typedef enum  {
+    EWK_NAVIGATION_TYPE_LINK_CLICKED,
+    EWK_NAVIGATION_TYPE_FORM_SUBMITTED,
+    EWK_NAVIGATION_TYPE_BACK_FORWARD,
+    EWK_NAVIGATION_TYPE_RELOAD,
+    EWK_NAVIGATION_TYPE_FORM_RESUBMITTED,
+    EWK_NAVIGATION_TYPE_OTHER
+} Ewk_Navigation_Type;
+
 /// Creates a type name for _Ewk_Hit_Test.
 typedef struct _Ewk_Hit_Test Ewk_Hit_Test;
 /// Structure used to report hit test result.

Modified: trunk/Source/WebKit/efl/ewk/ewk_view.cpp (117719 => 117720)


--- trunk/Source/WebKit/efl/ewk/ewk_view.cpp	2012-05-21 01:01:25 UTC (rev 117719)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.cpp	2012-05-21 01:25:04 UTC (rev 117720)
@@ -3994,8 +3994,9 @@
  *
  * @param ewkView View to load
  * @param request Request which contain url to navigate
+ * @param navigationType navigation type
  */
-bool ewk_view_navigation_policy_decision(Evas_Object* ewkView, Ewk_Frame_Resource_Request* request)
+bool ewk_view_navigation_policy_decision(Evas_Object* ewkView, Ewk_Frame_Resource_Request* request, Ewk_Navigation_Type navigationType)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, true);
     EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->api, true);
@@ -4003,7 +4004,7 @@
     if (!smartData->api->navigation_policy_decision)
         return true;
 
-    return smartData->api->navigation_policy_decision(smartData, request);
+    return smartData->api->navigation_policy_decision(smartData, request, navigationType);
 }
 
 Eina_Bool ewk_view_js_object_add(Evas_Object* ewkView, Ewk_JS_Object* object, const char* objectName)

Modified: trunk/Source/WebKit/efl/ewk/ewk_view.h (117719 => 117720)


--- trunk/Source/WebKit/efl/ewk/ewk_view.h	2012-05-21 01:01:25 UTC (rev 117719)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.h	2012-05-21 01:25:04 UTC (rev 117720)
@@ -179,7 +179,7 @@
 
     Eina_Bool (*run_open_panel)(Ewk_View_Smart_Data *sd, Evas_Object *frame, Eina_Bool allows_multiple_files, Eina_List *accept_types, Eina_List **selected_filenames);
 
-    Eina_Bool (*navigation_policy_decision)(Ewk_View_Smart_Data *sd, Ewk_Frame_Resource_Request *request);
+    Eina_Bool (*navigation_policy_decision)(Ewk_View_Smart_Data *sd, Ewk_Frame_Resource_Request *request, Ewk_Navigation_Type navigation_type);
     Eina_Bool (*focus_can_cycle)(Ewk_View_Smart_Data *sd, Ewk_Focus_Direction direction);
 };
 

Modified: trunk/Source/WebKit/efl/ewk/ewk_view_private.h (117719 => 117720)


--- trunk/Source/WebKit/efl/ewk/ewk_view_private.h	2012-05-21 01:01:25 UTC (rev 117719)
+++ trunk/Source/WebKit/efl/ewk/ewk_view_private.h	2012-05-21 01:25:04 UTC (rev 117720)
@@ -135,7 +135,7 @@
 
 void ewk_view_layout_if_needed_recursive(Ewk_View_Private_Data* priv);
 
-bool ewk_view_navigation_policy_decision(Evas_Object* ewkView, Ewk_Frame_Resource_Request* request);
+bool ewk_view_navigation_policy_decision(Evas_Object* ewkView, Ewk_Frame_Resource_Request* request, Ewk_Navigation_Type navigationType);
 
 void ewk_view_contents_size_changed(Evas_Object* ewkView, Evas_Coord width, Evas_Coord height);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to