Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Unified Diff: third_party/WebKit/Source/core/dom/VisitedLinkState.cpp

Issue 1417943002: Load the table of visited links from database file asynchronously. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Load the table of visited links asynchronously and inform render about finish loading process. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/VisitedLinkState.cpp
diff --git a/third_party/WebKit/Source/core/dom/VisitedLinkState.cpp b/third_party/WebKit/Source/core/dom/VisitedLinkState.cpp
index c5b047572688d1c386bc72def282c520e34fa104..d69974341b38c51f99b7f2caffc2250923d832e1 100644
--- a/third_party/WebKit/Source/core/dom/VisitedLinkState.cpp
+++ b/third_party/WebKit/Source/core/dom/VisitedLinkState.cpp
@@ -59,13 +59,16 @@ VisitedLinkState::VisitedLinkState(const Document& document)
{
}
-void VisitedLinkState::invalidateStyleForAllLinks()
+void VisitedLinkState::invalidateStyleForAllLinks(bool invalidateVisitedLinkHashes)
{
if (m_linksCheckedForVisitedState.isEmpty())
return;
for (Node& node : NodeTraversal::startsAt(document().firstChild())) {
- if (node.isLink())
+ if (node.isLink()) {
+ if (invalidateVisitedLinkHashes && isHTMLAnchorElement(node))
brettw 2015/12/08 00:54:42 Although I'm in the root-level owners file, I'm no
+ toHTMLAnchorElement(node).invalidateCachedVisitedLinkHash();
node.setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::VisitedLink));
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698