Changeset 99155 in webkit
- Timestamp:
- Nov 3, 2011 2:56:33 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r98793 r99155 1 2011-11-03 Dongwoo Im <dw.im@samsung.com> 2 3 [EFL] Enable the Page Visibility API. 4 https://bugs.webkit.org/show_bug.cgi?id=69127 5 6 Reviewed by Adam Barth. 7 8 Build system changes to support ENABLE(PAGE_VISIBILITY_API) on EFL port. 9 10 * Source/cmake/OptionsEfl.cmake: Add enabled ENABLE_PAGE_VISIBILITY_API definition. 11 * Source/cmakeconfig.h.cmake: ditto. 12 1 13 2011-10-28 Adam Barth <abarth@webkit.org> 2 14 -
trunk/LayoutTests/ChangeLog
r99153 r99155 1 2011-11-03 Dongwoo Im <dw.im@samsung.com> 2 3 [EFL] Enable the Page Visibility API. 4 https://bugs.webkit.org/show_bug.cgi?id=69127 5 6 Reviewed by Adam Barth. 7 8 * platform/efl/Skipped: Unskip all of the test cases of page visibility. 9 1 10 2011-11-03 Andrey Kosyakov <caseq@chromium.org> 2 11 -
trunk/LayoutTests/platform/efl/Skipped
r98867 r99155 1081 1081 webarchive 1082 1082 1083 # The EFL port has no support for the Page Visibility API1084 fast/events/page-visibility-iframe-delete-test.html1085 fast/events/page-visibility-iframe-move-test.html1086 fast/events/page-visibility-iframe-propagation-test.html1087 fast/events/page-visibility-transition-test.html1088 1089 1083 # The EFL port has no support for webtiming 1090 1084 fast/dom/Window/window-properties-performance.html -
trunk/Source/WebKit/efl/ChangeLog
r99096 r99155 1 2011-11-03 Dongwoo Im <dw.im@samsung.com> 2 3 [EFL] Enable the Page Visibility API. 4 https://bugs.webkit.org/show_bug.cgi?id=69127 5 6 Reviewed by Adam Barth. 7 8 Implement methods to enable the Page Visibility API on EFL port. 9 (http://www.w3.org/TR/page-visibility) 10 11 When the visibility status of the page is changed, browser could 12 inform the status to WebKit using the APIs below. 13 14 * ewk/ewk_view.cpp: Add setter/getter functions to query/set page visibility state. 15 (ewk_view_visibility_state_set): Sets the page visibility status. 16 (ewk_view_visibility_state_get): Gets the page visibility status. 17 * ewk/ewk_view.h: Add public prototypes. 18 1 19 2011-11-02 Tom Sepez <tsepez@chromium.org> 2 20 -
trunk/Source/WebKit/efl/ewk/ewk_view.cpp
r98908 r99155 3875 3875 } 3876 3876 3877 Eina_Bool ewk_view_visibility_state_set(Evas_Object* ewkView, Ewk_Page_Visibility_State pageVisibleState, Eina_Bool initialState) 3878 { 3879 #if ENABLE(PAGE_VISIBILITY_API) 3880 EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, EINA_FALSE); 3881 EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, EINA_FALSE); 3882 3883 switch (pageVisibleState) { 3884 case EWK_PAGE_VISIBILITY_STATE_VISIBLE: 3885 priv->page->setVisibilityState(WebCore::PageVisibilityStateVisible, initialState); 3886 break; 3887 case EWK_PAGE_VISIBILITY_STATE_HIDDEN: 3888 priv->page->setVisibilityState(WebCore::PageVisibilityStateHidden, initialState); 3889 break; 3890 case EWK_PAGE_VISIBILITY_STATE_PRERENDER: 3891 priv->page->setVisibilityState(WebCore::PageVisibilityStatePrerender, initialState); 3892 break; 3893 default: 3894 return EINA_FALSE; 3895 } 3896 3897 return EINA_TRUE; 3898 #else 3899 DBG("PAGE_VISIBILITY_API is disabled."); 3900 return EINA_FALSE; 3901 #endif 3902 } 3903 3904 Ewk_Page_Visibility_State ewk_view_visibility_state_get(const Evas_Object* ewkView) 3905 { 3906 #if ENABLE(PAGE_VISIBILITY_API) 3907 EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, EWK_PAGE_VISIBILITY_STATE_VISIBLE); 3908 EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, EWK_PAGE_VISIBILITY_STATE_VISIBLE); 3909 3910 switch (priv->page->visibilityState()) { 3911 case WebCore::PageVisibilityStateVisible: 3912 return EWK_PAGE_VISIBILITY_STATE_VISIBLE; 3913 case WebCore::PageVisibilityStateHidden: 3914 return EWK_PAGE_VISIBILITY_STATE_HIDDEN; 3915 case WebCore::PageVisibilityStatePrerender: 3916 return EWK_PAGE_VISIBILITY_STATE_PRERENDER; 3917 default: 3918 return EWK_PAGE_VISIBILITY_STATE_VISIBLE; 3919 } 3920 #else 3921 DBG("PAGE_VISIBILITY_API is disabled."); 3922 return EWK_PAGE_VISIBILITY_STATE_VISIBLE; 3923 #endif 3924 } 3925 3877 3926 namespace EWKPrivate { 3878 3927 -
trunk/Source/WebKit/efl/ewk/ewk_view.h
r98908 r99155 2219 2219 EAPI Eina_Bool ewk_view_protocol_handler_unset(Evas_Object* o); 2220 2220 2221 /// Defines the page visibility status. 2222 enum _Ewk_Page_Visibility_State { 2223 EWK_PAGE_VISIBILITY_STATE_VISIBLE, 2224 EWK_PAGE_VISIBILITY_STATE_HIDDEN, 2225 EWK_PAGE_VISIBILITY_STATE_PRERENDER 2226 }; 2227 /// Creates a type name for @a _Ewk_Page_Visibility_State. 2228 typedef enum _Ewk_Page_Visibility_State Ewk_Page_Visibility_State; 2229 2230 /** 2231 * Sets the visibility state of the page. 2232 * 2233 * This function let WebKit knows the visibility status of the page. 2234 * WebKit will save the current status, and fire a "visibilitychange" 2235 * event which web application can listen. Web application could slow 2236 * down or stop itself when it gets a "visibilitychange" event and its 2237 * visibility state is hidden. If its visibility state is visible, then 2238 * the web application could use more resources. 2239 * 2240 * This feature makes that web application could use the resources efficiently, 2241 * such as power, CPU, and etc. 2242 * 2243 * If more detailed description is needed, please see the specification. 2244 * (http://www.w3.org/TR/page-visibility) 2245 * 2246 * @param o view object to set the visibility state. 2247 * @param page_visible_state the visible state of the page to set. 2248 * @param initial_state @c EINA_TRUE if this function is called at page initialization time, 2249 * @c EINA_FALSE otherwise. 2250 * 2251 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure. 2252 */ 2253 EAPI Eina_Bool ewk_view_visibility_state_set(Evas_Object* o, Ewk_Page_Visibility_State page_visible_state, Eina_Bool initial_state); 2254 2255 /** 2256 * Gets the visibility state of the page. 2257 * 2258 * @param o view object 2259 * 2260 * @return enum value of @a Ewk_Page_Visibility_State that indicates current visibility status of the page. 2261 * 2262 * @see ewk_view_visibility_state_set() 2263 */ 2264 EAPI Ewk_Page_Visibility_State ewk_view_visibility_state_get(const Evas_Object *o); 2265 2221 2266 #ifdef __cplusplus 2222 2267 } -
trunk/Source/cmake/OptionsEfl.cmake
r97771 r99155 84 84 WEBKIT_FEATURE(ENABLE_NOTIFICATIONS "Enable notifications" DEFAULT OFF) 85 85 WEBKIT_FEATURE(ENABLE_ORIENTATION_EVENTS "Enable orientation events" DEFAULT OFF) 86 WEBKIT_FEATURE(ENABLE_PAGE_VISIBILITY_API "Enable Page Visibility API" DEFAULT ON) 86 87 WEBKIT_FEATURE(ENABLE_PROGRESS_TAG "Enable progress tag" DEFAULT ON) 87 88 WEBKIT_FEATURE(ENABLE_SHARED_WORKERS "Enable shared workers" DEFAULT ON) -
trunk/Source/cmakeconfig.h.cmake
r97771 r99155 31 31 #cmakedefine01 ENABLE_NOTIFICATIONS 32 32 #cmakedefine01 ENABLE_ORIENTATION_EVENTS 33 #cmakedefine01 ENABLE_PAGE_VISIBILITY_API 33 34 #cmakedefine01 ENABLE_PROGRESS_TAG 34 35 #cmakedefine01 ENABLE_SHARED_WORKERS
Note: See TracChangeset
for help on using the changeset viewer.