Populate visited links
https://bugs.webkit.org/show_bug.cgi?id=139101

Reviewed by Sam Weinig.

* History/WebHistory.mm:
(-[WebHistoryPrivate addVisitedLinksToVisitedLinkStore:]):
Helper function that adds all visited link to the given store.

(-[WebHistory _addVisitedLinksToVisitedLinkStore:]):
Call the private method.

* History/WebHistoryInternal.h:
* WebCoreSupport/WebVisitedLinkStore.h:
Add new members.

* WebCoreSupport/WebVisitedLinkStore.mm:
(WebVisitedLinkStore::addVisitedLink):
Get the characters from the URL string and hash them, then call addVisitedLinkHash.

(WebVisitedLinkStore::populateVisitedLinksIfNeeded):
Implement this. First try the delegate, then try the shared history.

(WebVisitedLinkStore::addVisitedLinkHash):
Factor code that adds the link to the hash table into a separate function.

* WebView/WebView.mm:
(-[WebView addVisitedLinks:]):
Add the visited links to the store.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176576 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add an EmptyVisitedLinkStore implementation
https://bugs.webkit.org/show_bug.cgi?id=139102

Reviewed by Sam Weinig.

* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients):
* loader/EmptyClients.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stub out more of WebVisitedLinkStore on Windows
https://bugs.webkit.org/show_bug.cgi?id=139098

Reviewed by Sam Weinig.

* WebCoreSupport/WebVisitedLinkStore.cpp:
(WebVisitedLinkStore::WebVisitedLinkStore):
Initialize m_visitedLinksPopulated to false.

(WebVisitedLinkStore::setShouldTrackVisitedLinks):
Update s_shouldTrackVisitedLinks and remove all visited links if needed.

(WebVisitedLinkStore::removeAllVisitedLinks):
Remove all hashes from our shared link store.

(WebVisitedLinkStore::addVisitedLink):
Compute the visited link hash and add it to the store.

(WebVisitedLinkStore::isLinkVisited):
Populate visited links and then look up the hash in our hash map.

(WebVisitedLinkStore::populateVisitedLinksIfNeeded):
Call out to the history delegate or populate visited links from shared history.

(WebVisitedLinkStore::addVisitedLinkHash):
Add the hash if we're tracking hashes.

(WebVisitedLinkStore::removeVisitedLinkHashes):
Clear the map.

* WebCoreSupport/WebVisitedLinkStore.h:
Add members.

* WebHistory.cpp:
(WebHistory::addVisitedLinksToVisitedLinkStore):
New function that adds visited links from the history to a given store.

* WebHistory.h:
Add new member.

* WebView.cpp:
(WebView::addVisitedLinks):
Add links to the visited link store as well.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix build.

* WebHistory.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Another build fix.

* WebHistory.cpp:
(WebHistory::addVisitedLinksToVisitedLinkStore):
(WebHistory::removeAllVisitedLinks): Deleted.
(WebHistory::setHistoryItemLimit): Deleted.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Another build fix.

* WebHistory.cpp:
(WebHistory::addVisitedLinksToVisitedLinkStore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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):

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