Changeset 119223 in webkit
- Timestamp:
- Jun 1, 2012 5:57:39 AM (12 years ago)
- Location:
- trunk/Source/WebKit/efl
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/efl/ChangeLog
r119208 r119223 1 2012-06-01 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> 2 3 [EFL] New signals in ewk_view to enable global history delegate functionality 4 https://bugs.webkit.org/show_bug.cgi?id=86343 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Global history delegate is an interface for WebKit clients to manage their own global history store. 9 The new ewk_view signals do the following: 10 1) report that a navigation happened within the view and give the navigation details. 11 2) report that view performed a client redirect and give source and destination uris. 12 3) report that view performed a server redirect and give source and destination uris. 13 14 * WebCoreSupport/FrameLoaderClientEfl.cpp: 15 (WebCore::FrameLoaderClientEfl::updateGlobalHistoryRedirectLinks): implementation added. 16 (WebCore::FrameLoaderClientEfl::updateGlobalHistory): implementation added. 17 * ewk/ewk_view.h: Added new signals and data types. 18 1 19 2012-06-01 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> 2 20 -
trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
r118329 r119223 506 506 void FrameLoaderClientEfl::updateGlobalHistoryRedirectLinks() 507 507 { 508 WebCore::Frame* frame = EWKPrivate::coreFrame(m_frame); 509 if (!frame) 510 return; 511 512 WebCore::DocumentLoader* loader = frame->loader()->documentLoader(); 513 if (!loader) 514 return; 515 516 if (!loader->clientRedirectSourceForHistory().isNull()) { 517 const CString& sourceURL = loader->clientRedirectSourceForHistory().utf8(); 518 const CString& destinationURL = loader->clientRedirectDestinationForHistory().utf8(); 519 Ewk_View_Redirection_Data data = { sourceURL.data(), destinationURL.data() }; 520 evas_object_smart_callback_call(m_view, "perform,client,redirect", &data); 521 } 522 523 if (!loader->serverRedirectSourceForHistory().isNull()) { 524 const CString& sourceURL = loader->serverRedirectSourceForHistory().utf8(); 525 const CString& destinationURL = loader->serverRedirectDestinationForHistory().utf8(); 526 Ewk_View_Redirection_Data data = { sourceURL.data(), destinationURL.data() }; 527 evas_object_smart_callback_call(m_view, "perform,server,redirect", &data); 528 } 508 529 } 509 530 … … 960 981 void FrameLoaderClientEfl::updateGlobalHistory() 961 982 { 962 notImplemented(); 983 WebCore::Frame* frame = EWKPrivate::coreFrame(m_frame); 984 if (!frame) 985 return; 986 987 WebCore::DocumentLoader* loader = frame->loader()->documentLoader(); 988 if (!loader) 989 return; 990 991 const FrameLoader* frameLoader = loader->frameLoader(); 992 const bool isMainFrameRequest = frameLoader && (loader == frameLoader->provisionalDocumentLoader()) && frameLoader->isLoadingMainFrame(); 993 const CString& urlForHistory = loader->urlForHistory().string().utf8(); 994 const CString& title = loader->title().string().utf8(); 995 const CString& firstParty = loader->request().firstPartyForCookies().string().utf8(); 996 const CString& clientRedirectSource = loader->clientRedirectSourceForHistory().utf8(); 997 const CString& originalURL = loader->originalURL().string().utf8(); 998 const CString& httpMethod = loader->request().httpMethod().utf8(); 999 const CString& responseURL = loader->responseURL().string().utf8(); 1000 const CString& mimeType = loader->response().mimeType().utf8(); 1001 1002 Ewk_Frame_Resource_Request request = { originalURL.data(), firstParty.data(), httpMethod.data(), 0, m_frame, isMainFrameRequest }; 1003 Ewk_Frame_Resource_Response response = { responseURL.data(), loader->response().httpStatusCode(), 0, mimeType.data() }; 1004 bool hasSubstituteData = loader->substituteData().isValid(); 1005 1006 Ewk_View_Navigation_Data data = { urlForHistory.data(), title.data(), &request, &response, hasSubstituteData, clientRedirectSource.data() }; 1007 1008 evas_object_smart_callback_call(m_view, "navigate,with,data", &data); 963 1009 } 964 1010 -
trunk/Source/WebKit/efl/ewk/ewk_view.h
r118729 r119223 72 72 * - "mixedcontent,displayed", void: any of the containing frames has loaded and displayed mixed content. 73 73 * - "mixedcontent,run", void: any of the containing frames has loaded and run mixed content. 74 * - "navigate,with,data", Ewk_View_Navigation_Data*: reports that view did navigation and gives the navigation details. 75 * - "perform,client,redirect", Ewk_View_Redirection_Data*: reports that view performed a client redirect and gives the redirection details. 76 * - "perform,server,redirect", Ewk_View_Redirection_Data*: reports that view performed a server redirect and gives the redirection details. 74 77 * - "protocolhandler,registration,requested", Ewk_Custom_Handler_Data: add a handler url for the given protocol. 75 78 * - "onload,event", Evas_Object*: a frame onload event has been received. … … 295 298 }; 296 299 300 /// Creates a type name for @a _Ewk_View_Navigation_Data. 301 typedef struct _Ewk_View_Navigation_Data Ewk_View_Navigation_Data; 302 303 /** 304 * @brief Structure containing details about a view navigation. 305 * 306 * Details of a view navigation. It is used in "navigate,with,data" signal. 307 */ 308 struct _Ewk_View_Navigation_Data { 309 const char *url; /**< URL for the history. */ 310 const char *title; /**< Title of the navigated page. */ 311 Ewk_Frame_Resource_Request *request; /**< Navigation request. */ 312 Ewk_Frame_Resource_Response *response; /**< Navigation response. */ 313 Eina_Bool has_substitute_data; /**< Data substitution flag. */ 314 const char *client_redirect_source; /**< Client redirect source URL. */ 315 }; 316 317 318 /// Creates a type name for @a _Ewk_View_Redirection_Data. 319 typedef struct _Ewk_View_Redirection_Data Ewk_View_Redirection_Data; 320 321 /** 322 * @brief Structure containing details about a view redirection. 323 * 324 * Details of a client or server redirection. It is used in "perform,client,redirect" and "perform,server,redirect" signals. 325 */ 326 struct _Ewk_View_Redirection_Data { 327 const char *source_url; /**< Redirect source URL. */ 328 const char *destination_url; /**< Redirect destination URL. */ 329 }; 297 330 /// Creates a type name for @a _Ewk_Scroll_Request. 298 331 typedef struct _Ewk_Scroll_Request Ewk_Scroll_Request;
Note: See TracChangeset
for help on using the changeset viewer.