setTimeout patch

David Hyatt hyatt at apple.com
Mon Sep 29 13:09:56 CEST 2003


This patch makes sure we do an updateRendering after each timeout 
callback, so that animations don't drop updates.  This was a problem 
for us with small timeout values, since the scheduled relayout might 
not have time to happen before the next timeout fired.

Index: khtml/ecma/kjs_window.cpp
===================================================================
RCS file: /local/home/cvs/Labyrinth/WebCore/khtml/ecma/kjs_window.cpp,v
retrieving revision 1.85
diff -u -p -r1.85 khtml/ecma/kjs_window.cpp
--- khtml/ecma/kjs_window.cpp	2003/09/26 04:12:32	1.85
+++ khtml/ecma/kjs_window.cpp	2003/09/27 21:01:17
@@ -1578,6 +1578,10 @@ void ScheduledAction::execute(Window *wi
  #endif
  	  exec->clearException();
  	}
+
+	// Update our document's rendering following the execution of the 
timeout callback.
+	DOM::DocumentImpl *doc = 
static_cast<DOM::DocumentImpl*>(window->m_part->document().handle());
+	doc->updateRendering();
        }
      }
    }

BTW, I sent my repaint work so far to the list.  It's awaiting 
moderator approval, since the patch was 75K or so.

dave




More information about the Khtml-devel mailing list