Changeset 94105 in webkit
- Timestamp:
- Aug 30, 2011 1:42:46 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r94104 r94105 1 2011-08-30 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> 2 3 Emit last progress notification before calling dispatchDidFinishLoad 4 https://bugs.webkit.org/show_bug.cgi?id=28851 5 6 Reviewed by Adam Barth. 7 8 Keep track of the order expected for the progressFinishedNotification, which is 9 before the didFinishLoadForFrame. 10 11 * http/tests/loading/progress-finished-callback-expected.txt: Added. 12 * http/tests/loading/progress-finished-callback.html: Added. 13 * platform/mac/Skipped: 14 * platform/win/Skipped: 15 1 16 2011-08-30 Ojan Vafai <ojan@chromium.org> 2 17 -
trunk/LayoutTests/platform/mac/Skipped
r94099 r94105 413 413 # Makes subsequent test crash 414 414 fast/loader/document-destruction-within-unload.html 415 416 # https://bugs.webkit.org/show_bug.cgi?id=66772 417 http/tests/loading/progress-finished-callback.html -
trunk/LayoutTests/platform/win/Skipped
r94046 r94105 1402 1402 # Need DRT change: https://bugs.webkit.org/show_bug.cgi?id=66620 1403 1403 editing/spelling/spelling-insert-html.html 1404 1405 # https://bugs.webkit.org/show_bug.cgi?id=66773 1406 http/tests/loading/progress-finished-callback.html -
trunk/Source/WebCore/ChangeLog
r94104 r94105 1 2011-08-30 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> 2 3 Emit last progress notification before calling dispatchDidFinishLoad 4 https://bugs.webkit.org/show_bug.cgi?id=28851 5 6 Reviewed by Adam Barth. 7 8 Original patch by Xan Lopez. Change FrameLoader to dispatch the notifications in 9 a more natural sequence. 10 11 Test: http/tests/loading/progress-finished-callback.html 12 13 * loader/FrameLoader.cpp: 14 (WebCore::FrameLoader::checkLoadCompleteForThisFrame): 15 1 16 2011-08-30 Ojan Vafai <ojan@chromium.org> 2 17 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r93521 r94105 2293 2293 return; 2294 2294 2295 if (Page* page = m_frame->page()) 2296 page->progress()->progressCompleted(m_frame); 2297 2295 2298 const ResourceError& error = dl->mainDocumentError(); 2296 2299 if (!error.isNull()) … … 2299 2302 m_client->dispatchDidFinishLoad(); 2300 2303 2301 if (Page* page = m_frame->page())2302 page->progress()->progressCompleted(m_frame);2303 2304 return; 2304 2305 } -
trunk/Source/WebKit/qt/ChangeLog
r94080 r94105 1 2011-08-30 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> 2 3 Emit last progress notification before calling dispatchDidFinishLoad 4 https://bugs.webkit.org/show_bug.cgi?id=28851 5 6 Reviewed by Adam Barth. 7 8 Add infrastructure to dump progressFinishedNotification callback in DRT. 9 10 * WebCoreSupport/DumpRenderTreeSupportQt.cpp: 11 (DumpRenderTreeSupportQt::dumpProgressFinishedCallback): 12 * WebCoreSupport/DumpRenderTreeSupportQt.h: 13 * WebCoreSupport/FrameLoaderClientQt.cpp: 14 (WebCore::FrameLoaderClientQt::postProgressFinishedNotification): 15 * WebCoreSupport/FrameLoaderClientQt.h: 16 1 17 2011-08-30 Kaustubh Atrawalkar <kaustubh@motorola.com> 2 18 -
trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
r93235 r94105 682 682 } 683 683 684 void DumpRenderTreeSupportQt::dumpProgressFinishedCallback(bool b) 685 { 686 FrameLoaderClientQt::dumpProgressFinishedCallback = b; 687 } 688 684 689 void DumpRenderTreeSupportQt::dumpUserGestureInFrameLoader(bool b) 685 690 { -
trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
r93235 r94105 164 164 165 165 static void dumpFrameLoader(bool b); 166 static void dumpProgressFinishedCallback(bool); 166 167 static void dumpUserGestureInFrameLoader(bool b); 167 168 static void dumpResourceLoadCallbacks(bool b); -
trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
r93066 r94105 171 171 172 172 bool FrameLoaderClientQt::dumpFrameLoaderCallbacks = false; 173 bool FrameLoaderClientQt::dumpProgressFinishedCallback = false; 173 174 bool FrameLoaderClientQt::dumpUserGestureInFrameLoaderCallbacks = false; 174 175 bool FrameLoaderClientQt::dumpResourceLoadCallbacks = false; … … 593 594 void FrameLoaderClientQt::postProgressFinishedNotification() 594 595 { 596 if (dumpProgressFinishedCallback) 597 printf("postProgressFinishedNotification\n"); 598 595 599 // Send a mousemove event to: 596 600 // (1) update the cursor to change according to whatever is underneath the mouse cursor right now; -
trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
r93066 r94105 248 248 249 249 static bool dumpFrameLoaderCallbacks; 250 static bool dumpProgressFinishedCallback; 250 251 static bool dumpUserGestureInFrameLoaderCallbacks; 251 252 static bool dumpResourceLoadCallbacks; -
trunk/Tools/ChangeLog
r94103 r94105 1 2011-08-30 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> 2 3 Emit last progress notification before calling dispatchDidFinishLoad 4 https://bugs.webkit.org/show_bug.cgi?id=28851 5 6 Reviewed by Adam Barth. 7 8 Implement dumpProgressFinishedCallback() in the layoutTestController for Qt, 9 Chromium and GTK ports. The first two were simple changes. 10 11 Some refactoring was needed in GTK port to assure that the dumps are emitted 12 correctly and the processing after the page load finished is in the right place. 13 14 To detect the load finished, we use the callback for the "load-status" notifier 15 signal of the top loading frame. And we use the deprecated "load-finished" signal 16 for dumping (if enabled) the progress finished expected output. 17 18 * DumpRenderTree/LayoutTestController.cpp: 19 (LayoutTestController::LayoutTestController): 20 (dumpProgressFinishedCallbackCallback): 21 (LayoutTestController::staticFunctions): 22 * DumpRenderTree/LayoutTestController.h: 23 (LayoutTestController::dumpProgressFinishedCallback): 24 (LayoutTestController::setDumpProgressFinishedCallback): 25 * DumpRenderTree/chromium/LayoutTestController.cpp: 26 (LayoutTestController::LayoutTestController): 27 (LayoutTestController::dumpProgressFinishedCallback): 28 (LayoutTestController::reset): 29 * DumpRenderTree/chromium/LayoutTestController.h: 30 (LayoutTestController::shouldDumpProgressFinishedCallback): 31 (LayoutTestController::setShouldDumpProgressFinishedCallback): 32 * DumpRenderTree/chromium/WebViewHost.cpp: 33 (WebViewHost::didStopLoading): 34 * DumpRenderTree/gtk/DumpRenderTree.cpp: 35 (webViewLoadFinished): 36 (topLoadingFrameLoadFinished): 37 (webFrameLoadStatusNotified): 38 * DumpRenderTree/qt/LayoutTestControllerQt.cpp: 39 (LayoutTestController::reset): 40 (LayoutTestController::dumpProgressFinishedCallback): 41 * DumpRenderTree/qt/LayoutTestControllerQt.h: 42 1 43 2011-08-30 Filip Pizlo <fpizlo@apple.com> 2 44 -
trunk/Tools/DumpRenderTree/LayoutTestController.cpp
r93319 r94105 57 57 , m_dumpEditingCallbacks(false) 58 58 , m_dumpFrameLoadCallbacks(false) 59 , m_dumpProgressFinishedCallback(false) 59 60 , m_dumpUserGestureInFrameLoadCallbacks(false) 60 61 , m_dumpHistoryDelegateCallbacks(false) … … 203 204 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 204 205 controller->setDumpFrameLoadCallbacks(true); 206 return JSValueMakeUndefined(context); 207 } 208 209 static JSValueRef dumpProgressFinishedCallbackCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 210 { 211 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 212 controller->setDumpProgressFinishedCallback(true); 205 213 return JSValueMakeUndefined(context); 206 214 } … … 2298 2306 { "dumpEditingCallbacks", dumpEditingCallbacksCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2299 2307 { "dumpFrameLoadCallbacks", dumpFrameLoadCallbacksCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2308 { "dumpProgressFinishedCallback", dumpProgressFinishedCallbackCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2300 2309 { "dumpUserGestureInFrameLoadCallbacks", dumpUserGestureInFrameLoadCallbacksCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2301 2310 { "dumpResourceLoadCallbacks", dumpResourceLoadCallbacksCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/Tools/DumpRenderTree/LayoutTestController.h
r92982 r94105 182 182 bool dumpFrameLoadCallbacks() const { return m_dumpFrameLoadCallbacks; } 183 183 void setDumpFrameLoadCallbacks(bool dumpFrameLoadCallbacks) { m_dumpFrameLoadCallbacks = dumpFrameLoadCallbacks; } 184 185 bool dumpProgressFinishedCallback() const { return m_dumpProgressFinishedCallback; } 186 void setDumpProgressFinishedCallback(bool dumpProgressFinishedCallback) { m_dumpProgressFinishedCallback = dumpProgressFinishedCallback; } 184 187 185 188 bool dumpUserGestureInFrameLoadCallbacks() const { return m_dumpUserGestureInFrameLoadCallbacks; } … … 370 373 bool m_dumpEditingCallbacks; 371 374 bool m_dumpFrameLoadCallbacks; 375 bool m_dumpProgressFinishedCallback; 372 376 bool m_dumpUserGestureInFrameLoadCallbacks; 373 377 bool m_dumpHistoryDelegateCallbacks; -
trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp
r93681 r94105 103 103 bindMethod("dumpEditingCallbacks", &LayoutTestController::dumpEditingCallbacks); 104 104 bindMethod("dumpFrameLoadCallbacks", &LayoutTestController::dumpFrameLoadCallbacks); 105 bindMethod("dumpProgressFinishedCallback", &LayoutTestController::dumpProgressFinishedCallback); 105 106 bindMethod("dumpUserGestureInFrameLoadCallbacks", &LayoutTestController::dumpUserGestureInFrameLoadCallbacks); 106 107 bindMethod("dumpResourceLoadCallbacks", &LayoutTestController::dumpResourceLoadCallbacks); … … 324 325 } 325 326 327 void LayoutTestController::dumpProgressFinishedCallback(const CppArgumentList&, CppVariant* result) 328 { 329 m_dumpProgressFinishedCallback = true; 330 result->setNull(); 331 } 332 326 333 void LayoutTestController::dumpUserGestureInFrameLoadCallbacks(const CppArgumentList&, CppVariant* result) 327 334 { … … 578 585 m_dumpEditingCallbacks = false; 579 586 m_dumpFrameLoadCallbacks = false; 587 m_dumpProgressFinishedCallback = false; 580 588 m_dumpUserGestureInFrameLoadCallbacks = false; 581 589 m_dumpResourceLoadCallbacks = false; -
trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h
r93681 r94105 95 95 96 96 // This function sets a flag that tells the test_shell to print a line of 97 // descriptive text for the progress finished callback. It takes no 98 // arguments, and ignores any that may be present. 99 void dumpProgressFinishedCallback(const CppArgumentList&, CppVariant*); 100 101 // This function sets a flag that tells the test_shell to print a line of 97 102 // user gesture status text for some frame load callbacks. It takes no 98 103 // arguments, and ignores any that may be present. … … 411 416 bool shouldDumpFrameLoadCallbacks() { return m_dumpFrameLoadCallbacks; } 412 417 void setShouldDumpFrameLoadCallbacks(bool value) { m_dumpFrameLoadCallbacks = value; } 418 bool shouldDumpProgressFinishedCallback() { return m_dumpProgressFinishedCallback; } 419 void setShouldDumpProgressFinishedCallback(bool value) { m_dumpProgressFinishedCallback = value; } 413 420 bool shouldDumpUserGestureInFrameLoadCallbacks() { return m_dumpUserGestureInFrameLoadCallbacks; } 414 421 void setShouldDumpUserGestureInFrameLoadCallbacks(bool value) { m_dumpUserGestureInFrameLoadCallbacks = value; } … … 543 550 bool m_dumpFrameLoadCallbacks; 544 551 552 // If true, the test_shell will output a descriptive line for the progress 553 // finished callback. 554 bool m_dumpProgressFinishedCallback; 555 545 556 // If true, the test_shell will output a line of the user gesture status 546 557 // text for some frame load callbacks. -
trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp
r92982 r94105 288 288 void WebViewHost::didStopLoading() 289 289 { 290 if (layoutTestController()->shouldDumpProgressFinishedCallback()) 291 fputs("postProgressFinishedNotification\n", stdout); 290 292 m_shell->setIsLoading(false); 291 293 } -
trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
r93338 r94105 778 778 static void webViewLoadFinished(WebKitWebView* view, WebKitWebFrame* frame, void*) 779 779 { 780 // The deprecated "load-finished" signal is triggered by postProgressFinishedNotification(), 781 // so we can use it here in the DRT to provide the correct dump. 780 782 if (frame != topLoadingFrame) 781 783 return; 782 783 topLoadingFrame = 0; 784 WorkQueue::shared()->setFrozen(true); // first complete load freezes the queue for the rest of this test 785 if (gLayoutTestController->waitToDump()) 786 return; 787 788 if (WorkQueue::shared()->count()) 789 g_timeout_add(0, processWork, 0); 790 else 791 dump(); 784 if (gLayoutTestController->dumpProgressFinishedCallback()) 785 printf("postProgressFinishedNotification\n"); 792 786 } 793 787 … … 1023 1017 } 1024 1018 1019 static void topLoadingFrameLoadFinished() 1020 { 1021 topLoadingFrame = 0; 1022 WorkQueue::shared()->setFrozen(true); // first complete load freezes the queue for the rest of this test 1023 if (gLayoutTestController->waitToDump()) 1024 return; 1025 1026 if (WorkQueue::shared()->count()) 1027 g_timeout_add(0, processWork, 0); 1028 else 1029 dump(); 1030 } 1031 1025 1032 static void webFrameLoadStatusNotified(WebKitWebFrame* frame, gpointer user_data) 1026 1033 { … … 1040 1047 break; 1041 1048 case WEBKIT_LOAD_FINISHED: 1042 if ( frame != topLoadingFrame ||!done)1049 if (!done) 1043 1050 printf("%s - didFinishLoadForFrame\n", frameName.get()); 1044 1051 break; … … 1047 1054 } 1048 1055 } 1056 1057 if ((loadStatus == WEBKIT_LOAD_FINISHED || loadStatus == WEBKIT_LOAD_FAILED) 1058 && frame == topLoadingFrame) 1059 topLoadingFrameLoadFinished(); 1049 1060 } 1050 1061 -
trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
r90856 r94105 77 77 DumpRenderTreeSupportQt::dumpEditingCallbacks(false); 78 78 DumpRenderTreeSupportQt::dumpFrameLoader(false); 79 DumpRenderTreeSupportQt::dumpProgressFinishedCallback(false); 79 80 DumpRenderTreeSupportQt::dumpUserGestureInFrameLoader(false); 80 81 DumpRenderTreeSupportQt::dumpResourceLoadCallbacks(false); … … 260 261 { 261 262 DumpRenderTreeSupportQt::dumpFrameLoader(true); 263 } 264 265 void LayoutTestController::dumpProgressFinishedCallback() 266 { 267 DumpRenderTreeSupportQt::dumpProgressFinishedCallback(true); 262 268 } 263 269 -
trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.h
r90856 r94105 113 113 void dumpEditingCallbacks(); 114 114 void dumpFrameLoadCallbacks(); 115 void dumpProgressFinishedCallback(); 115 116 void dumpUserGestureInFrameLoadCallbacks(); 116 117 void dumpResourceLoadCallbacks();
Note: See TracChangeset
for help on using the changeset viewer.