Changeset 121835 in webkit
- Timestamp:
- Jul 4, 2012 12:33:41 AM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r121830 r121835 1 2012-07-04 Christophe Dumez <christophe.dumez@intel.com> 2 3 [EFL][WK2] Ewk_View should report load errors 4 https://bugs.webkit.org/show_bug.cgi?id=90479 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 The Ewk_View now emits a "load,error" signal when the 9 main frame fails loading. Information about the error 10 is provided via the new Ewk_Web_Error type. 11 12 * PlatformEfl.cmake: 13 * UIProcess/API/efl/EWebKit2.h: 14 * UIProcess/API/efl/ewk_view.cpp: 15 (ewk_view_load_error): 16 * UIProcess/API/efl/ewk_view.h: 17 * UIProcess/API/efl/ewk_view_loader_client.cpp: 18 (didFailLoadWithErrorForFrame): 19 (ewk_view_loader_client_attach): 20 * UIProcess/API/efl/ewk_view_private.h: 21 * UIProcess/API/efl/ewk_web_error.cpp: Added. 22 (_Ewk_Web_Error): 23 (ewk_web_error_free): 24 (ewk_web_error_domain_get): 25 (ewk_web_error_url_get): 26 (ewk_web_error_code_get): 27 (ewk_web_error_description_get): 28 (ewk_web_error_cancellation_get): 29 (ewk_web_error_new): 30 * UIProcess/API/efl/ewk_web_error.h: Added. 31 * UIProcess/API/efl/ewk_web_error_private.h: Added. 32 1 33 2012-07-03 Christophe Dumez <christophe.dumez@intel.com> 2 34 -
trunk/Source/WebKit2/PlatformEfl.cmake
r121732 r121835 37 37 UIProcess/API/efl/ewk_view.cpp 38 38 UIProcess/API/efl/ewk_view_loader_client.cpp 39 UIProcess/API/efl/ewk_web_error.cpp 39 40 40 41 UIProcess/cairo/BackingStoreCairo.cpp -
trunk/Source/WebKit2/UIProcess/API/efl/EWebKit2.h
r121732 r121835 32 32 #include "ewk_intent_service.h" 33 33 #include "ewk_view.h" 34 #include "ewk_web_error.h" 34 35 35 36 #endif // EWebKit2_h -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
r121830 r121835 679 679 } 680 680 681 /** 682 * @internal 683 * Reports load failed with error information. 684 * 685 * Emits signal: "load,error" with pointer to Ewk_Web_Error. 686 */ 687 void ewk_view_load_error(Evas_Object* ewkView, const Ewk_Web_Error* error) 688 { 689 evas_object_smart_callback_call(ewkView, "load,error", const_cast<Ewk_Web_Error*>(error)); 690 } 691 692 681 693 #if ENABLE(WEB_INTENTS_TAG) 682 694 /** -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.h
r121830 r121835 29 29 * - "intent,request,new", Ewk_Intent_Request*: reports new Web intent request. 30 30 * - "intent,service,register", Ewk_Intent_Service*: reports new Web intent service registration. 31 * - "load,error", const Ewk_Web_Error*: reports main frame load failed. 31 32 * - "load,progress", double*: load progress has changed (value from 0.0 to 1.0). 32 33 * - "title,changed", const char*: title of the main frame was changed. -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp
r121830 r121835 33 33 #include "ewk_view_loader_client_private.h" 34 34 #include "ewk_view_private.h" 35 #include "ewk_web_error.h" 36 #include "ewk_web_error_private.h" 35 37 #include <wtf/text/CString.h> 36 38 … … 72 74 } 73 75 76 static void didFailLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, WKErrorRef error, WKTypeRef, const void *clientInfo) 77 { 78 if (!WKFrameIsMainFrame(frame)) 79 return; 80 81 Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo)); 82 Ewk_Web_Error* ewkError = ewk_web_error_new(error); 83 ewk_view_load_error(ewkView, ewkError); 84 ewk_web_error_free(ewkError); 85 } 86 74 87 void ewk_view_loader_client_attach(WKPageRef pageRef, Evas_Object* ewkView) 75 88 { … … 88 101 loadClient.didChangeProgress = didChangeProgress; 89 102 loadClient.didFinishProgress = didChangeProgress; 103 loadClient.didFailLoadWithErrorForFrame = didFailLoadWithErrorForFrame; 90 104 WKPageSetPageLoaderClient(pageRef, &loadClient); 91 105 } -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_view_private.h
r121830 r121835 31 31 } 32 32 33 typedef struct _Ewk_Web_Error Ewk_Web_Error; 33 34 #if ENABLE(WEB_INTENTS) 34 35 typedef struct _Ewk_Intent Ewk_Intent; … … 40 41 void ewk_view_display(Evas_Object* ewkView, const WebCore::IntRect& rect); 41 42 void ewk_view_image_data_set(Evas_Object* ewkView, void* imageData, const WebCore::IntSize& size); 43 void ewk_view_load_error(Evas_Object* ewkView, const Ewk_Web_Error* error); 42 44 void ewk_view_load_progress_changed(Evas_Object* ewkView, double progress); 43 45 void ewk_view_title_changed(Evas_Object* ewkView, const char* title);
Note: See TracChangeset
for help on using the changeset viewer.