Changeset 116250 in webkit


Ignore:
Timestamp:
May 6, 2012 4:28:20 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL] EFL's LayoutTestController setJavaScriptCanAccessClipboard implementation
https://bugs.webkit.org/show_bug.cgi?id=83687

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-05-06
Reviewed by Antonio Gomes.

Source/WebKit/efl:

  • ewk/ewk_view.cpp:

(_Ewk_View_Private_Data):
(_ewk_view_priv_new):
(ewk_view_setting_scripts_can_access_clipboard_get):
(ewk_view_setting_scripts_can_access_clipboard_set):

  • ewk/ewk_view.h:

Tools:

  • DumpRenderTree/efl/LayoutTestControllerEfl.cpp:

(LayoutTestController::setJavaScriptCanAccessClipboard):

LayoutTests:

  • platform/efl/Skipped:
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r116246 r116250  
     12012-05-06  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
     2
     3        [EFL] EFL's LayoutTestController setJavaScriptCanAccessClipboard implementation
     4        https://bugs.webkit.org/show_bug.cgi?id=83687
     5
     6        Reviewed by Antonio Gomes.
     7
     8        * platform/efl/Skipped:
     9
    1102012-05-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    211
  • trunk/LayoutTests/platform/efl/Skipped

    r116207 r116250  
    314314plugins/netscape-plugin-setwindow-size-2.html
    315315
    316 # EFL's LayoutTestController does not implement setJavaScriptCanAccessClipboard
    317 editing/execCommand/clipboard-access.html
    318316
    319317# EFL's LayoutTestController does not implement setAllowUniversalAccessFromFileURLs
  • trunk/Source/WebKit/efl/ChangeLog

    r116246 r116250  
     12012-05-06  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
     2
     3        [EFL] EFL's LayoutTestController setJavaScriptCanAccessClipboard implementation
     4        https://bugs.webkit.org/show_bug.cgi?id=83687
     5
     6        Reviewed by Antonio Gomes.
     7
     8        * ewk/ewk_view.cpp:
     9        (_Ewk_View_Private_Data):
     10        (_ewk_view_priv_new):
     11        (ewk_view_setting_scripts_can_access_clipboard_get):
     12        (ewk_view_setting_scripts_can_access_clipboard_set):
     13        * ewk/ewk_view.h:
     14
    1152012-05-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    216
  • trunk/Source/WebKit/efl/ewk/ewk_view.cpp

    r115877 r116250  
    218218        bool shouldDisplayTextDescriptions: 1;
    219219#endif
     220        bool scriptsCanAccessClipboard : 1;
    220221        bool resizableTextareas : 1;
    221222        bool privateBrowsing : 1;
     
    739740    priv->settings.shouldDisplayTextDescriptions = priv->pageSettings->shouldDisplayTextDescriptions();
    740741#endif
     742    priv->settings.scriptsCanAccessClipboard = priv->pageSettings->javaScriptCanAccessClipboard();
    741743    priv->settings.resizableTextareas = priv->pageSettings->textAreasAreResizable();
    742744    priv->settings.privateBrowsing = priv->pageSettings->privateBrowsingEnabled();
     
    21022104        priv->pageSettings->setAllowScriptsToCloseWindows(allow);
    21032105        priv->settings.scriptsCanCloseWindows = allow;
     2106    }
     2107    return true;
     2108}
     2109
     2110Eina_Bool ewk_view_setting_scripts_can_access_clipboard_get(const Evas_Object* ewkView)
     2111{
     2112    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
     2113    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
     2114    return priv->settings.scriptsCanAccessClipboard;
     2115}
     2116
     2117Eina_Bool ewk_view_setting_scripts_can_access_clipboard_set(Evas_Object* ewkView, Eina_Bool allow)
     2118{
     2119    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
     2120    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
     2121    allow = !!allow;
     2122    if (priv->settings.scriptsCanAccessClipboard != allow) {
     2123        priv->pageSettings->setJavaScriptCanAccessClipboard(allow);
     2124        priv->settings.scriptsCanAccessClipboard = allow;
    21042125    }
    21052126    return true;
  • trunk/Source/WebKit/efl/ewk/ewk_view.h

    r115834 r116250  
    15561556
    15571557/**
     1558 * Returns whether scripts can access clipboard.
     1559 *
     1560 * @param o View whose settings to check.
     1561 *
     1562 * @return @c EINA_TRUE if scripts can access clipboard, @c EINA_FALSE otherwise.
     1563 */
     1564EAPI Eina_Bool    ewk_view_setting_scripts_can_access_clipboard_get(const Evas_Object *o);
     1565
     1566/**
     1567 * Sets whether scripts are allowed to access clipboard.
     1568 *
     1569 * @param o View whose settings to change.
     1570 * @param allow @c EINA_TRUE to allow scripts access clipboard,
     1571 *              @c EINA_FALSE otherwise.
     1572 *
     1573 * @return @c EINA_TRUE if the setting could be changed successfully,
     1574 *         @c EINA_FALSE in case an error occurred.
     1575 */
     1576EAPI Eina_Bool    ewk_view_setting_scripts_can_access_clipboard_set(Evas_Object *o, Eina_Bool allow);
     1577
     1578/**
    15581579 * Queries if HTML elements @c textarea can be resizable.
    15591580 *
  • trunk/Tools/ChangeLog

    r116246 r116250  
     12012-05-06  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
     2
     3        [EFL] EFL's LayoutTestController setJavaScriptCanAccessClipboard implementation
     4        https://bugs.webkit.org/show_bug.cgi?id=83687
     5
     6        Reviewed by Antonio Gomes.
     7
     8        * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
     9        (LayoutTestController::setJavaScriptCanAccessClipboard):
     10
    1112012-05-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    212
  • trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp

    r116246 r116250  
    328328}
    329329
    330 void LayoutTestController::setJavaScriptCanAccessClipboard(bool)
    331 {
    332     notImplemented();
     330void LayoutTestController::setJavaScriptCanAccessClipboard(bool flag)
     331{
     332    ewk_view_setting_scripts_can_access_clipboard_set(browser->mainView(), flag);
    333333}
    334334
Note: See TracChangeset for help on using the changeset viewer.