2009-01-05 Darin Adler <darin@apple.com>
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Jan 2009 18:19:52 +0000 (18:19 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Jan 2009 18:19:52 +0000 (18:19 +0000)
        Reviewed by Anders Carlsson.

        Fix hang whenever following an anchor.

        * dom/Document.cpp:
        (WebCore::Document::findAnchor): Oops!

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39605 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/dom/Document.cpp

index bd9e0d9..6f7c203 100644 (file)
@@ -1,3 +1,12 @@
+2009-01-05  Darin Adler  <darin@apple.com>
+
+        Reviewed by Anders Carlsson.
+
+        Fix hang whenever following an anchor.
+
+        * dom/Document.cpp:
+        (WebCore::Document::findAnchor): Oops!
+
 2009-01-05  Alexey Proskuryakov  <ap@webkit.org>
 
         Reviewed by Darin Adler.
index 20980d6..a14b256 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*
  * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
  *           (C) 1999 Antti Koivisto (koivisto@kde.org)
  *           (C) 2001 Dirk Mueller (mueller@kde.org)
@@ -4357,7 +4357,7 @@ Element* Document::findAnchor(const String& name)
         return 0;
     if (Element* element = getElementById(name))
         return element;
-    for (Node* node = this; node; node = traverseNextNode()) {
+    for (Node* node = this; node; node = node->traverseNextNode()) {
         if (node->hasTagName(aTag)) {
             HTMLAnchorElement* anchor = static_cast<HTMLAnchorElement*>(node);
             if (inCompatMode()) {