Source/WebKit2/ChangeLog

 12012-07-15 Hyerim Bae <hyerim.bae@samsung.com>
 2 Reviewed by NOBODY (OOPS!).
 3
 4 [EFL][WK2] Add ewk_view_find_client.h / cpp for wrapping WKPageSetPageFindClient.
 5 https://bugs.webkit.org/show_bug.cgi?id=90927
 6
 7 * PlatformEfl.cmake:
 8 * UIProcess/API/efl/ewk_view.cpp:
 9 (ewk_view_base_add):
 10 (ewk_view_text_found):
 11 * UIProcess/API/efl/ewk_view.h:
 12 * UIProcess/API/efl/ewk_view_find_client.cpp: Added.
 13 (toEwkView):
 14 (didFindString):
 15 (ewk_view_find_client_attach):
 16 * UIProcess/API/efl/ewk_view_find_client_private.h: Added.
 17 * UIProcess/API/efl/ewk_view_private.h:
 18
1192012-07-15 Christophe Dumez <christophe.dumez@intel.com>
220
321 [EFL][WK2] Define destructors for Ewk structures

Source/WebKit2/PlatformEfl.cmake

@@LIST(APPEND WebKit2_SOURCES
4343 UIProcess/API/efl/ewk_url_request.cpp
4444 UIProcess/API/efl/ewk_url_response.cpp
4545 UIProcess/API/efl/ewk_view.cpp
 46 UIProcess/API/efl/ewk_view_find_client.cpp
4647 UIProcess/API/efl/ewk_view_loader_client.cpp
4748 UIProcess/API/efl/ewk_view_policy_client.cpp
4849 UIProcess/API/efl/ewk_view_resource_load_client.cpp

Source/WebKit2/UIProcess/API/efl/ewk_view.cpp

3131#include "ewk_context.h"
3232#include "ewk_context_private.h"
3333#include "ewk_intent_private.h"
 34#include "ewk_view_find_client_private.h"
3435#include "ewk_view_loader_client_private.h"
3536#include "ewk_view_policy_client_private.h"
3637#include "ewk_view_private.h"

@@Evas_Object* ewk_view_base_add(Evas* canvas, WKContextRef contextRef, WKPageGrou
503504 }
504505
505506 priv->pageClient = PageClientImpl::create(toImpl(contextRef), toImpl(pageGroupRef), ewkView);
 507 ewk_view_find_client_attach(toAPI(priv->pageClient->page()), ewkView);
506508 ewk_view_loader_client_attach(toAPI(priv->pageClient->page()), ewkView);
507509 ewk_view_policy_client_attach(toAPI(priv->pageClient->page()), ewkView);
508510 ewk_view_resource_load_client_attach(toAPI(priv->pageClient->page()), ewkView);

@@const char* ewk_view_title_get(const Evas_Object* ewkView)
680682
681683/**
682684 * @internal
 685 * The text was changed.
 686 *
 687 * Emits signal: "text,found" with count.
 688 */
 689void ewk_view_text_found(Evas_Object* ewkView, unsigned matchCount)
 690{
 691 evas_object_smart_callback_call(ewkView, "text,found", &matchCount);
 692}
 693
 694/**
 695 * @internal
683696 * The view title was changed by the frame loader.
684697 *
685698 * Emits signal: "title,changed" with pointer to new title string.

Source/WebKit2/UIProcess/API/efl/ewk_view.h

4141 * - "resource,request,new", const Ewk_Web_Resource_Request*: a resource request was initiated.
4242 * - "resource,request,response", Ewk_Web_Resource_Load_Response*: a response to a resource request was received.
4343 * - "resource,request,sent", const Ewk_Web_Resource_Request*: a resource request was sent.
 44 * - "text,found", unsigned*: text was found.
4445 * - "title,changed", const char*: title of the main frame was changed.
4546 */
4647

Source/WebKit2/UIProcess/API/efl/ewk_view_find_client.cpp

 1/*
 2 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27
 28#include "WKPage.h"
 29#include "ewk_view_find_client_private.h"
 30#include "ewk_view_private.h"
 31
 32static inline Evas_Object* toEwkView(const void* clientInfo)
 33{
 34 return static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
 35}
 36
 37static void didFindString(WKPageRef page, WKStringRef string, unsigned matchCount, const void* clientInfo)
 38{
 39 ewk_view_text_found(toEwkView(clientInfo), matchCount);
 40}
 41
 42void ewk_view_find_client_attach(WKPageRef pageRef, Evas_Object* ewkView)
 43{
 44 WKPageFindClient findClient;
 45 memset(&findClient, 0, sizeof(WKPageFindClient));
 46 findClient.version = kWKPageFindClientCurrentVersion;
 47 findClient.clientInfo = ewkView;
 48 findClient.didFindString = didFindString;
 49 WKPageSetPageFindClient(pageRef, &findClient);
 50}

Source/WebKit2/UIProcess/API/efl/ewk_view_find_client_private.h

 1/*
 2 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef ewk_view_find_client_private_h
 27#define ewk_view_find_client_private_h
 28
 29#include <Evas.h>
 30#include <WebKit2/WKBase.h>
 31
 32void ewk_view_find_client_attach(WKPageRef pageRef, Evas_Object* ewkView);
 33
 34#endif // ewk_view_find_client_private_h

Source/WebKit2/UIProcess/API/efl/ewk_view_private.h

@@void ewk_view_resource_load_finished(Evas_Object* ewkView, uint64_t resourceIden
5858void ewk_view_resource_load_initiated(Evas_Object* ewkView, uint64_t resourceIdentifier, Ewk_Web_Resource* resource, Ewk_Url_Request* request);
5959void ewk_view_resource_load_response(Evas_Object* ewkView, uint64_t resourceIdentifier, Ewk_Url_Response* response);
6060void ewk_view_resource_request_sent(Evas_Object* ewkView, uint64_t resourceIdentifier, Ewk_Url_Request* request, Ewk_Url_Response* redirectResponse);
 61void ewk_view_text_found(Evas_Object* ewkView, unsigned matchCount);
6162
6263Evas_Object* ewk_view_base_add(Evas* canvas, WKContextRef, WKPageGroupRef);
6364