Changeset 95983 in webkit
- Timestamp:
- Sep 26, 2011 12:58:24 PM (13 years ago)
- Location:
- trunk/Source/WebKit/efl
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/efl/ChangeLog
r95919 r95983 1 2011-09-26 Lucas De Marchi <lucas.demarchi@profusion.mobi> 2 3 [EFL] Add virtual method to notify user when wrapping focus 4 https://bugs.webkit.org/show_bug.cgi?id=68699 5 6 Reviewed by Antonio Gomes. 7 8 Add a virtual method to ewk_view, so the Chrome gets notified if we 9 finished focusing all the items and would start over. This way the 10 browser can decide to handle the subsequent focus changes among its 11 widgets. 12 13 * WebCoreSupport/ChromeClientEfl.cpp: call ewk_view's virtual method to 14 give it a chance to grab focus 15 (WebCore::ChromeClientEfl::canTakeFocus): 16 * ewk/ewk_private.h: 17 * ewk/ewk_view.cpp: add virtual method 18 (ewk_view_focus_can_cycle): 19 * ewk/ewk_view.h: add focus direction enum and virtual method 20 1 21 2011-09-24 Adam Barth <abarth@webkit.org> 2 22 -
trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
r95919 r95983 237 237 } 238 238 239 bool ChromeClientEfl::canTakeFocus(FocusDirection )239 bool ChromeClientEfl::canTakeFocus(FocusDirection coreDirection) 240 240 { 241 241 // This is called when cycling through links/focusable objects and we 242 242 // reach the last focusable object. 243 return false; 243 ASSERT(coreDirection == FocusDirectionForward || coreDirection == FocusDirectionBackward); 244 245 Ewk_Focus_Direction direction = static_cast<Ewk_Focus_Direction>(coreDirection); 246 247 return !ewk_view_focus_can_cycle(m_view, direction); 244 248 } 245 249 -
trunk/Source/WebKit/efl/ewk/ewk_private.h
r95901 r95983 140 140 void ewk_view_editor_client_selection_changed(Evas_Object* o); 141 141 142 bool ewk_view_focus_can_cycle(Evas_Object *o, Ewk_Focus_Direction direction); 143 142 144 #if ENABLE(NETSCAPE_PLUGIN_API) 143 145 void ewk_view_js_window_object_clear(Evas_Object* o, Evas_Object* frame); -
trunk/Source/WebKit/efl/ewk/ewk_view.cpp
r95901 r95983 3108 3108 } 3109 3109 3110 bool ewk_view_focus_can_cycle(Evas_Object* o, Ewk_Focus_Direction direction) 3111 { 3112 DBG("o=%p direction=%d", o, direction); 3113 EWK_VIEW_SD_GET_OR_RETURN(o, sd, false); 3114 EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api, false); 3115 3116 if (!sd->api->focus_can_cycle) 3117 return false; 3118 3119 return sd->api->focus_can_cycle(sd, direction); 3120 } 3121 3110 3122 void ewk_view_run_javascript_alert(Evas_Object* o, Evas_Object* frame, const char* message) 3111 3123 { -
trunk/Source/WebKit/efl/ewk/ewk_view.h
r95901 r95983 105 105 /// Creates a type name for @a _Ewk_View_Smart_Class. 106 106 typedef struct _Ewk_View_Smart_Class Ewk_View_Smart_Class; 107 108 // Defines the direction of focus change. Keep in sync with 109 // WebCore::FocusDirection. 110 enum _Ewk_Focus_Direction { 111 EWK_FOCUS_DIRECTION_FORWARD = 1, 112 EWK_FOCUS_DIRECTION_BACKWARD, 113 }; 114 typedef enum _Ewk_Focus_Direction Ewk_Focus_Direction; 115 107 116 /// Ewk view's class, to be overridden by sub-classes. 108 117 struct _Ewk_View_Smart_Class { … … 150 159 151 160 Eina_Bool (*navigation_policy_decision)(Ewk_View_Smart_Data *sd, Ewk_Frame_Resource_Request *request); 161 Eina_Bool (*focus_can_cycle)(Ewk_View_Smart_Data *sd, Ewk_Focus_Direction direction); 152 162 }; 153 163 … … 156 166 * in the @a Ewk_View_Smart_Class structure. 157 167 */ 158 #define EWK_VIEW_SMART_CLASS_VERSION 1UL168 #define EWK_VIEW_SMART_CLASS_VERSION 2UL 159 169 160 170 /** … … 168 178 * @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION 169 179 */ 170 #define EWK_VIEW_SMART_CLASS_INIT(smart_class_init) {smart_class_init, EWK_VIEW_SMART_CLASS_VERSION, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }180 #define EWK_VIEW_SMART_CLASS_INIT(smart_class_init) {smart_class_init, EWK_VIEW_SMART_CLASS_VERSION, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} 171 181 172 182 /**
Note: See TracChangeset
for help on using the changeset viewer.