RESOLVED FIXED 6331
REGRESSION: form events don't fire after back/forward navigation, due to inconsistent load state
https://bugs.webkit.org/show_bug.cgi?id=6331
Summary REGRESSION: form events don't fire after back/forward navigation, due to inco...
Geoffrey Garen
Reported 2006-01-01 23:58:32 PST
Check out the attached reduction. The patch for 5518 caused this. I'm surprised Mitz didn't catch it; he must be slipping... :)
Attachments
reduction (966 bytes, application/octet-stream)
2006-01-01 23:59 PST, Geoffrey Garen
no flags
Fix (15.56 KB, patch)
2006-01-08 22:20 PST, Geoffrey Garen
darin: review+
Geoffrey Garen
Comment 1 2006-01-01 23:59:06 PST
Created attachment 5414 [details] reduction
Geoffrey Garen
Comment 2 2006-01-02 00:12:28 PST
Sorry, not 5518; rdar://problem/4268278.
Geoffrey Garen
Comment 3 2006-01-08 22:20:29 PST
Created attachment 5562 [details] Fix Darin had a look at a previous incarnation of this patch, but I think I've found a better way that is more in tune with the loader's natural behavior.
Geoffrey Garen
Comment 4 2006-01-08 22:22:01 PST
Comment on attachment 5562 [details] Fix The key to this new patch is: + } else if ([_private->subresourceLoaders count] > 0) { + // The main resource loader already finished loading. Set the cancelled error on the + // document and let the subresourceLoaders send individual cancelled messages below. + [self _setMainDocumentError:[self _cancelledError]]; } else { - // Main handle is already done. Set the cancelled error. - NSError *cancelledError = [NSError _webKitErrorWithDomain:NSURLErrorDomain - code:NSURLErrorCancelled - URL:[self _URL]]; - [self _setMainDocumentError:cancelledError]; + // If there are no resource loaders, we need to manufacture a cancelled message. + // (A back/forward navigation has no resource loaders because its resources are cached.) + [[self _webView] _mainReceivedError:[self _cancelledError] + fromDataSource:self + complete:YES]; }
Darin Adler
Comment 5 2006-01-09 09:05:30 PST
Comment on attachment 5562 [details] Fix I would write "Cancels the DataSource's pending loads" as "Cancels the data source's pending loads" (not important, just a comment in passing). This looks better than the earlier fix you had me review last week. r=me
Geoffrey Garen
Comment 6 2006-01-09 10:34:05 PST
Landed as revision 11963.
Note You need to log in before you can comment on or make changes to this bug.