Use element iterators more
https://bugs.webkit.org/show_bug.cgi?id=126756

Reviewed by Anders Carlsson.

* dom/VisitedLinkState.cpp:
(WebCore::VisitedLinkState::invalidateStyleForAllLinks):
(WebCore::VisitedLinkState::invalidateStyleForLink):
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::renderMeter):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::renderProgress):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::ensureInsertionPointList):
* style/StyleResolveTree.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/html/HTMLProgressElement.cpp b/Source/WebCore/html/HTMLProgressElement.cpp
index 892eed7d..c877fbe 100644
--- a/Source/WebCore/html/HTMLProgressElement.cpp
+++ b/Source/WebCore/html/HTMLProgressElement.cpp
@@ -23,7 +23,7 @@
 #include "HTMLProgressElement.h"
 
 #include "Attribute.h"
-#include "ElementTraversal.h"
+#include "ElementIterator.h"
 #include "EventNames.h"
 #include "ExceptionCode.h"
 #include "HTMLNames.h"
@@ -75,7 +75,7 @@
 {
     if (renderer() && renderer()->isProgress())
         return toRenderProgress(renderer());
-    return toRenderProgress(ElementTraversal::firstWithin(userAgentShadowRoot())->renderer());
+    return toRenderProgress(descendantsOfType<Element>(*userAgentShadowRoot()).first()->renderer());
 }
 
 void HTMLProgressElement::parseAttribute(const QualifiedName& name, const AtomicString& value)