Title: [118491] trunk/Source/WebKit/efl
Revision
118491
Author
[email protected]
Date
2012-05-25 01:00:35 -0700 (Fri, 25 May 2012)

Log Message

[EFL] API for PageGroup visited links hash populating
https://bugs.webkit.org/show_bug.cgi?id=86370

Patch by Mikhail Pozdnyakov <[email protected]> on 2012-05-25
Reviewed by Kenneth Rohde Christiansen.

Added "populate,visited,links" ewk_view signal that tells to the client managing
persistent history storage to fill the visited links cache.
Added API for the PageGroup visited links hash populating.

* WebCoreSupport/ChromeClientEfl.cpp:
(WebCore::ChromeClientEfl::populateVisitedLinks): Implementation added (sends notification).
(WebCore):
* WebCoreSupport/ChromeClientEfl.h:
(ChromeClientEfl):
* ewk/ewk_view.cpp:
(_Ewk_View_Private_Data):
(ewk_view_visited_link_add): PageGroup visited links hash populating.
* ewk/ewk_view.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/efl/ChangeLog (118490 => 118491)


--- trunk/Source/WebKit/efl/ChangeLog	2012-05-25 07:56:41 UTC (rev 118490)
+++ trunk/Source/WebKit/efl/ChangeLog	2012-05-25 08:00:35 UTC (rev 118491)
@@ -1,3 +1,24 @@
+2012-05-25  Mikhail Pozdnyakov  <[email protected]>
+
+        [EFL] API for PageGroup visited links hash populating
+        https://bugs.webkit.org/show_bug.cgi?id=86370
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Added "populate,visited,links" ewk_view signal that tells to the client managing
+        persistent history storage to fill the visited links cache.
+        Added API for the PageGroup visited links hash populating.
+
+        * WebCoreSupport/ChromeClientEfl.cpp:
+        (WebCore::ChromeClientEfl::populateVisitedLinks): Implementation added (sends notification).
+        (WebCore):
+        * WebCoreSupport/ChromeClientEfl.h:
+        (ChromeClientEfl):
+        * ewk/ewk_view.cpp:
+        (_Ewk_View_Private_Data):
+        (ewk_view_visited_link_add): PageGroup visited links hash populating.
+        * ewk/ewk_view.h:
+
 2012-05-24  Mikhail Pozdnyakov  <[email protected]>
 
         [EFL][DRT] LayoutTestController's setCacheModel() implementation

Modified: trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp (118490 => 118491)


--- trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp	2012-05-25 07:56:41 UTC (rev 118490)
+++ trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp	2012-05-25 08:00:35 UTC (rev 118491)
@@ -409,6 +409,11 @@
     ewk_security_origin_free(ewkOrigin);
 }
 
+void ChromeClientEfl::populateVisitedLinks()
+{
+    evas_object_smart_callback_call(m_view, "populate,visited,links", 0);
+}
+
 #if ENABLE(TOUCH_EVENTS)
 void ChromeClientEfl::needTouchEvents(bool needed)
 {

Modified: trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h (118490 => 118491)


--- trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h	2012-05-25 07:56:41 UTC (rev 118490)
+++ trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h	2012-05-25 08:00:35 UTC (rev 118491)
@@ -125,6 +125,8 @@
     virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
     virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t totalSpaceNeeded);
 
+    virtual void populateVisitedLinks();
+
 #if ENABLE(TOUCH_EVENTS)
     virtual void needTouchEvents(bool);
 #endif

Modified: trunk/Source/WebKit/efl/ewk/ewk_view.cpp (118490 => 118491)


--- trunk/Source/WebKit/efl/ewk/ewk_view.cpp	2012-05-25 07:56:41 UTC (rev 118490)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.cpp	2012-05-25 08:00:35 UTC (rev 118491)
@@ -47,6 +47,7 @@
 #include "JSLock.h"
 #include "LayoutTypes.h"
 #include "PageClientEfl.h"
+#include "PageGroup.h"
 #include "PlatformMouseEvent.h"
 #include "PopupMenuClient.h"
 #include "ProgressTracker.h"
@@ -1705,6 +1706,19 @@
     return priv->history;
 }
 
+Eina_Bool ewk_view_visited_link_add(Evas_Object* ewkView, const char* visitedUrl)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+
+    EINA_SAFETY_ON_NULL_RETURN_VAL(priv->page, false);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(priv->page->groupPtr(), false);
+
+    WebCore::KURL kurl(WebCore::KURL(), WTF::String::fromUTF8(visitedUrl));
+    priv->page->groupPtr()->addVisitedLink(kurl);
+    return true;
+}
+
 float ewk_view_zoom_get(const Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, -1.0);

Modified: trunk/Source/WebKit/efl/ewk/ewk_view.h (118490 => 118491)


--- trunk/Source/WebKit/efl/ewk/ewk_view.h	2012-05-25 07:56:41 UTC (rev 118490)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.h	2012-05-25 08:00:35 UTC (rev 118491)
@@ -73,6 +73,7 @@
  *  - "mixedcontent,run", void: any of the containing frames has loaded and run mixed content.
  *  - "protocolhandler,registration,requested", Ewk_Custom_Handler_Data: add a handler url for the given protocol.
  *  - "onload,event", Evas_Object*: a frame onload event has been received.
+ *  - "populate,visited,links": tells the client to fill the visited links set.
  *  - "ready", void: page is fully loaded.
  *  - "resource,request,new", Ewk_Frame_Resource_Request*: reports that
  *    there's a new resource request.
@@ -1101,6 +1102,19 @@
 EAPI Ewk_History *ewk_view_history_get(const Evas_Object *o);
 
 /**
+ * Adds @a visited_url to the view's visited links cache.
+ *
+ * This function is to be invoked by the client managing persistent history storage
+ * when "populate,visited,links" signal is received.
+ *
+ * @param o view object to add visited links data.
+ * @param visited_url visited url.
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
+ */
+EAPI Eina_Bool  ewk_view_visited_link_add(Evas_Object *o, const char *visited_url);
+
+/**
  * Gets the current page zoom level of the main frame.
  *
  * @param o view object to get the zoom level
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to