+2008-01-05 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Alp Toker.
+
+ Fix hang in fast/frames/frame-display-none-focus.html during Gtk layout tests.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (processWork): Process pending work.
+ (webViewLoadFinished): Schedule processing of pending work.
+ * DumpRenderTree/gtk/WorkQueueItemGtk.cpp: Use webkit_web_frame_reload.
+
2008-01-05 Darin Adler <darin@apple.com>
* Scripts/do-webcore-rename: Some more renaming plans.
#include <JavaScriptCore/JSStringRef.h>
#include <JavaScriptCore/JSValueRef.h>
+#include <wtf/Assertions.h>
+
#include <cassert>
#include <getopt.h>
#include <stdlib.h>
topLoadingFrame = frame;
}
+static gboolean processWork(void* data)
+{
+ // quit doing work once a load is in progress
+ while (WorkQueue::shared()->count() > 0 && !topLoadingFrame) {
+ WorkQueueItem* item = WorkQueue::shared()->dequeue();
+ ASSERT(item);
+ item->invoke();
+ delete item;
+ }
+
+ // if we didn't start a new load, then we finished all the commands, so we're ready to dump state
+ if (!topLoadingFrame && !layoutTestController->waitToDump())
+ dump();
+
+ return FALSE;
+}
+
void webViewLoadFinished(WebKitWebView* view, WebKitWebFrame* frame, void*)
{
if (frame != topLoadingFrame)
return;
if (WorkQueue::shared()->count())
- fprintf(stderr, "FIXME: [self performSelector:@selector(processWork:) withObject:nil afterDelay:0];\n");
+ g_timeout_add(0, processWork, 0);
else
dump();
}
void ReloadItem::invoke() const
{
- // TODO: Why not just reload the frame?
- WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
- webkit_web_view_reload(webView);
+ webkit_web_frame_reload(mainFrame);
}
void ScriptItem::invoke() const