Commit 043758d8 authored by darin's avatar darin
Browse files

WebCore:

	- fixed 3099240 -- REGRESSION: repro assert d->m_doc->parsing

	Don't force all redirects to be reloads, because the ones from JavaScript must
	not be. Maybe a better solution post-Alex-32 will be to pass a flag that distinguishes
	redirects from other location changes.

        * khtml/khtml_part.cpp: (KHTMLPart::slotRedirect): Don't ignore the anchor when
	comparing URLs to see if they should be a reload. We'll still do a reload if the URLs
	are actually equal, but if they differ in anchor we will just go to the anchor.
	This is the bug fix.

        * kwq/WebCoreBridge.h: Add reload parameter.
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge openURL:reload:headers:]): Stuff the reload
	parameter into the URLArgs.

WebKit:

	- fixed 3099240 -- REGRESSION: repro assert d->m_doc->parsing

	Make the reload flag pass across the bridge.

        * WebView.subproj/WebDataSourcePrivate.m: (-[WebDataSource _commitIfReady]):
	Pass a reload flag, based on the load type, to the bridge.
        * WebView.subproj/WebFramePrivate.m:
        (-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]): Pass a
	reload flag of NO in the anchor case. Preserve reload load types even when
	doing client redirects (have to talk with Trey about this tomorrow).


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3866e312
2002-11-14 Darin Adler <darin@apple.com>
- fixed 3099240 -- REGRESSION: repro assert d->m_doc->parsing
Don't force all redirects to be reloads, because the ones from JavaScript must
not be. Maybe a better solution post-Alex-32 will be to pass a flag that distinguishes
redirects from other location changes.
* khtml/khtml_part.cpp: (KHTMLPart::slotRedirect): Don't ignore the anchor when
comparing URLs to see if they should be a reload. We'll still do a reload if the URLs
are actually equal, but if they differ in anchor we will just go to the anchor.
This is the bug fix.
* kwq/WebCoreBridge.h: Add reload parameter.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge openURL:reload:headers:]): Stuff the reload
parameter into the URLArgs.
2002-11-14 Darin Adler <darin@apple.com>
 
- fixed 3100235 -- nil-deference in khtml::RenderTable at money.cnn.com
......
2002-11-14 Darin Adler <darin@apple.com>
- fixed 3099240 -- REGRESSION: repro assert d->m_doc->parsing
Don't force all redirects to be reloads, because the ones from JavaScript must
not be. Maybe a better solution post-Alex-32 will be to pass a flag that distinguishes
redirects from other location changes.
* khtml/khtml_part.cpp: (KHTMLPart::slotRedirect): Don't ignore the anchor when
comparing URLs to see if they should be a reload. We'll still do a reload if the URLs
are actually equal, but if they differ in anchor we will just go to the anchor.
This is the bug fix.
* kwq/WebCoreBridge.h: Add reload parameter.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge openURL:reload:headers:]): Stuff the reload
parameter into the URLArgs.
2002-11-14 Darin Adler <darin@apple.com>
 
- fixed 3100235 -- nil-deference in khtml::RenderTable at money.cnn.com
......
2002-11-14 Darin Adler <darin@apple.com>
- fixed 3099240 -- REGRESSION: repro assert d->m_doc->parsing
Don't force all redirects to be reloads, because the ones from JavaScript must
not be. Maybe a better solution post-Alex-32 will be to pass a flag that distinguishes
redirects from other location changes.
* khtml/khtml_part.cpp: (KHTMLPart::slotRedirect): Don't ignore the anchor when
comparing URLs to see if they should be a reload. We'll still do a reload if the URLs
are actually equal, but if they differ in anchor we will just go to the anchor.
This is the bug fix.
* kwq/WebCoreBridge.h: Add reload parameter.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge openURL:reload:headers:]): Stuff the reload
parameter into the URLArgs.
2002-11-14 Darin Adler <darin@apple.com>
 
- fixed 3100235 -- nil-deference in khtml::RenderTable at money.cnn.com
......
......@@ -1782,7 +1782,7 @@ void KHTMLPart::slotRedirect()
return;
}
KParts::URLArgs args;
if ( urlcmp( u, m_url.url(), true, true ) )
if ( urlcmp( u, m_url.url(), true, false ) )
args.reload = true;
args.setLockHistory( d->m_redirectLockHistory );
......
......@@ -94,7 +94,7 @@ enum FrameBorderStyle {
- (void)setParent:(WebCoreBridge *)parent;
- (void)openURL:(NSURL *)URL withHeaders:(NSDictionary *)headers;
- (void)openURL:(NSURL *)URL reload:(BOOL)reload headers:(NSDictionary *)headers;
- (void)addData:(NSData *)data withEncoding:(NSString *)encoding;
- (void)addData:(NSData *)data withOverrideEncoding:(NSString *)encoding;
- (void)closeURL;
......
......@@ -52,6 +52,8 @@
#import "WebCoreDOMPrivate.h"
using KParts::URLArgs;
using DOM::DocumentImpl;
using khtml::parseURL;
......@@ -108,15 +110,20 @@ using khtml::RenderPart;
_part->setParent([parent part]);
}
- (void)openURL:(NSURL *)URL withHeaders:(NSDictionary *)headers
- (void)openURL:(NSURL *)URL reload:(BOOL)reload headers:(NSDictionary *)headers
{
URLArgs args(_part->browserExtension()->urlArgs());
// reload
args.reload = reload;
// Content-Type
NSString *contentType = [headers objectForKey:@"Content-Type"];
if (contentType) {
KParts::URLArgs args(_part->browserExtension()->urlArgs());
args.serviceType = QString::fromNSString(contentType);
_part->browserExtension()->setURLArgs(args);
}
_part->browserExtension()->setURLArgs(args);
// URL
_part->openURL([[URL absoluteString] cString]);
......
2002-11-14 Darin Adler <darin@apple.com>
- fixed 3099240 -- REGRESSION: repro assert d->m_doc->parsing
Make the reload flag pass across the bridge.
* WebView.subproj/WebDataSourcePrivate.m: (-[WebDataSource _commitIfReady]):
Pass a reload flag, based on the load type, to the bridge.
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]): Pass a
reload flag of NO in the anchor case. Preserve reload load types even when
doing client redirects (have to talk with Trey about this tomorrow).
2002-11-14 Darin Adler <darin@apple.com>
 
- fixed 3100235 -- nil-deference in khtml::RenderTable at money.cnn.com
......
2002-11-14 Darin Adler <darin@apple.com>
- fixed 3099240 -- REGRESSION: repro assert d->m_doc->parsing
Make the reload flag pass across the bridge.
* WebView.subproj/WebDataSourcePrivate.m: (-[WebDataSource _commitIfReady]):
Pass a reload flag, based on the load type, to the bridge.
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]): Pass a
reload flag of NO in the anchor case. Preserve reload load types even when
doing client redirects (have to talk with Trey about this tomorrow).
2002-11-14 Darin Adler <darin@apple.com>
 
- fixed 3100235 -- nil-deference in khtml::RenderTable at money.cnn.com
......
......@@ -424,17 +424,18 @@ - (BOOL)_isCommitted
-(void)_commitIfReady
{
if (![self isDownloading] && _private->gotFirstByte && !_private->committed) {
WebFrameLoadType loadType = [[self webFrame] _loadType];
bool reload = loadType == WebFrameLoadTypeReload
|| loadType == WebFrameLoadTypeReloadAllowingStaleData;
NSDictionary *headers = [_private->response isKindOfClass:[WebHTTPResourceResponse class]]
? [(WebHTTPResourceResponse *)_private->response headers] : nil;
LOG(Loading, "committed resource = %@", [[self request] URL]);
_private->committed = TRUE;
[self _makeRepresentation];
[[self webFrame] _transitionToCommitted];
[[self _bridge] openURL:[_private->response URL]
withHeaders:[_private->response isKindOfClass:[WebHTTPResourceResponse class]]
? [(WebHTTPResourceResponse *)_private->response headers] : nil];
// Must do this after dataSourceChanged. makeRep installs a new view, which blows away
// scroll state, which is saved within _transitionToCommitted
[[self _bridge] openURL:[_private->response URL] reload:reload headers:headers];
}
}
......
......@@ -1080,7 +1080,7 @@ - (void)_loadURL:(NSURL *)URL loadType:(WebFrameLoadType)loadType triggeringEven
ASSERT(![_private previousItem]);
// will save form state to current item, since prevItem not set
[_private->bridge openURL:URL withHeaders:nil];
[_private->bridge openURL:URL reload:NO headers:nil];
[dataSrc _setURL:URL];
// NB: must happen after _setURL, since we add based on the current request
[self _addBackForwardItemClippedAtTarget:NO];
......@@ -1099,8 +1099,12 @@ - (void)_loadURL:(NSURL *)URL loadType:(WebFrameLoadType)loadType triggeringEven
[self _setLoadType:loadType];
if (_private->instantRedirectComing) {
_private->instantRedirectComing = NO;
// Inherit the loadType from the operation that spawned the redirect
[self _setLoadType:previousLoadType];
// Inherit the loadType from the operation that spawned the redirect,
// unless the new load type is some kind of reload.
if (loadType != WebFrameLoadTypeReload && loadType != WebFrameLoadTypeReloadAllowingStaleData) {
[self _setLoadType:previousLoadType];
}
// need to transfer BF items from the dataSource that we're replacing
WebDataSource *newDataSource = [self provisionalDataSource];
......
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