Commit 715072f3 authored by bdakin's avatar bdakin

Reviewed by Darin, landed by Beth.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7693
          WebKit relies on unpredictable timing for onload events


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 53987a4c
2006-03-17 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin, landed by Beth.
- Test for http://bugzilla.opendarwin.org/show_bug.cgi?id=7693
WebKit relies on unpredictable timing for onload events
* fast/css/acid2-expected.txt:
* fast/events/onload-webkit-before-webcore-expected.txt: Added.
* fast/events/onload-webkit-before-webcore.html: Added.
2006-03-17 Adele Peterson <adele@apple.com>
Updated results for background color change.
......
......@@ -48,11 +48,12 @@ layer at (132,144) size 48x15
layer at (108,2686) size 96x12
RenderBlock (positioned) {BLOCKQUOTE} at (72,48) size 96x12 [border: none (24px solid #000000) none (24px solid #000000)]
RenderBlock (floating) {ADDRESS} at (24,0) size 48x12 [bgcolor=#FFFF00]
layer at (84,2710) size 144x30
layer at (84,2710) size 144x24
RenderBlock (positioned) {DIV} at (48,72) size 144x24 [bgcolor=#FF0000]
RenderBlock {DIV} at (0,0) size 144x0
RenderInline {OBJECT} at (0,0) size 90x14
RenderPartObject {OBJECT} at (54,0) size 90x30
RenderInline {OBJECT} at (0,0) size 131x14
RenderInline {OBJECT} at (0,0) size 131x14
RenderImage {OBJECT} at (13,0) size 131x24 [border: (12px solid #000000) none]
RenderBlock (floating) {DIV} at (0,0) size 144x24 [border: (12px solid #FF0000) none (12px solid #000000)]
RenderBlock {DIV} at (0,0) size 144x24 [border: (24px solid #FFFF00)]
layer at (84,2782) size 144x24
......
ALERT: This should be the first line.
This should be the second line. The first line should be an ALERT.
<script>layoutTestController.dumpAsText()</script>
<BODY onload="alert('This should be the first line.')">
This should be the second line. The first line should be an ALERT.
<iframe src="resources/aFileThatDoesNotExist"></iframe>
<!--
This tests for a regression against
http://bugzilla.opendarwin.org/show_bug.cgi?id=7693
WebKit relies on unpredictable timing for onload events
The body load event should be dispatched before the
WebFrame load delegate is sent the webView:didFinishLoadForFrame: message.
-->
</BODY>
2006-03-17 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin, landed by Beth.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7693
WebKit relies on unpredictable timing for onload events
* WebView/WebDataSource.m:
(-[WebDataSource _receivedMainResourceError:complete:]): Check for
completion on the WebCore side before checking on the WebKit side,
to ensure that the onload event is emitted before the WebFrame load
delegate is sent the webView:didFinishLoadForFrame: message. For
DumpRenderTree, this ensures that the render tree is dumped after
the onload handler is run.
* WebView/WebLoader.m:
(-[NSURLProtocol didFailWithError:]): If load has already been
cancelled (which could happen if the parent's onload handler caused
the frame to detach), do nothing.
2006-03-17 John Sullivan <sullivan@apple.com>
Reviewed by Beth Dakin
......
......@@ -666,11 +666,6 @@ - (void)_receivedMainResourceError:(NSError *)error complete:(BOOL)isComplete
// Retain the bridge because the stop may release the last reference to it.
[bridge retain];
[[self webFrame] _receivedMainResourceError:error];
[[self _webView] _mainReceivedError:error
fromDataSource:self
complete:isComplete];
if (isComplete) {
// FIXME: Don't want to do this if an entirely new load is going, so should check
// that both data sources on the frame are either self or nil.
......@@ -682,6 +677,11 @@ - (void)_receivedMainResourceError:(NSError *)error complete:(BOOL)isComplete
}
[bridge release];
[[self webFrame] _receivedMainResourceError:error];
[[self _webView] _mainReceivedError:error
fromDataSource:self
complete:isComplete];
}
- (void)_updateIconDatabaseWithURL:(NSURL *)iconURL
......
......@@ -579,6 +579,10 @@ - (void)didFinishLoading
- (void)didFailWithError:(NSError *)error
{
if (cancelledFlag) {
return;
}
ASSERT(!reachedTerminalState);
// retain/release self in this delegate method since the additional processing can do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment