+2006-10-02 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Anders.
+
+ - fix crash on back/forward - reattach WebDocumentLoadState to data source when needed
+
+ * WebView/WebDataSource.m:
+ (-[WebDataSource _setWebFrame:]):
+ (-[WebDataSource _initWithDocumentLoadState:]):
+ * WebView/WebDataSourceInternal.h:
+
2006-10-02 Maciej Stachowiak <mjs@apple.com>
Build fix, not reviewed.
#import <WebKit/DOMHTML.h>
#import <WebKit/DOMPrivate.h>
#import <WebKitSystemInterface.h>
-#import "WebDocumentLoadState.h"
+#import "WebDocumentLoadStateMac.h"
@interface WebDataSourcePrivate : NSObject
{
@public
- WebDocumentLoadState *loadState;
+ WebDocumentLoadStateMac *loadState;
id <WebDocumentRepresentation> representation;
_private->webFrame = frame;
[_private->loadState setFrameLoader:[frame _frameLoader]];
+ if (frame)
+ [_private->loadState setDataSource:self];
[self _defersCallbacksChanged];
// no need to do _defersCallbacksChanged for subframes since they too
return _private->loadState;
}
-- (id)_initWithDocumentLoadState:(WebDocumentLoadState *)loadState
+- (id)_initWithDocumentLoadState:(WebDocumentLoadStateMac *)loadState
{
self = [super init];
if (!self) {
@class WebUnarchivingState;
@class WebView;
@class WebDocumentLoadState;
+@class WebDocumentLoadStateMac;
@protocol WebDocumentRepresentation;
- (void)_setLoading:(BOOL)loading;
- (void)_updateLoading;
- (WebDocumentLoadState *)_documentLoadState;
-- (id)_initWithDocumentLoadState:(WebDocumentLoadState *)loadState;
+- (id)_initWithDocumentLoadState:(WebDocumentLoadStateMac *)loadState;
@end