Changeset 128393 in webkit


Ignore:
Timestamp:
Sep 12, 2012, 5:56:49 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL] Support download attribute feature
https://bugs.webkit.org/show_bug.cgi?id=96462

Patch by KyungTae Kim <ktf.kim@samsung.com> on 2012-09-12
Reviewed by Gyuyoung Kim.

.:

  • Source/cmake/OptionsEfl.cmake: Enable DOWNLOAD_ATTRIBUTE feature.

Source/WebKit/efl:

Add suggested_name field on _Ewk_Download and set it on startDownload
to get suggested name passed as a download attribute.

  • WebCoreSupport/FrameLoaderClientEfl.cpp:

(WebCore::FrameLoaderClientEfl::download):
(WebCore::FrameLoaderClientEfl::startDownload):

  • ewk/ewk_view.h:

Tools:

Enable DOWNLOAD_ATTRIBUTE feature for EFL port,
and add "download,request" callback to the DumpRenderTree for EFL.

  • DumpRenderTree/efl/DumpRenderTreeChrome.cpp:

(DumpRenderTreeChrome::createView):
(DumpRenderTreeChrome::onDownloadRequest):

  • DumpRenderTree/efl/DumpRenderTreeChrome.h:

(DumpRenderTreeChrome):

  • Scripts/webkitperl/FeatureList.pm:

LayoutTests:

  • platform/efl/Skipped: Unskip test cases related to download attributes.
  • platform/efl-wk2/TestExpectations: Add test cases related to download attributes because they are still failed for WK2
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r128347 r128393  
     12012-09-12  KyungTae Kim  <ktf.kim@samsung.com>
     2
     3        [EFL] Support download attribute feature
     4        https://bugs.webkit.org/show_bug.cgi?id=96462
     5
     6        Reviewed by Gyuyoung Kim.
     7
     8        * Source/cmake/OptionsEfl.cmake: Enable DOWNLOAD_ATTRIBUTE feature.
     9
    1102012-09-12  Sami Kyostila  <skyostil@google.com>
    211
  • trunk/LayoutTests/ChangeLog

    r128392 r128393  
     12012-09-12  KyungTae Kim  <ktf.kim@samsung.com>
     2
     3        [EFL] Support download attribute feature
     4        https://bugs.webkit.org/show_bug.cgi?id=96462
     5
     6        Reviewed by Gyuyoung Kim.
     7
     8        * platform/efl/Skipped: Unskip test cases related to download attributes.
     9        * platform/efl-wk2/TestExpectations: Add test cases related to download attributes because they are still failed for WK2
     10
    1112012-09-12  Stephanie Lewis  <slewis@apple.com>
    212
  • trunk/LayoutTests/platform/efl-wk2/TestExpectations

    r128053 r128393  
    194194BUGWK92504 : fast/forms/plaintext-mode-1.html = TEXT
    195195
     196// WebKitTestRunner needs an implementation for download attribute feature
     197// The implementation for DumpRenderTree is on https://bugs.webkit.org/show_bug.cgi?id=96462
     198// anchor-download-unset.html and anchor-nodownload.html are currently passed, but need to be checked along with below test cases
     199BUGWKEFL : fast/dom/HTMLAnchorElement/anchor-download.html = TEXT
     200BUGWKEFL : fast/dom/HTMLAnchorElement/anchor-nodownload-set.html = TEXT
     201
    196202// Unclassified failures
    197203BUGWKEFL : editing/input/emacs-ctrl-o.html = TEXT
  • trunk/LayoutTests/platform/efl/Skipped

    r128326 r128393  
    144144http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin.html
    145145http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html
    146 
    147 # The EFL port has no support for DOWNLOAD_ATTRIBUTE (turning it on in CMake does not work well with the current implementation of FrameLoaderClientEfl::startDownload())
    148 fast/dom/HTMLAnchorElement/anchor-download-unset.html
    149 fast/dom/HTMLAnchorElement/anchor-download.html
    150 fast/dom/HTMLAnchorElement/anchor-nodownload-set.html
    151 fast/dom/HTMLAnchorElement/anchor-nodownload.html
    152146
    153147# The EFL port has no support for plugins
  • trunk/Source/WebKit/efl/ChangeLog

    r128049 r128393  
     12012-09-12  KyungTae Kim  <ktf.kim@samsung.com>
     2
     3        [EFL] Support download attribute feature
     4        https://bugs.webkit.org/show_bug.cgi?id=96462
     5
     6        Reviewed by Gyuyoung Kim.
     7
     8        Add suggested_name field on _Ewk_Download and set it on startDownload
     9        to get suggested name passed as a download attribute.
     10
     11        * WebCoreSupport/FrameLoaderClientEfl.cpp:
     12        (WebCore::FrameLoaderClientEfl::download):
     13        (WebCore::FrameLoaderClientEfl::startDownload):
     14        * ewk/ewk_view.h:
     15
    1162012-09-10  Christophe Dumez  <christophe.dumez@intel.com>
    217
  • trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp

    r127244 r128393  
    873873
    874874    download.url = url.data();
     875    download.suggested_name = 0;
    875876    ewk_view_download_request(m_view, &download);
    876877}
     
    950951}
    951952
    952 void FrameLoaderClientEfl::startDownload(const ResourceRequest& request, const String& /* suggestedName */)
     953void FrameLoaderClientEfl::startDownload(const ResourceRequest& request, const String& suggestedName)
    953954{
    954955    if (!m_view)
     
    956957
    957958    CString url = request.url().string().utf8();
     959    CString suggestedNameString = suggestedName.utf8();
    958960    Ewk_Download download;
    959961
    960962    download.url = url.data();
     963    download.suggested_name = suggestedNameString.data();
    961964    ewk_view_download_request(m_view, &download);
    962965}
  • trunk/Source/WebKit/efl/ewk/ewk_view.h

    r127848 r128393  
    300300struct _Ewk_Download {
    301301    const char *url; /**< URL of resource. */
     302    const char *suggested_name; /**< suggested name from download attributes */
    302303    /* to be extended */
    303304};
  • trunk/Source/cmake/OptionsEfl.cmake

    r128191 r128393  
    6060WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CUSTOM_SCHEME_HANDLER ON)
    6161WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DATALIST_ELEMENT ON)
     62WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DOWNLOAD_ATTRIBUTE ON)
    6263WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DRAG_SUPPORT ON)
    6364WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FAST_MOBILE_SCROLLING ON)
  • trunk/Tools/ChangeLog

    r128391 r128393  
     12012-09-12  KyungTae Kim  <ktf.kim@samsung.com>
     2
     3        [EFL] Support download attribute feature
     4        https://bugs.webkit.org/show_bug.cgi?id=96462
     5
     6        Reviewed by Gyuyoung Kim.
     7
     8        Enable DOWNLOAD_ATTRIBUTE feature for EFL port,
     9        and add "download,request" callback to the DumpRenderTree for EFL.
     10
     11        * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
     12        (DumpRenderTreeChrome::createView):
     13        (DumpRenderTreeChrome::onDownloadRequest):
     14        * DumpRenderTree/efl/DumpRenderTreeChrome.h:
     15        (DumpRenderTreeChrome):
     16        * Scripts/webkitperl/FeatureList.pm:
     17
    1182012-09-12  Stephanie Lewis  <slewis@apple.com>
    219
  • trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp

    r127909 r128393  
    9999    ewk_view_theme_set(view, DATA_DIR"/default.edj");
    100100
     101    evas_object_smart_callback_add(view, "download,request", onDownloadRequest, 0);
    101102    evas_object_smart_callback_add(view, "load,resource,failed", onResourceLoadFailed, 0);
    102103    evas_object_smart_callback_add(view, "load,resource,finished", onResourceLoadFinished, 0);
     
    891892           serviceInfo->disposition);
    892893}
     894
     895void DumpRenderTreeChrome::onDownloadRequest(void*, Evas_Object*, void* eventInfo)
     896{
     897    // In case of "download,request", the URL need to be downloaded, not opened on the current view.
     898    // Because there is no download agent for the DumpRenderTree,
     899    // create a new view and load the URL on that view just for a test.
     900    Evas_Object* newView = browser->createView();
     901    if (!newView)
     902        return;
     903
     904    Ewk_Download* download = static_cast<Ewk_Download*>(eventInfo);
     905    ewk_view_theme_set(newView, DATA_DIR"/default.edj");
     906    ewk_view_uri_set(newView, download->url);
     907 
     908    browser->m_extraViews.append(newView);
     909}
  • trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h

    r122952 r128393  
    142142    static void onFrameIntentNew(void*, Evas_Object*, void*);
    143143    static void onFrameIntentServiceRegistration(void*, Evas_Object*, void*);
     144
     145    static void onDownloadRequest(void*, Evas_Object*, void*);
    144146};
    145147
  • trunk/Tools/Scripts/webkitperl/FeatureList.pm

    r127318 r128393  
    217217
    218218    { option => "download-attribute", desc => "Toggle Download Attribute support",
    219       define => "ENABLE_DOWNLOAD_ATTRIBUTE", default => isBlackBerry(), value => \$downloadAttributeSupport },
     219      define => "ENABLE_DOWNLOAD_ATTRIBUTE", default => (isBlackBerry() || isEfl()), value => \$downloadAttributeSupport },
    220220
    221221    { option => "file-system", desc => "Toggle File System support",
Note: See TracChangeset for help on using the changeset viewer.