Changeset 102600 in webkit
- Timestamp:
- Dec 12, 2011 10:18:34 AM (12 years ago)
- Location:
- trunk/Source/WebKit/efl
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/efl/ChangeLog
r102599 r102600 1 2011-12-12 Raphael Kubo da Costa <kubo@profusion.mobi> 2 3 [EFL] Add API to notify that mixed content has been loaded. 4 https://bugs.webkit.org/show_bug.cgi?id=74301 5 6 Reviewed by Gustavo Noronha Silva. 7 8 When mixed content is displayed/run, both frames and views 9 emit the proper signals to notify API users. 10 11 * WebCoreSupport/FrameLoaderClientEfl.cpp: 12 (WebCore::FrameLoaderClientEfl::didDisplayInsecureContent): 13 (WebCore::FrameLoaderClientEfl::didRunInsecureContent): 14 * ewk/ewk_frame.cpp: 15 (ewk_frame_view_create_for_view): 16 (ewk_frame_mixed_content_displayed_get): 17 (ewk_frame_mixed_content_run_get): 18 (ewk_frame_mixed_content_displayed_set): 19 (ewk_frame_mixed_content_run_set): 20 * ewk/ewk_frame.h: 21 * ewk/ewk_private.h: 22 * ewk/ewk_view.cpp: 23 (ewk_view_frame_main_cleared): 24 (ewk_view_mixed_content_displayed_get): 25 (ewk_view_mixed_content_run_get): 26 (ewk_view_mixed_content_displayed_set): 27 (ewk_view_mixed_content_run_set): 28 * ewk/ewk_view.h: 29 1 30 2011-12-12 Raphael Kubo da Costa <kubo@profusion.mobi> 2 31 -
trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
r102159 r102600 503 503 void FrameLoaderClientEfl::didDisplayInsecureContent() 504 504 { 505 notImplemented();505 ewk_frame_mixed_content_displayed_set(m_frame, true); 506 506 } 507 507 508 508 void FrameLoaderClientEfl::didRunInsecureContent(SecurityOrigin*, const KURL&) 509 509 { 510 notImplemented();510 ewk_frame_mixed_content_run_set(m_frame, true); 511 511 } 512 512 -
trunk/Source/WebKit/efl/ewk/ewk_frame.cpp
r102297 r102600 71 71 const char* name; 72 72 bool editable : 1; 73 bool hasDisplayedMixedContent : 1; 74 bool hasRunMixedContent : 1; 73 75 }; 74 76 … … 1452 1454 smartData->frame->view()->setEdjeTheme(theme); 1453 1455 smartData->frame->view()->setEvasObject(ewkFrame); 1456 1457 ewk_frame_mixed_content_displayed_set(ewkFrame, false); 1458 ewk_frame_mixed_content_run_set(ewkFrame, false); 1454 1459 } 1455 1460 … … 1564 1569 } 1565 1570 1571 Eina_Bool ewk_frame_mixed_content_displayed_get(const Evas_Object* ewkFrame) 1572 { 1573 EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData, false); 1574 return smartData->hasDisplayedMixedContent; 1575 } 1576 1577 Eina_Bool ewk_frame_mixed_content_run_get(const Evas_Object* ewkFrame) 1578 { 1579 EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData, false); 1580 return smartData->hasRunMixedContent; 1581 } 1582 1566 1583 /** 1567 1584 * @internal … … 1642 1659 } 1643 1660 1661 /** 1662 * @internal 1663 * Defines whether the frame has displayed mixed content. 1664 * 1665 * When a frame has displayed mixed content, the currently loaded URI is secure (HTTPS) but it has 1666 * loaded and displayed a resource, such as an image, from an insecure (HTTP) source. 1667 * 1668 * @param hasDisplayed Do or do not clear the flag from the frame. If @c true, the container view 1669 * is also notified and it then emits the "mixedcontent,displayed" signal. 1670 * 1671 * Emits signal: "mixedcontent,displayed" with no parameters when @p hasDisplayed is @c true. 1672 */ 1673 void ewk_frame_mixed_content_displayed_set(Evas_Object* ewkFrame, bool hasDisplayed) 1674 { 1675 EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData); 1676 smartData->hasDisplayedMixedContent = hasDisplayed; 1677 1678 if (hasDisplayed) { 1679 ewk_view_mixed_content_displayed_set(smartData->view, true); 1680 evas_object_smart_callback_call(ewkFrame, "mixedcontent,displayed", 0); 1681 } 1682 } 1683 1684 /** 1685 * @internal 1686 * Defines whether the frame has run mixed content. 1687 * 1688 * When a frame has run mixed content, the currently loaded URI is secure (HTTPS) but it has 1689 * loaded and run a resource, such as a script, from an insecure (HTTP) source. 1690 * 1691 * @param hasDisplayed Do or do not clear the flag from the frame. If @c true, the container view 1692 * is also notified and it then emits the "mixedcontent,run" signal. 1693 * 1694 * Emits signal: "mixedcontent,run" with no parameters when @p hasRun is @c true. 1695 */ 1696 void ewk_frame_mixed_content_run_set(Evas_Object* ewkFrame, bool hasRun) 1697 { 1698 EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData); 1699 smartData->hasRunMixedContent = hasRun; 1700 1701 if (hasRun) { 1702 ewk_view_mixed_content_run_set(smartData->view, true); 1703 evas_object_smart_callback_call(ewkFrame, "mixedcontent,run", 0); 1704 } 1705 } 1706 1644 1707 namespace EWKPrivate { 1645 1708 -
trunk/Source/WebKit/efl/ewk/ewk_frame.h
r102297 r102600 53 53 * - "load,provisional", void: frame started provisional load. 54 54 * - "load,started", void: frame started loading the document. 55 * - "mixedcontent,displayed", void: frame has loaded and displayed mixed content. 56 * - "mixedcontent,run", void: frame has loaded and run mixed content. 55 57 * - "navigation,first", void: first navigation was occurred. 56 58 * - "resource,request,new", Ewk_Frame_Resource_Request*: reports that … … 843 845 EAPI char* ewk_frame_plain_text_get(const Evas_Object* o); 844 846 847 /** 848 * Returns whether the frame has displayed mixed content. 849 * 850 * When a frame has displayed mixed content, its current URI is an HTTPS one, but it has 851 * loaded and displayed a resource (such as an image) from an insecure (non-HTTPS) URI. 852 * Both the frame and the container view send a "mixedcontent,displayed" signal in this case. 853 * 854 * The status is reset only when a load event occurs (eg. the page is reloaded or a new page is loaded). 855 * 856 * @param o The frame to query. 857 * 858 * @sa ewk_view_mixed_content_displayed_get 859 */ 860 EAPI Eina_Bool ewk_frame_mixed_content_displayed_get(const Evas_Object *o); 861 862 /** 863 * Returns whether the frame has run mixed content. 864 * 865 * When a frame has run mixed content, its current URI is an HTTPS one, but it has 866 * loaded and run a resource (such as an image) from an insecure (non-HTTPS) URI. 867 * Both the frame and the container view send a "mixedcontent,run" signal in this case. 868 * 869 * The status is reset only when a load event occurs (eg. the page is reloaded or a new page is loaded). 870 * 871 * @param o The frame to query. 872 * 873 * @sa ewk_view_mixed_content_run_get 874 */ 875 EAPI Eina_Bool ewk_frame_mixed_content_run_get(const Evas_Object *o); 876 845 877 #ifdef __cplusplus 846 878 } -
trunk/Source/WebKit/efl/ewk/ewk_private.h
r101744 r102600 223 223 void ewk_frame_editor_client_selection_changed(Evas_Object* o); 224 224 225 void ewk_frame_mixed_content_displayed_set(Evas_Object* ewkFrame, bool hasDisplayed); 226 void ewk_frame_mixed_content_run_set(Evas_Object* ewkFrame, bool hasRun); 227 void ewk_view_mixed_content_displayed_set(Evas_Object* ewkView, bool hasDisplayed); 228 void ewk_view_mixed_content_run_set(Evas_Object* ewkView, bool hasRun); 229 225 230 #ifdef __cplusplus 226 231 -
trunk/Source/WebKit/efl/ewk/ewk_view.cpp
r102297 r102600 149 149 bool viewCleared : 1; 150 150 bool needTouchEvents : 1; 151 bool hasDisplayedMixedContent : 1; 152 bool hasRunMixedContent : 1; 151 153 } flags; 152 154 struct { … … 2848 2850 EINA_SAFETY_ON_NULL_RETURN(smartData->api->flush); 2849 2851 smartData->api->flush(smartData); 2852 2853 ewk_view_mixed_content_displayed_set(ewkView, false); 2854 ewk_view_mixed_content_run_set(ewkView, false); 2850 2855 } 2851 2856 … … 3768 3773 } 3769 3774 3775 Eina_Bool ewk_view_mixed_content_displayed_get(const Evas_Object* ewkView) 3776 { 3777 EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false); 3778 EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false); 3779 return priv->flags.hasDisplayedMixedContent; 3780 } 3781 3782 Eina_Bool ewk_view_mixed_content_run_get(const Evas_Object* ewkView) 3783 { 3784 EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false); 3785 EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false); 3786 return priv->flags.hasRunMixedContent; 3787 } 3788 3770 3789 /** 3771 3790 * @internal … … 3792 3811 { 3793 3812 evas_object_smart_callback_call(ewkView, "editorclient,contents,changed", 0); 3813 } 3814 3815 /** 3816 * @internal 3817 * Defines whether the view has displayed mixed content. 3818 * 3819 * When a view has displayed mixed content, any of its frames has loaded an HTTPS URI 3820 * which has itself loaded and displayed a resource (such as an image) from an insecure, 3821 * that is, non-HTTPS, URI. 3822 * 3823 * @param hasDisplayed Do or do not clear the flag from the view. 3824 * 3825 * Emits signal: "mixedcontent,displayed" with no parameters when @p hasDisplayed is @c true. 3826 */ 3827 void ewk_view_mixed_content_displayed_set(Evas_Object* ewkView, bool hasDisplayed) 3828 { 3829 EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData); 3830 EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv); 3831 3832 priv->flags.hasDisplayedMixedContent = hasDisplayed; 3833 3834 if (hasDisplayed) 3835 evas_object_smart_callback_call(ewkView, "mixedcontent,displayed", 0); 3836 } 3837 3838 /** 3839 * @internal 3840 * Defines whether the view has run mixed content. 3841 * 3842 * When a view has run mixed content, any of its frames has loaded an HTTPS URI 3843 * which has itself loaded and run a resource (such as a script) from an insecure, 3844 * that is, non-HTTPS, URI. 3845 * 3846 * @param hasRun Do or do not clear the flag from the view. 3847 * 3848 * Emits signal: "mixedcontent,run" with no parameters when @p hasRun is @c true. 3849 */ 3850 void ewk_view_mixed_content_run_set(Evas_Object* ewkView, bool hasRun) 3851 { 3852 EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData); 3853 EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv); 3854 3855 priv->flags.hasRunMixedContent = hasRun; 3856 3857 if (hasRun) 3858 evas_object_smart_callback_call(ewkView, "mixedcontent,run", 0); 3794 3859 } 3795 3860 -
trunk/Source/WebKit/efl/ewk/ewk_view.h
r102297 r102600 59 59 * visible; @c EINA_FALSE, otherwise. 60 60 * - "menubar,visible,set", Eina_Bool: sets menubar visibility. 61 * - "mixedcontent,displayed", void: any of the containing frames has loaded and displayed mixed content. 62 * - "mixedcontent,run", void: any of the containing frames has loaded and run mixed content. 61 63 * - "ready", void: page is fully loaded. 62 64 * - "scrollbars,visible,get", Eina_Bool *: expects a @c EINA_TRUE if scrollbars … … 2278 2280 EAPI Ewk_Page_Visibility_State ewk_view_visibility_state_get(const Evas_Object *o); 2279 2281 2282 /** 2283 * Returns whether the view has displayed mixed content. 2284 * 2285 * When a view has displayed mixed content, any of its frames has loaded an HTTPS URI 2286 * which has itself loaded and displayed a resource (such as an image) from an insecure, 2287 * that is, non-HTTPS, URI. 2288 * 2289 * The status is reset only when a load event occurs (eg. the page is reloaded or a new page is loaded). 2290 * 2291 * When one of the containing frames displays mixed content, the view emits the "mixedcontent,displayed" signal. 2292 * 2293 * @param o The view to query. 2294 * 2295 * @sa ewk_frame_mixed_content_displayed_get 2296 */ 2297 EAPI Eina_Bool ewk_view_mixed_content_displayed_get(const Evas_Object *o); 2298 2299 /** 2300 * Returns whether the view has run mixed content. 2301 * 2302 * When a view has run mixed content, any of its frames has loaded an HTTPS URI 2303 * which has itself loaded and run a resource (such as an image) from an insecure, 2304 * that is, non-HTTPS, URI. 2305 * 2306 * The status is reset only when a load event occurs (eg. the page is reloaded or a new page is loaded). 2307 * 2308 * When one of the containing frames runs mixed content, the view emits the "mixedcontent,run" signal. 2309 * 2310 * @param o The view to query. 2311 * 2312 * @sa ewk_frame_mixed_content_run_get 2313 */ 2314 EAPI Eina_Bool ewk_view_mixed_content_run_get(const Evas_Object *o); 2315 2280 2316 #ifdef __cplusplus 2281 2317 }
Note: See TracChangeset
for help on using the changeset viewer.