Add test that checks if scrolling works inside the suggestion picker
https://bugs.webkit.org/show_bug.cgi?id=99409

Reviewed by Kent Tamura.

We want to test that scrolling, both by scrollbar and mouse wheel, work inside the suggestion picker.

* platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-mouse-operations-expected.txt:
* platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-mouse-operations.html:
* platform/chromium/fast/forms/suggestion-picker/time-suggestion-picker-mouse-operations-expected.txt:
* platform/chromium/fast/forms/suggestion-picker/time-suggestion-picker-mouse-operations.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2][AC] Url bar should not be covered by the web view
https://bugs.webkit.org/show_bug.cgi?id=99485

Patch by Yael Aharon <yael.aharon@intel.com> on 2012-10-16
Reviewed by Laszlo Gombos.

When accelerated compositing is enabled, the url bar is covered by the web view.
This was caused by 2 issues:
- _ewk_view_smart_calculate was called before the first gl surface was created,
  so an early return caused it to not save the new view position.
- When painting the view, we need to take into account the position of
  the view within the window, i.e. the url bar.

* UIProcess/API/efl/EflViewportHandler.cpp:
(WebKit::EflViewportHandler::display):
* UIProcess/API/efl/EflViewportHandler.h:
(EflViewportHandler):
* UIProcess/API/efl/ewk_view.cpp:
(_ewk_view_smart_calculate):
(ewk_view_display):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebKit2] Create Objective-C API for adding and removing user scripts
https://bugs.webkit.org/show_bug.cgi?id=99528

Reviewed by Anders Carlsson.

Source/WebKit2:

This patch adds the following API to WKBrowsingContextGroup:

- (void)addUserScript:(NSString *)source baseURL:(NSURL *)baseURL whitelistedURLPatterns:(NSArray *)whitelist blacklistedURLPatterns:(NSArray *)blacklist injectionTime:(WKUserScriptInjectionTime)injectionTime mainFrameOnly:(BOOL)mainFrameOnly;
- (void)removeAllUserScripts;

* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupAddUserScript): Define a C SPI equivalent of addUserScript: that calls existing methods in WebPageGroup.
(WKPageGroupRemoveAllUserScripts): Ditto for removeAllUserScripts.
* UIProcess/API/C/WKPageGroup.h: Declare the above-mentioned functions.
* UIProcess/API/mac/WKBrowsingContextGroup.h: Declare the Objective-C API
* UIProcess/API/mac/WKBrowsingContextGroup.mm:
(-[WKBrowsingContextGroup addUserScript:baseURL:whitelist:blacklist:injectionTime:mainFrameOnly:]): Call WKPageGroupAddUserScript.
(-[WKBrowsingContextGroup removeAllUserScripts]): Call WKPageGroupRemoveAllUserScripts.
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::removeAllUserScripts): This was calling PageGroup::removeUserStyleSheetsFromWorld() by mistake.

Tools:

Add three new API tests.

* TestWebKitAPI/Tests/WebKit2ObjC/UserContentTest.mm:
(expectScriptValueIsString):
(expectScriptValueIsBoolean):
(expectScriptValueIsUndefined):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        <rdar://problem/12462993> Use a sensible fallback for cache directory

        Reviewed by Sam Weinig.

        * UIProcess/WebContext.cpp: (WebKit::WebContext::createNewWebProcess): Cache directory
        should be created if it doesn't exist yet, so use createHandleForReadWriteDirectory.

        * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformDefaultDiskCacheDirectory):
        We don't want caches in home directory, they should go to ~/Library/Caches.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Add factory methods for refcounted Ewk types
https://bugs.webkit.org/show_bug.cgi?id=99479

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-16
Reviewed by Gyuyoung Kim.

Add factory methods to refcounted Ewk types that return
a PassRefPtr for refcounted Ewk types. Their constructors
were made privates as well, in order to promote the use
of smart pointers internally.

Remove _new() functions for refcounted Ewk types as they
are no longer needed now that the classes are defined
in the private headers instead of the cpp files.

* UIProcess/API/efl/PageClientImpl.cpp:
(WebKit::PageClientImpl::handleDownloadRequest):
* UIProcess/API/efl/ewk_back_forward_list.cpp:
(addItemToWrapperCache):
* UIProcess/API/efl/ewk_back_forward_list_item.cpp:
(ewk_back_forward_list_item_original_url_get):
* UIProcess/API/efl/ewk_back_forward_list_item_private.h:
(_Ewk_Back_Forward_List_Item):
(_Ewk_Back_Forward_List_Item::create):
(_Ewk_Back_Forward_List_Item::_Ewk_Back_Forward_List_Item):
* UIProcess/API/efl/ewk_context_download_client.cpp:
(didReceiveResponse):
* UIProcess/API/efl/ewk_context_history_client.cpp:
(didNavigateWithNavigationData):
* UIProcess/API/efl/ewk_download_job.cpp:
(ewk_download_job_request_get):
(ewk_download_job_state_set):
* UIProcess/API/efl/ewk_download_job_private.h:
(_Ewk_Download_Job):
(_Ewk_Download_Job::create):
(_Ewk_Download_Job::_Ewk_Download_Job):
* UIProcess/API/efl/ewk_intent.cpp:
(ewk_intent_extra_names_get):
* UIProcess/API/efl/ewk_intent_private.h:
(_Ewk_Intent):
(_Ewk_Intent::create):
(_Ewk_Intent::_Ewk_Intent):
* UIProcess/API/efl/ewk_intent_service.cpp:
(ewk_intent_service_disposition_get):
* UIProcess/API/efl/ewk_intent_service_private.h:
(_Ewk_Intent_Service):
(_Ewk_Intent_Service::create):
(_Ewk_Intent_Service::_Ewk_Intent_Service):
* UIProcess/API/efl/ewk_navigation_data.cpp:
(ewk_navigation_data_url_get):
* UIProcess/API/efl/ewk_navigation_data_private.h:
(_Ewk_Navigation_Data):
(_Ewk_Navigation_Data::create):
(_Ewk_Navigation_Data::_Ewk_Navigation_Data):
* UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
* UIProcess/API/efl/ewk_navigation_policy_decision_private.h:
(_Ewk_Navigation_Policy_Decision):
(_Ewk_Navigation_Policy_Decision::~_Ewk_Navigation_Policy_Decision):
(_Ewk_Navigation_Policy_Decision::create):
(_Ewk_Navigation_Policy_Decision::_Ewk_Navigation_Policy_Decision):
* UIProcess/API/efl/ewk_url_request.cpp:
(ewk_url_request_http_method_get):
* UIProcess/API/efl/ewk_url_request_private.h:
(_Ewk_Url_Request):
(_Ewk_Url_Request::create):
(_Ewk_Url_Request::_Ewk_Url_Request):
* UIProcess/API/efl/ewk_url_response.cpp:
(ewk_url_response_content_length_get):
* UIProcess/API/efl/ewk_url_response_private.h:
(_Ewk_Url_Response):
(_Ewk_Url_Response::create):
(_Ewk_Url_Response::_Ewk_Url_Response):
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_intent_deliver):
* UIProcess/API/efl/ewk_view_loader_client.cpp:
(didReceiveIntentForFrame):
(registerIntentServiceForFrame):
* UIProcess/API/efl/ewk_view_policy_client.cpp:
(decidePolicyForNavigationAction):
(decidePolicyForNewWindowAction):
* UIProcess/API/efl/ewk_view_resource_load_client.cpp:
(didInitiateLoadForResource):
(didSendRequestForResource):
(didReceiveResponseForResource):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131546 268f45cc-cd09-0410-ab3c-d52691b4dbfc