Reverting autoscroll fix. I need to rework this a little.
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Oct 2006 05:18:36 +0000 (05:18 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Oct 2006 05:18:36 +0000 (05:18 +0000)
        * page/Frame.cpp:
        (WebCore::Frame::handleAutoscroll):
        (WebCore::Frame::autoscrollTimerFired):
        (WebCore::Frame::stopAutoscrollTimer):
        * page/Frame.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::~RenderLayer):
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::~RenderListBox):

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

WebCore/ChangeLog
WebCore/page/Frame.cpp
WebCore/page/Frame.h
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderListBox.cpp

index 8fb70c80e883e4bb2efc67a934d88f201940401f..96c8d6729d7cf7cbae1ea14ce782f203ac416482 100644 (file)
@@ -1,3 +1,17 @@
+2006-10-05  Adele Peterson  <adele@apple.com>
+
+        Reverting autoscroll fix.  I need to rework this a little.
+
+        * page/Frame.cpp:
+        (WebCore::Frame::handleAutoscroll):
+        (WebCore::Frame::autoscrollTimerFired):
+        (WebCore::Frame::stopAutoscrollTimer):
+        * page/Frame.h:
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::~RenderLayer):
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::~RenderListBox):
+
 2006-10-05  Alice  <alice.liu@apple.com>
 
         Reviewed by Adam.
index b090dc44f43b1775a470d6835e458ae0e903a6f3..bd14bd7571fee97198ec8a837c05abd60488aec1 100644 (file)
@@ -2858,7 +2858,7 @@ void Frame::handleAutoscroll(RenderObject* renderer)
 {
     if (d->m_autoscrollTimer.isActive())
         return;
-    setAutoscrollRenderer(renderer);
+    d->m_autoscrollRenderer = renderer;
     startAutoscrollTimer();
 }
 
@@ -2868,21 +2868,11 @@ void Frame::autoscrollTimerFired(Timer<Frame>*)
         stopAutoscrollTimer();
         return;
     }
-    if (RenderObject* r = autoscrollRenderer()) {
-        r->autoscroll();
+    if (d->m_autoscrollRenderer) {
+        d->m_autoscrollRenderer->autoscroll();
     } 
 }
 
-RenderObject* Frame::autoscrollRenderer() const
-{
-    return d->m_autoscrollRenderer;
-}
-
-void Frame::setAutoscrollRenderer(RenderObject* renderer)
-{
-    d->m_autoscrollRenderer = renderer;
-}
-
 RenderObject::NodeInfo Frame::nodeInfoAtPoint(const IntPoint& point, bool allowShadowContent)
 {
     RenderObject::NodeInfo nodeInfo(true, true);
@@ -2944,7 +2934,7 @@ void Frame::startAutoscrollTimer()
 
 void Frame::stopAutoscrollTimer()
 {
-    setAutoscrollRenderer(0);
+    d->m_autoscrollRenderer = 0;
     d->m_autoscrollTimer.stop();
 }
 
index 43b5babc0b14f68a8fc7d563e666a7efef0cefa9..03b2af2ec92093ceedce3b7ad0be8b4f2c2dda62 100644 (file)
@@ -743,12 +743,9 @@ private:
   
   void replaceContentsWithScriptResult(const KURL& url);
 
-  void disconnectOwnerElement();
+    void disconnectOwnerElement();
 
-  void setNeedsReapplyStyles();
-
-  void stopAutoscrollTimer();
-  RenderObject* autoscrollRenderer() const;
+    void setNeedsReapplyStyles();
 
 protected:
     virtual void startRedirectionTimer();
@@ -758,7 +755,7 @@ protected:
     
     void handleAutoscroll(RenderObject*);
     void startAutoscrollTimer();
-    void setAutoscrollRenderer(RenderObject*);
+    void stopAutoscrollTimer();
 
  private:
   void emitLoadEvent();
index beb16a8a377d4f08f9032a1b2589b16a40f14b08..d7e586214f18d9330c21aafed7fc3ce41d0b5f8f 100644 (file)
@@ -148,10 +148,6 @@ m_marquee(0)
 
 RenderLayer::~RenderLayer()
 {
-    // If this layer is being autoscrolled, stop the autoscroll timer
-    if (m_object && m_object->document() && m_object->document()->frame() && m_object->document()->frame()->autoscrollRenderer() == m_object)
-        m_object->document()->frame()->stopAutoscrollTimer();
-
     destroyScrollbar(HorizontalScrollbar);
     destroyScrollbar(VerticalScrollbar);
 
index 897409109a836dd1818d05601ce00399a865f513..6a0745161049adf352835c01e4cfce4bcb678e01 100644 (file)
@@ -61,10 +61,6 @@ RenderListBox::RenderListBox(HTMLSelectElement* element)
 
 RenderListBox::~RenderListBox()
 {
-    // If this list box is being autoscrolled, stop the autoscroll timer
-    if (document() && document()->frame() && document()->frame()->autoscrollRenderer() == this)
-        document()->frame()->stopAutoscrollTimer();
-
     if (m_vBar && m_vBar->isWidget()) {
         element()->document()->view()->removeChild(static_cast<PlatformScrollbar*>(m_vBar));
         m_vBar->deref();