Skip to content
Permalink
Browse files
WebKit2: links don’t update to look visited
<rdar://problem/8806254>
https://bugs.webkit.org/show_bug.cgi?id=58252

Reviewed by Anders Carlsson.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::visitedLinkStateChanged):
(WebKit::WebProcess::allVisitedLinkStateChanged):
* WebProcess/WebProcess.h:
Remove use of vestigial sharedPageGroup and instead iterate set of
page groups in use by the process.



Canonical link: https://commits.webkit.org/73240@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
weinig committed Apr 11, 2011
1 parent f00abff commit 5a62f1d2f451c32b053ee7b3647d1e1f3dd7fb3f
Showing 3 changed files with 27 additions and 9 deletions.
@@ -1,3 +1,18 @@
2011-04-11 Sam Weinig <sam@webkit.org>

Reviewed by Anders Carlsson.

WebKit2: links don’t update to look visited
<rdar://problem/8806254>
https://bugs.webkit.org/show_bug.cgi?id=58252

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::visitedLinkStateChanged):
(WebKit::WebProcess::allVisitedLinkStateChanged):
* WebProcess/WebProcess.h:
Remove use of vestigial sharedPageGroup and instead iterate set of
page groups in use by the process.

2011-04-11 Brian Weinstein <bweinstein@apple.com>

Reviewed by Adam Roben.
@@ -271,20 +271,24 @@ void WebProcess::setVisitedLinkTable(const SharedMemory::Handle& handle)
m_visitedLinkTable.setSharedMemory(sharedMemory.release());
}

PageGroup* WebProcess::sharedPageGroup()
{
return PageGroup::pageGroup("WebKit2Group");
}

void WebProcess::visitedLinkStateChanged(const Vector<WebCore::LinkHash>& linkHashes)
{
for (size_t i = 0; i < linkHashes.size(); ++i)
Page::visitedStateChanged(sharedPageGroup(), linkHashes[i]);
// FIXME: We may want to track visited links per WebPageGroup rather than per WebContext.
for (size_t i = 0; i < linkHashes.size(); ++i) {
HashMap<uint64_t, RefPtr<WebPageGroupProxy> >::const_iterator it = m_pageGroupMap.begin();
HashMap<uint64_t, RefPtr<WebPageGroupProxy> >::const_iterator end = m_pageGroupMap.end();
for (; it != end; ++it)
Page::visitedStateChanged(PageGroup::pageGroup(it->second->identifier()), linkHashes[i]);
}
}

void WebProcess::allVisitedLinkStateChanged()
{
Page::allVisitedStateChanged(sharedPageGroup());
// FIXME: We may want to track visited links per WebPageGroup rather than per WebContext.
HashMap<uint64_t, RefPtr<WebPageGroupProxy> >::const_iterator it = m_pageGroupMap.begin();
HashMap<uint64_t, RefPtr<WebPageGroupProxy> >::const_iterator end = m_pageGroupMap.end();
for (; it != end; ++it)
Page::allVisitedStateChanged(PageGroup::pageGroup(it->second->identifier()));
}

bool WebProcess::isLinkVisited(LinkHash linkHash) const
@@ -99,7 +99,6 @@ class WebProcess : ChildProcess {

WebPageGroupProxy* webPageGroup(uint64_t pageGroupID);
WebPageGroupProxy* webPageGroup(const WebPageGroupData&);
static WebCore::PageGroup* sharedPageGroup();
#if PLATFORM(MAC)
pid_t presenterApplicationPid() const { return m_presenterApplicationPid; }
#endif

0 comments on commit 5a62f1d

Please sign in to comment.