2007-07-20 Ada Chan <adachan@apple.com>
authoradachan <adachan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jul 2007 23:35:21 +0000 (23:35 +0000)
committeradachan <adachan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jul 2007 23:35:21 +0000 (23:35 +0000)
        Reviewed by Darin and Adam.

        <rdar://problem/5338385> Fixed infinite loop in ScrollView::scrollRectIntoViewRecursively().
        Also removed an unused local variable.

        * platform/win/ScrollViewWin.cpp:
        (WebCore::ScrollView::scrollRectIntoViewRecursively):

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

WebCore/ChangeLog
WebCore/platform/win/ScrollViewWin.cpp

index e932c27abea902cb514346e9600c38546809aa09..470c8900b14745798c0fdb705ef99d077c2f3aa0 100644 (file)
@@ -1,3 +1,13 @@
+2007-07-20  Ada Chan  <adachan@apple.com>
+
+        Reviewed by Darin and Adam.
+
+        <rdar://problem/5338385> Fixed infinite loop in ScrollView::scrollRectIntoViewRecursively().
+        Also removed an unused local variable.
+
+        * platform/win/ScrollViewWin.cpp:
+        (WebCore::ScrollView::scrollRectIntoViewRecursively):
+
 2007-07-21  Antti  <antti@apple.com>
 
         Reviewed by Darin.
index 41e91a9b3d4a07efd7436d076c44dbdf2b35c778..b3f76401e9418ce75fc5fc7d0f2e99aa6fc32948 100644 (file)
@@ -342,11 +342,10 @@ void ScrollView::scrollRectIntoViewRecursively(const IntRect& r)
 {
     IntPoint p(max(0, r.x()), max(0, r.y()));
     ScrollView* view = this;
-    ScrollView* oldView = view;
     while (view) {
         view->setContentsPos(p.x(), p.y());
         p.move(view->x() - view->scrollOffset().width(), view->y() - view->scrollOffset().height());
-        view = static_cast<ScrollView*>(parent());
+        view = static_cast<ScrollView*>(view->parent());
     }
 }