Index: Source/core/dom/VisitedLinkState.cpp |
diff --git a/Source/core/dom/VisitedLinkState.cpp b/Source/core/dom/VisitedLinkState.cpp |
index 4f83485da0e3b3f8ea0b7109233123d8ff1d4bdd..8dde6d834e5e575aa50eaf94852c6bde4369c7dd 100644 |
--- a/Source/core/dom/VisitedLinkState.cpp |
+++ b/Source/core/dom/VisitedLinkState.cpp |
@@ -63,9 +63,9 @@ void VisitedLinkState::invalidateStyleForAllLinks() |
{ |
if (m_linksCheckedForVisitedState.isEmpty()) |
return; |
- for (Element* element = ElementTraversal::firstWithin(document()); element; element = ElementTraversal::next(*element)) { |
- if (element->isLink()) |
- element->setNeedsStyleRecalc(SubtreeStyleChange); |
+ for (Node* node = document().firstChild(); node; node = NodeTraversal::next(*node)) { |
+ if (node->isLink()) |
+ node->setNeedsStyleRecalc(SubtreeStyleChange); |
esprehn
2014/08/20 21:44:52
Note that this code is busted because it doesn't w
adamk
2014/08/20 21:48:45
This isn't newly-broken, right? The existing code
esprehn
2014/08/20 21:52:03
Correct, but there's an isElement() check inside t
|
} |
} |
@@ -73,9 +73,9 @@ void VisitedLinkState::invalidateStyleForLink(LinkHash linkHash) |
{ |
if (!m_linksCheckedForVisitedState.contains(linkHash)) |
return; |
- for (Element* element = ElementTraversal::firstWithin(document()); element; element = ElementTraversal::next(*element)) { |
- if (element->isLink() && linkHashForElement(*element) == linkHash) |
- element->setNeedsStyleRecalc(SubtreeStyleChange); |
+ for (Node* node = document().firstChild(); node; node = NodeTraversal::next(*node)) { |
+ if (node->isLink() && linkHashForElement(toElement(*node)) == linkHash) |
+ node->setNeedsStyleRecalc(SubtreeStyleChange); |
} |
} |