WebCore:
Reviewed by Mitz.
- fix regression test failures from the visited-link change
* WebCore.base.exp: Export PageGroup::setShouldTrackVisitedLinks.
* page/PageGroup.cpp:
(WebCore::PageGroup::addVisitedLink): Do nothing and return early
if shouldTrackVisitedLinks is false.
(WebCore::PageGroup::removeVisitedLinks): Reset m_visitedLinksPopulated
so the next time a link is queried this will be populated from history.
(WebCore::PageGroup::setShouldTrackVisitedLinks): Added.
* page/PageGroup.h: Added setShouldTrackVisitedLinks. This is global
for now, but it would be better if it was per-page-group instead.
WebKit/mac:
Reviewed by Mitz.
- fix regression test failures from the visited-link change
* History/WebHistory.mm:
(+[WebHistory setOptionalSharedHistory:]): Call PageGroup::setShouldTrackVisitedLinks
to turn off visited links if there is no history object. Also call
removeAllVisitedLinks so we can start over from scratch with the new history.
WebKit/win:
Reviewed by Mitz.
- fix regression test failures and crashes from the visited-link change
* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::populateVisitedLinks): Check for null before calling
addVisitedLinksToPageGroup.
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::updateGlobalHistory): Ditto.
* WebHistory.cpp:
(WebHistory::setOptionalSharedHistory): Call PageGroup::setShouldTrackVisitedLinks
to turn off visited links if there is no history object. Also call
removeAllVisitedLinks so we can start over from scratch with the new history.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
10 files changed