Commit bf7d82ff authored by trey's avatar trey

WebCore:

	3098388 - Pressing the back button goes back two levels at allmusic.com

	In support of the fix for this bug, WebCore passes khtml's lockHistory setting
	up through the bridge.

        Reviewed by Darin

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::redirectionTimerStartedOrStopped):  Pass it along.
        * kwq/WebCoreBridge.h:

WebKit:

	3098388 - Pressing the back button goes back two levels at allmusic.com

	I rewrote the logic we use to decide whether a given redirect should be
	treated as part of the previous navigation.  We make use of WebCore's
	lockHistory setting, the delay time and the frame state.

        Reviewed by Darin.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge reportClientRedirectToURL:delay:fireDate:lockHistory:]):
	Pass lockHistory up to the frame.
        * WebView.subproj/WebFramePrivate.h:
        * WebView.subproj/WebFramePrivate.m:
        (-[WebFrame _clientRedirectedTo:delay:fireDate:lockHistory:]):
	New logic.  No quick summary, best to read the code.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent fe1a76e0
2002-12-18 Trey Matteson <trey@apple.com>
3098388 - Pressing the back button goes back two levels at allmusic.com
In support of the fix for this bug, WebCore passes khtml's lockHistory setting
up through the bridge.
Reviewed by Darin
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::redirectionTimerStartedOrStopped): Pass it along.
* kwq/WebCoreBridge.h:
2002-12-18 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
......
2002-12-18 Trey Matteson <trey@apple.com>
3098388 - Pressing the back button goes back two levels at allmusic.com
In support of the fix for this bug, WebCore passes khtml's lockHistory setting
up through the bridge.
Reviewed by Darin
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::redirectionTimerStartedOrStopped): Pass it along.
* kwq/WebCoreBridge.h:
2002-12-18 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
......
......@@ -306,7 +306,8 @@ void KWQKHTMLPart::redirectionTimerStartedOrStopped()
if (d->m_redirectionTimer.isActive()) {
[_bridge reportClientRedirectToURL:d->m_redirectURL.getNSString()
delay:d->m_delayRedirect
fireDate:[d->m_redirectionTimer.getNSTimer() fireDate]];
fireDate:[d->m_redirectionTimer.getNSTimer() fireDate]
lockHistory:d->m_redirectLockHistory];
} else {
[_bridge reportClientRedirectCancelled];
}
......
......@@ -221,7 +221,7 @@ enum FrameBorderStyle {
- (void)objectLoadedFromCacheWithURL:(NSString *)URL response:(id)response size:(unsigned)bytes;
- (BOOL)isReloading;
- (void)reportClientRedirectToURL:(NSString *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date;
- (void)reportClientRedirectToURL:(NSString *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date lockHistory:(BOOL)lockHistory;
- (void)reportClientRedirectCancelled;
- (void)unfocusWindow;
......
2002-12-18 Trey Matteson <trey@apple.com>
3098388 - Pressing the back button goes back two levels at allmusic.com
I rewrote the logic we use to decide whether a given redirect should be
treated as part of the previous navigation. We make use of WebCore's
lockHistory setting, the delay time and the frame state.
Reviewed by Darin.
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge reportClientRedirectToURL:delay:fireDate:lockHistory:]):
Pass lockHistory up to the frame.
* WebView.subproj/WebFramePrivate.h:
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _clientRedirectedTo:delay:fireDate:lockHistory:]):
New logic. No quick summary, best to read the code.
2002-12-18 Chris Blumenberg <cblu@apple.com>
Reject the RealPlayer plug-in because we know it doesn't work.
......
......@@ -231,9 +231,9 @@ - (BOOL)isReloading
return [[[self dataSource] request] requestCachePolicy] == WebRequestCachePolicyLoadFromOrigin;
}
- (void)reportClientRedirectToURL:(NSString *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date
- (void)reportClientRedirectToURL:(NSString *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date lockHistory:(BOOL)lockHistory
{
[frame _clientRedirectedTo:[NSURL _web_URLWithString:URL] delay:seconds fireDate:date];
[frame _clientRedirectedTo:[NSURL _web_URLWithString:URL] delay:seconds fireDate:date lockHistory:lockHistory];
}
- (void)reportClientRedirectCancelled
......
......@@ -128,7 +128,7 @@ typedef enum {
- (void)_loadURL:(NSURL *)URL intoChild:(WebFrame *)childFrame;
- (void)_postWithURL:(NSURL *)URL data:(NSData *)data contentType:(NSString *)contentType triggeringEvent:(NSEvent *)event;
- (void)_clientRedirectedTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date;
- (void)_clientRedirectedTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date lockHistory:(BOOL)lockHistory;
- (void)_clientRedirectCancelled;
- (void)_textSizeMultiplierChanged;
......
......@@ -1497,17 +1497,31 @@ - (void)_postWithURL:(NSURL *)URL data:(NSData *)data contentType:(NSString *)co
[request release];
}
- (void)_clientRedirectedTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date
- (void)_clientRedirectedTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date lockHistory:(BOOL)lockHistory
{
LOG(Redirect, "Client redirect to: %@", URL);
[[[self controller] locationChangeDelegate] clientWillRedirectTo:URL delay:seconds fireDate:date forFrame:self];
// If a "quick" redirect comes in an, we set a special mode so we treat the next
// load as part of the same navigation.
// If we don't have a dataSource, we have no "original" load on which to base a redirect,
// so we better just treat the redirect as a normal load.
if (seconds <= 1.0 && [self dataSource]) {
_private->quickRedirectComing = YES;
if (![self dataSource]) {
// If we don't have a dataSource, we have no "original" load on which to base a redirect,
// so we better just treat the redirect as a normal load.
_private->quickRedirectComing = NO;
} else if (lockHistory) {
// meta-refresh, or another case WC thinks doens't need a b/f item
_private->quickRedirectComing = (seconds <= 1.0);
} else {
// a redirection stemming from a JS call
if ([[[self controller] mainFrame] _state] == WebFrameStateCompleting) {
// Happened as part of closing a doc, so it's part of an onload
// I think delay will always be zero, but it's fine to go with the <1 policy
_private->quickRedirectComing = (seconds <= 1.0);
} else {
// Some other JS action, perhaps handling a user event. Treat like a normal nav.
_private->quickRedirectComing = NO;
}
}
}
......
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