Changeset 53277 in webkit
- Timestamp:
- Jan 14, 2010 11:29:51 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r53274 r53277 8 8 * fast/frames/cached-frame-counter-expected.txt: Added. 9 9 * fast/frames/cached-frame-counter.html: Added. 10 11 2010-01-14 Adam Roben <aroben@apple.com> 12 13 Add tests that show that onload still fires in various situations with 14 subframes 15 16 Tests for <rdar://problem/7533333> <http://webkit.org/b/33533> 17 window.onload never fires if page contains an <iframe> with a bad 18 scheme or whose load is cancelled by returning null from resource load 19 delegate's willSendRequest 20 21 Reviewed by Brady Eidson. 22 23 * fast/loader/onload-bad-scheme-for-frame-expected.txt: Added. 24 * fast/loader/onload-bad-scheme-for-frame.html: Added. 25 Tests that onload still fires when a subframe with an unrecognized 26 scheme is in the page. 27 28 * fast/loader/onload-policy-ignore-for-frame-expected.txt: Added. 29 * fast/loader/onload-policy-ignore-for-frame.html: Added. 30 Tests that onload still fires when the policy delegate says to ignore 31 the initial load of a subframe. 32 33 * fast/loader/onload-willSendRequest-null-for-frame-expected.txt: Added. 34 * fast/loader/onload-willSendRequest-null-for-frame.html: Added. 35 Tests that onload still fires when the resource load delegate returns 36 null from willSendRequest for the initial load of a subframe. 37 38 * http/tests/loading/bad-scheme-subframe-expected.txt: Updated result 39 to show that we now fire onload for the main frame in this case. (This 40 is essentially the same as onload-bad-scheme-for-frame.html, but it 41 still seems useful to have that new, more explicit, test.) 10 42 11 43 2010-01-14 Adam Roben <aroben@apple.com> -
trunk/LayoutTests/http/tests/loading/bad-scheme-subframe-expected.txt
r30014 r53277 2 2 main frame - didCommitLoadForFrame 3 3 main frame - didFinishDocumentLoadForFrame 4 main frame - didHandleOnloadEventsForFrame 4 5 main frame - didFinishLoadForFrame 5 6 This is a test of load callbacks. It is only useful inside the regression test tool. -
trunk/WebCore/ChangeLog
r53276 r53277 1 2010-01-14 Adam Roben <aroben@apple.com> 2 3 Treat all synchronous loads equally in FrameLoader::loadSubframe 4 5 Only loads of the empty URL or about:blank were being treated as 6 synchronous loads. But other loads can be synchronous (e.g., when we 7 receive a null ResourceRequest from requestFromDelegate or when a 8 policy decision of "ignore" is made). We now treat those loads the 9 same way we treated empty URLs and about:blank. 10 11 Fixes <rdar://problem/7533333> <http://webkit.org/b/33533> 12 window.onload never fires if page contains an <iframe> with a bad 13 scheme or whose load is cancelled by returning null from resource load 14 delegate's willSendRequest 15 16 Tests: fast/loader/onload-bad-scheme-for-frame.html 17 fast/loader/onload-policy-ignore-for-frame.html 18 fast/loader/onload-willSendRequest-null-for-frame.html 19 20 Reviewed by Brady Eidson. 21 22 * loader/FrameLoader.cpp: 23 (WebCore::FrameLoader::loadSubframe): 24 - Detect synchronous loads by checking the subframe's loader's 25 state, rather than by checking its URL 26 - Removed unnecessary call to completed(), since checkCompleted() 27 will call completed() if needed (the call to completed() was added 28 first and wasn't removed when the call to checkCompleted() was 29 added in r8316) 30 - Added more comments about the strange thing this function does 31 with the subframe's loader 32 1 33 2010-01-14 Diego Gonzalez <diego.gonzalez@openbossa.org> 2 34 -
trunk/WebCore/loader/FrameLoader.cpp
r53171 r53277 404 404 } 405 405 406 // All new frames will have m_isComplete set to true at this point due to synchronously loading 407 // an empty document in FrameLoader::init(). But many frames will now be starting an 408 // asynchronous load of url, so we set m_isComplete to false and then check if the load is 409 // actually completed below. (Note that we set m_isComplete to false even for synchronous 410 // loads, so that checkCompleted() below won't bail early.) 411 // FIXME: Can we remove this entirely? m_isComplete normally gets set to false when a load is committed. 406 412 frame->loader()->m_isComplete = false; 407 413 … … 413 419 checkCallImplicitClose(); 414 420 421 // Some loads are performed synchronously (e.g., about:blank and loads 422 // cancelled by returning a null ResourceRequest from requestFromDelegate). 415 423 // In these cases, the synchronous load would have finished 416 424 // before we could connect the signals, so make sure to send the 417 // completed() signal for the child by hand 425 // completed() signal for the child by hand and mark the load as being 426 // complete. 418 427 // FIXME: In this case the Frame will have finished loading before 419 428 // it's being added to the child list. It would be a good idea to 420 429 // create the child first, then invoke the loader separately. 421 if (url.isEmpty() || url == blankURL()) { 422 frame->loader()->completed(); 430 if (frame->loader()->state() == FrameStateComplete) 423 431 frame->loader()->checkCompleted(); 424 }425 432 426 433 return frame.get(); -
trunk/WebKitTools/ChangeLog
r53275 r53277 1 2010-01-14 Adam Roben <aroben@apple.com> 2 3 Add LayoutTestController API to force 4 -webView:resource:willSendRequest:: to return null 5 6 Enables tests for <rdar://problem/7533333> <http://webkit.org/b/33533> 7 window.onload never fires if page contains an <iframe> with a bad 8 scheme or whose load is cancelled by returning null from resource load 9 delegate's willSendRequest 10 11 Reviewed by Brady Eidson. 12 13 * DumpRenderTree/LayoutTestController.cpp: 14 (LayoutTestController::LayoutTestController): Initialize new member. 15 (setWillSendRequestReturnsNullCallback): Call through to 16 LayoutTestController. 17 (LayoutTestController::staticFunctions): Added new function. 18 19 * DumpRenderTree/LayoutTestController.h: Added 20 m_willSendRequestReturnsNull. 21 (LayoutTestController::willSendRequestReturnsNull): 22 (LayoutTestController::setWillSendRequestReturnsNull): 23 Added standard accessors. 24 25 * DumpRenderTree/mac/ResourceLoadDelegate.mm: 26 (-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]): 27 * DumpRenderTree/win/ResourceLoadDelegate.cpp: 28 (ResourceLoadDelegate::willSendRequest): 29 Return null if LayoutTestController says to. 30 1 31 2010-01-14 Kevin Ollivier <kevino@theolliviers.com> 2 32 -
trunk/WebKitTools/DumpRenderTree/LayoutTestController.cpp
r51656 r53277 67 67 , m_testRepaintSweepHorizontally(false) 68 68 , m_waitToDump(false) 69 , m_willSendRequestReturnsNull(false) 69 70 , m_willSendRequestReturnsNullOnRedirect(false) 70 71 , m_windowIsKey(true) … … 908 909 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 909 910 controller->setUserStyleSheetLocation(path.get()); 911 912 return JSValueMakeUndefined(context); 913 } 914 915 static JSValueRef setWillSendRequestReturnsNullCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 916 { 917 // Has cross-platform implementation 918 if (argumentCount < 1) 919 return JSValueMakeUndefined(context); 920 921 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 922 controller->setWillSendRequestReturnsNull(JSValueToBoolean(context, arguments[0])); 910 923 911 924 return JSValueMakeUndefined(context); … … 1308 1321 { "setUserStyleSheetEnabled", setUserStyleSheetEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1309 1322 { "setUserStyleSheetLocation", setUserStyleSheetLocationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1323 { "setWillSendRequestReturnsNull", setWillSendRequestReturnsNullCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1310 1324 { "setWillSendRequestReturnsNullOnRedirect", setWillSendRequestReturnsNullOnRedirectCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1311 1325 { "setWindowIsKey", setWindowIsKeyCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/WebKitTools/DumpRenderTree/LayoutTestController.h
r51567 r53277 177 177 void waitToDumpWatchdogTimerFired(); 178 178 179 bool willSendRequestReturnsNull() const { return m_willSendRequestReturnsNull; } 180 void setWillSendRequestReturnsNull(bool returnsNull) { m_willSendRequestReturnsNull = returnsNull; } 181 179 182 bool willSendRequestReturnsNullOnRedirect() const { return m_willSendRequestReturnsNullOnRedirect; } 180 183 void setWillSendRequestReturnsNullOnRedirect(bool returnsNull) { m_willSendRequestReturnsNullOnRedirect = returnsNull; } … … 250 253 bool m_testRepaintSweepHorizontally; 251 254 bool m_waitToDump; // True if waitUntilDone() has been called, but notifyDone() has not yet been called. 255 bool m_willSendRequestReturnsNull; 252 256 bool m_willSendRequestReturnsNullOnRedirect; 253 257 bool m_windowIsKey; -
trunk/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm
r48363 r53277 130 130 } 131 131 132 if (!done && gLayoutTestController->willSendRequestReturnsNull()) 133 return nil; 134 132 135 if (!done && gLayoutTestController->willSendRequestReturnsNullOnRedirect() && redirectResponse) { 133 136 printf("Returning null for this redirect\n"); -
trunk/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp
r48374 r53277 244 244 } 245 245 246 if (!done && gLayoutTestController->willSendRequestReturnsNull()) { 247 *newRequest = 0; 248 return S_OK; 249 } 250 246 251 if (!done && gLayoutTestController->willSendRequestReturnsNullOnRedirect() && redirectResponse) { 247 252 printf("Returning null for this redirect\n");
Note: See TracChangeset
for help on using the changeset viewer.