Commit e6e86230 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

[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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128393 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 07f08607
2012-09-12 KyungTae Kim <ktf.kim@samsung.com>
[EFL] Support download attribute feature
https://bugs.webkit.org/show_bug.cgi?id=96462
Reviewed by Gyuyoung Kim.
* Source/cmake/OptionsEfl.cmake: Enable DOWNLOAD_ATTRIBUTE feature.
2012-09-12 Sami Kyostila <skyostil@google.com>
Rename OVERFLOW_SCROLLING as ACCELERATED_OVERFLOW_SCROLLING
......
2012-09-12 KyungTae Kim <ktf.kim@samsung.com>
[EFL] Support download attribute feature
https://bugs.webkit.org/show_bug.cgi?id=96462
Reviewed by Gyuyoung Kim.
* 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
2012-09-12 Stephanie Lewis <slewis@apple.com>
 
css3/filters/custom/filter-fallback-to-software.html fails on Debug WK2.
......@@ -193,6 +193,12 @@ BUGWK92504 : editing/execCommand/format-block-multiple-paragraphs-in-pre.html =
BUGWK92504 : fast/css/relative-positioned-block-crash.html = TEXT
BUGWK92504 : fast/forms/plaintext-mode-1.html = TEXT
// WebKitTestRunner needs an implementation for download attribute feature
// The implementation for DumpRenderTree is on https://bugs.webkit.org/show_bug.cgi?id=96462
// anchor-download-unset.html and anchor-nodownload.html are currently passed, but need to be checked along with below test cases
BUGWKEFL : fast/dom/HTMLAnchorElement/anchor-download.html = TEXT
BUGWKEFL : fast/dom/HTMLAnchorElement/anchor-nodownload-set.html = TEXT
// Unclassified failures
BUGWKEFL : editing/input/emacs-ctrl-o.html = TEXT
BUGWKEFL : fast/block/float/float-in-float-hit-testing.html = TEXT
......
......@@ -144,12 +144,6 @@ http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-
http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin.html
http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html
# 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())
fast/dom/HTMLAnchorElement/anchor-download-unset.html
fast/dom/HTMLAnchorElement/anchor-download.html
fast/dom/HTMLAnchorElement/anchor-nodownload-set.html
fast/dom/HTMLAnchorElement/anchor-nodownload.html
# The EFL port has no support for plugins
fast/dom/Window/Plug-ins.html
fast/frames/sandboxed-iframe-about-blank.html
......
2012-09-12 KyungTae Kim <ktf.kim@samsung.com>
[EFL] Support download attribute feature
https://bugs.webkit.org/show_bug.cgi?id=96462
Reviewed by Gyuyoung Kim.
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:
2012-09-10 Christophe Dumez <christophe.dumez@intel.com>
[EFL] Create a toggle button for closed captions
......
......@@ -872,6 +872,7 @@ void FrameLoaderClientEfl::download(ResourceHandle*, const ResourceRequest& requ
Ewk_Download download;
download.url = url.data();
download.suggested_name = 0;
ewk_view_download_request(m_view, &download);
}
......@@ -949,15 +950,17 @@ void FrameLoaderClientEfl::setMainDocumentError(DocumentLoader* loader, const Re
m_hasSentResponseToPlugin = false;
}
void FrameLoaderClientEfl::startDownload(const ResourceRequest& request, const String& /* suggestedName */)
void FrameLoaderClientEfl::startDownload(const ResourceRequest& request, const String& suggestedName)
{
if (!m_view)
return;
CString url = request.url().string().utf8();
CString suggestedNameString = suggestedName.utf8();
Ewk_Download download;
download.url = url.data();
download.suggested_name = suggestedNameString.data();
ewk_view_download_request(m_view, &download);
}
......
......@@ -299,6 +299,7 @@ typedef struct _Ewk_Download Ewk_Download;
/// Contains Download data.
struct _Ewk_Download {
const char *url; /**< URL of resource. */
const char *suggested_name; /**< suggested name from download attributes */
/* to be extended */
};
......
......@@ -59,6 +59,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_IMAGE_SET ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_VARIABLES ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CUSTOM_SCHEME_HANDLER ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DATALIST_ELEMENT ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DOWNLOAD_ATTRIBUTE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DRAG_SUPPORT ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FAST_MOBILE_SCROLLING ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FILTERS ON)
......
2012-09-12 KyungTae Kim <ktf.kim@samsung.com>
[EFL] Support download attribute feature
https://bugs.webkit.org/show_bug.cgi?id=96462
Reviewed by Gyuyoung Kim.
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:
2012-09-12 Stephanie Lewis <slewis@apple.com>
 
Reduce parallism on the wk2 testers.
......
......@@ -98,6 +98,7 @@ Evas_Object* DumpRenderTreeChrome::createView() const
ewk_view_theme_set(view, DATA_DIR"/default.edj");
evas_object_smart_callback_add(view, "download,request", onDownloadRequest, 0);
evas_object_smart_callback_add(view, "load,resource,failed", onResourceLoadFailed, 0);
evas_object_smart_callback_add(view, "load,resource,finished", onResourceLoadFinished, 0);
evas_object_smart_callback_add(view, "load,started", onLoadStarted, 0);
......@@ -890,3 +891,19 @@ void DumpRenderTreeChrome::onFrameIntentServiceRegistration(void*, Evas_Object*,
serviceInfo->href,
serviceInfo->disposition);
}
void DumpRenderTreeChrome::onDownloadRequest(void*, Evas_Object*, void* eventInfo)
{
// In case of "download,request", the URL need to be downloaded, not opened on the current view.
// Because there is no download agent for the DumpRenderTree,
// create a new view and load the URL on that view just for a test.
Evas_Object* newView = browser->createView();
if (!newView)
return;
Ewk_Download* download = static_cast<Ewk_Download*>(eventInfo);
ewk_view_theme_set(newView, DATA_DIR"/default.edj");
ewk_view_uri_set(newView, download->url);
browser->m_extraViews.append(newView);
}
......@@ -141,6 +141,8 @@ private:
static void onFrameIntentNew(void*, Evas_Object*, void*);
static void onFrameIntentServiceRegistration(void*, Evas_Object*, void*);
static void onDownloadRequest(void*, Evas_Object*, void*);
};
#endif // DumpRenderTreeChrome_h
......@@ -216,7 +216,7 @@ my @features = (
define => "ENABLE_DIRECTORY_UPLOAD", default => 0, value => \$directoryUploadSupport },
{ option => "download-attribute", desc => "Toggle Download Attribute support",
define => "ENABLE_DOWNLOAD_ATTRIBUTE", default => isBlackBerry(), value => \$downloadAttributeSupport },
define => "ENABLE_DOWNLOAD_ATTRIBUTE", default => (isBlackBerry() || isEfl()), value => \$downloadAttributeSupport },
{ option => "file-system", desc => "Toggle File System support",
define => "ENABLE_FILE_SYSTEM", default => isBlackBerry(), value => \$fileSystemSupport },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment