Changeset 61706 in webkit
- Timestamp:
- Jun 23, 2010 12:39:54 PM (14 years ago)
- Location:
- trunk/WebKit
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/CMakeListsEfl.txt
r60454 r61706 40 40 efl/ewk/ewk_view.cpp 41 41 efl/ewk/ewk_view_single.c 42 efl/ewk/ewk_window_features.cpp 42 43 ) 43 44 -
trunk/WebKit/ChangeLog
r61456 r61706 1 2010-06-23 Lucas De Marchi <lucas.demarchi@profusion.mobi> 2 3 Reviewed by Gustavo Noronha Silva. 4 5 Add implementaion of new windows for EFL port. Both cases of a link 6 with target="_blank" and a javascript that does window.open() are 7 treated, delegating to browser the role of actually creating the 8 window (or blocking it). 9 https://bugs.webkit.org/show_bug.cgi?id=40930 10 11 * CMakeListsEfl.txt: add new file that wraps the WindowFeatures struct 12 * efl/WebCoreSupport/ChromeClientEfl.cpp: 13 (WebCore::ChromeClientEfl::createWindow): implement method for 14 creating new window by delegating to browser its creation. Browser 15 might decide to continue on the same window by returning the same 16 view object. 17 * efl/WebCoreSupport/FrameLoaderClientEfl.cpp: 18 (WebCore::FrameLoaderClientEfl::dispatchCreatePage): implement method 19 for creating new window when its creation is done by a javascript 20 script. 21 * efl/ewk/EWebKit.h: new header for WindowFeatures. 22 * efl/ewk/ewk_private.h: 23 * efl/ewk/ewk_view.cpp: 24 (ewk_view_window_create): call the method implemented by browser. 25 * efl/ewk/ewk_view.h: 26 * efl/ewk/ewk_window_features.cpp: Added. 27 (ewk_window_features_unref): 28 (ewk_window_features_ref): 29 (ewk_window_features_bool_property_get): 30 (ewk_window_features_int_property_get): 31 (ewk_window_features_new_from_core): create and wrapped struct 32 containing the core struct. 33 * efl/ewk/ewk_window_features.h: Added. 34 1 35 2010-06-18 Anders Carlsson <andersca@apple.com> 2 36 -
trunk/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
r61331 r61706 118 118 } 119 119 120 Page* ChromeClientEfl::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures& features) 121 { 122 notImplemented(); 123 return 0; 120 Page* ChromeClientEfl::createWindow(Frame*, const FrameLoadRequest& frameLoadRequest, const WindowFeatures& features) 121 { 122 Evas_Object* newView = ewk_view_window_create(m_view, EINA_TRUE, &features); 123 if (!newView) 124 return 0; 125 126 if (!frameLoadRequest.isEmpty()) 127 ewk_view_uri_set(newView, frameLoadRequest.resourceRequest().url().string().utf8().data()); 128 129 return ewk_view_core_page_get(newView); 124 130 } 125 131 -
trunk/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
r58106 r61706 817 817 Frame* FrameLoaderClientEfl::dispatchCreatePage() 818 818 { 819 notImplemented(); 820 return 0; 819 if (!m_view) 820 return 0; 821 822 Evas_Object* newView = ewk_view_window_create(m_view, EINA_FALSE, 0); 823 Evas_Object* mainFrame; 824 if (!newView) 825 mainFrame = m_frame; 826 else 827 mainFrame = ewk_view_frame_main_get(newView); 828 829 return ewk_frame_core_get(mainFrame); 821 830 } 822 831 -
trunk/WebKit/efl/ewk/EWebKit.h
r60454 r61706 30 30 #include "ewk_settings.h" 31 31 #include "ewk_view.h" 32 #include "ewk_window_features.h" 32 33 33 34 #include <Evas.h> -
trunk/WebKit/efl/ewk/ewk_private.h
r60454 r61706 57 57 void ewk_view_load_error(Evas_Object *o, const Ewk_Frame_Load_Error *error); 58 58 void ewk_view_load_progress_changed(Evas_Object *o); 59 Evas_Object *ewk_view_window_create(Evas_Object *o, Eina_Bool javascript, const WebCore::WindowFeatures* coreFeatures); 59 60 60 61 void ewk_view_mouse_link_hover_in(Evas_Object *o, void *data); … … 103 104 void ewk_context_menu_show(Ewk_Context_Menu *o); 104 105 106 Ewk_Window_Features *ewk_window_features_new_from_core(const WebCore::WindowFeatures* core); 107 105 108 Evas_Object *ewk_frame_add(Evas *e); 106 109 Eina_Bool ewk_frame_init(Evas_Object *o, Evas_Object *view, WebCore::Frame *frame); -
trunk/WebKit/efl/ewk/ewk_view.cpp
r60454 r61706 3151 3151 * @internal 3152 3152 * Delegates to browser the creation of a new window. If it is not implemented, 3153 * current view is returned, so navigation might continue in same window. 3153 * current view is returned, so navigation might continue in same window. If 3154 * browser supports the creation of new windows, a new Ewk_Window_Features is 3155 * created and passed to browser. If it intends to keep the request for opening 3156 * the window later it must increments the Ewk_Winwdow_Features ref count by 3157 * calling ewk_window_features_ref(window_features). Otherwise this struct will 3158 * be freed after returning to this function. 3154 3159 * 3155 3160 * @param o Current view. 3161 * @param javascript @c EINA_TRUE if the new window is originated from javascript, 3162 * @c EINA_FALSE otherwise 3163 * @param window_features Features of the new window being created. If it's @c 3164 * NULL, it will be created a window with default features. 3156 3165 * 3157 3166 * @return New view, in case smart class implements the creation of new windows; 3158 3167 * else, current view @param o. 3159 */ 3160 Evas_Object* ewk_view_window_create(Evas_Object* o) 3168 * 3169 * @see ewk_window_features_ref(). 3170 */ 3171 Evas_Object* ewk_view_window_create(Evas_Object* o, Eina_Bool javascript, const WebCore::WindowFeatures* coreFeatures) 3161 3172 { 3162 3173 EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); … … 3165 3176 return o; 3166 3177 3167 return sd->api->window_create(sd); 3178 Ewk_Window_Features* window_features = ewk_window_features_new_from_core(coreFeatures); 3179 Evas_Object* view = sd->api->window_create(sd, javascript, window_features); 3180 ewk_window_features_unref(window_features); 3181 3182 return view; 3168 3183 } 3169 3184 -
trunk/WebKit/efl/ewk/ewk_view.h
r60454 r61706 22 22 #define ewk_view_h 23 23 24 #include "ewk_history.h" 25 #include "ewk_window_features.h" 26 24 27 #include <Evas.h> 25 28 #include <cairo.h> 26 #include <ewk_history.h>27 29 28 30 #ifdef __cplusplus … … 96 98 unsigned long version; 97 99 98 Evas_Object *(*window_create)(Ewk_View_Smart_Data *sd ); /**< creates a new window, requested by webkit */100 Evas_Object *(*window_create)(Ewk_View_Smart_Data *sd, Eina_Bool javascript, const Ewk_Window_Features *window_features); /**< creates a new window, requested by webkit */ 99 101 // hooks to allow different backing stores 100 102 Evas_Object *(*backing_store_add)(Ewk_View_Smart_Data *sd); /**< must be defined */
Note: See TracChangeset
for help on using the changeset viewer.