Title: [176582] trunk/Source/WebKit/win
Revision
176582
Author
[email protected]
Date
2014-11-29 15:40:30 -0800 (Sat, 29 Nov 2014)

Log Message

Switch over to using WebVisitedLinkStore on Windows
https://bugs.webkit.org/show_bug.cgi?id=139103

Reviewed by Antti Koivisto.

* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::populateVisitedLinks):
* WebHistory.cpp:
(WebHistory::setOptionalSharedHistory):
(WebHistory::removeAllItems):
(WebHistory::setVisitedLinkTrackingEnabled):
(WebHistory::removeAllVisitedLinks):
(WebHistory::removeItemForURLString):
(WebHistory::addVisitedLinksToVisitedLinkStore):
(WebHistory::addVisitedLinksToPageGroup): Deleted.
* WebHistory.h:
* WebView.cpp:
(WebView::initWithFrame):

Modified Paths

Diff

Modified: trunk/Source/WebKit/win/ChangeLog (176581 => 176582)


--- trunk/Source/WebKit/win/ChangeLog	2014-11-29 22:52:58 UTC (rev 176581)
+++ trunk/Source/WebKit/win/ChangeLog	2014-11-29 23:40:30 UTC (rev 176582)
@@ -1,5 +1,26 @@
 2014-11-29  Anders Carlsson  <[email protected]>
 
+        Switch over to using WebVisitedLinkStore on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=139103
+
+        Reviewed by Antti Koivisto.
+
+        * WebCoreSupport/WebChromeClient.cpp:
+        (WebChromeClient::populateVisitedLinks):
+        * WebHistory.cpp:
+        (WebHistory::setOptionalSharedHistory):
+        (WebHistory::removeAllItems):
+        (WebHistory::setVisitedLinkTrackingEnabled):
+        (WebHistory::removeAllVisitedLinks):
+        (WebHistory::removeItemForURLString):
+        (WebHistory::addVisitedLinksToVisitedLinkStore):
+        (WebHistory::addVisitedLinksToPageGroup): Deleted.
+        * WebHistory.h:
+        * WebView.cpp:
+        (WebView::initWithFrame):
+
+2014-11-29  Anders Carlsson  <[email protected]>
+
         Another build fix.
 
         * WebHistory.cpp:

Modified: trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp (176581 => 176582)


--- trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp	2014-11-29 22:52:58 UTC (rev 176581)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp	2014-11-29 23:40:30 UTC (rev 176582)
@@ -637,17 +637,6 @@
 
 void WebChromeClient::populateVisitedLinks()
 {
-    COMPtr<IWebHistoryDelegate> historyDelegate;
-    m_webView->historyDelegate(&historyDelegate);
-    if (historyDelegate) {
-        historyDelegate->populateVisitedLinksForWebView(m_webView);
-        return;
-    }
-
-    WebHistory* history = WebHistory::sharedHistory();
-    if (!history)
-        return;
-    history->addVisitedLinksToPageGroup(m_webView->page()->group());
 }
 
 void WebChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser> prpFileChooser)

Modified: trunk/Source/WebKit/win/WebHistory.cpp (176581 => 176582)


--- trunk/Source/WebKit/win/WebHistory.cpp	2014-11-29 22:52:58 UTC (rev 176581)
+++ trunk/Source/WebKit/win/WebHistory.cpp	2014-11-29 23:40:30 UTC (rev 176582)
@@ -263,8 +263,8 @@
     if (sharedHistoryStorage() == history)
         return S_OK;
     sharedHistoryStorage().query(history);
-    PageGroup::setShouldTrackVisitedLinks(sharedHistoryStorage());
-    PageGroup::removeAllVisitedLinks();
+    WebVisitedLinkStore::setShouldTrackVisitedLinks(sharedHistoryStorage());
+    WebVisitedLinkStore::removeAllVisitedLinks();
     return S_OK;
 }
 
@@ -324,7 +324,7 @@
 
     m_entriesByURL.clear();
 
-    PageGroup::removeAllVisitedLinks();
+    WebVisitedLinkStore::removeAllVisitedLinks();
 
     return postNotification(kWebHistoryAllItemsRemovedNotification, userInfo.get());
 }
@@ -374,13 +374,13 @@
 
 HRESULT WebHistory::setVisitedLinkTrackingEnabled(BOOL visitedLinkTrackingEnabled)
 {
-    PageGroup::setShouldTrackVisitedLinks(visitedLinkTrackingEnabled);
+    WebVisitedLinkStore::setShouldTrackVisitedLinks(visitedLinkTrackingEnabled);
     return S_OK;
 }
 
 HRESULT WebHistory::removeAllVisitedLinks()
 {
-    PageGroup::removeAllVisitedLinks();
+    WebVisitedLinkStore::removeAllVisitedLinks();
     return S_OK;
 }
 
@@ -567,7 +567,7 @@
         return E_FAIL;
 
     if (!m_entriesByURL.size())
-        PageGroup::removeAllVisitedLinks();
+        WebVisitedLinkStore::removeAllVisitedLinks();
 
     return S_OK;
 }
@@ -584,9 +584,3 @@
     for (auto& url : m_entriesByURL.keys())
         visitedLinkStore.addVisitedLink(url);
 }
-
-void WebHistory::addVisitedLinksToPageGroup(PageGroup& group)
-{
-    for (auto& url : m_entriesByURL.keys())
-        group.addVisitedLinkHash(visitedLinkHash(url));
-}

Modified: trunk/Source/WebKit/win/WebHistory.h (176581 => 176582)


--- trunk/Source/WebKit/win/WebHistory.h	2014-11-29 22:52:58 UTC (rev 176581)
+++ trunk/Source/WebKit/win/WebHistory.h	2014-11-29 23:40:30 UTC (rev 176582)
@@ -112,7 +112,6 @@
     // WebHistory
     static WebHistory* sharedHistory();
     void visitedURL(const WebCore::URL&, const WTF::String& title, const WTF::String& httpMethod, bool wasFailure, bool increaseVisitCount);
-    void addVisitedLinksToPageGroup(WebCore::PageGroup&);
     void addVisitedLinksToVisitedLinkStore(WebVisitedLinkStore&);
 
     COMPtr<IWebHistoryItem> itemForURLString(const WTF::String&) const;

Modified: trunk/Source/WebKit/win/WebView.cpp (176581 => 176582)


--- trunk/Source/WebKit/win/WebView.cpp	2014-11-29 22:52:58 UTC (rev 176581)
+++ trunk/Source/WebKit/win/WebView.cpp	2014-11-29 23:40:30 UTC (rev 176582)
@@ -2803,6 +2803,7 @@
 #endif // ENABLE(INSPECTOR)
     configuration.loaderClientForMainFrame = new WebFrameLoaderClient;
     configuration.progressTrackerClient = static_cast<WebFrameLoaderClient*>(configuration.loaderClientForMainFrame);
+    configuration.visitedLinkStore = &WebVisitedLinkStore::shared();
 
     m_page = new Page(configuration);
     provideGeolocationTo(m_page, new WebGeolocationClient(this));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to