[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
rjw
rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:36:30 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit cd511c528b12a6e18bdff129330d88c1e4d0e535
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 5 23:18:46 2002 +0000
Added support for saving/restoring document state
in back/forward list.
* History.subproj/WebBackForwardList.m:
(-[WebBackForwardList addEntry:]):
* History.subproj/WebHistoryItem.h:
* History.subproj/WebHistoryItem.m:
(-[WebHistoryItem dealloc]):
(-[WebHistoryItem setLastVisitedDate:]):
(-[WebHistoryItem documentState]):
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge saveDocumentState:]):
(-[WebBridge documentState]):
* WebView.subproj/WebDataSourcePrivate.m:
(-[WebDataSource _startLoading:]):
Lookup post Jaguar CG SPI. Can now run and build
w/o patched CG.
* WebCoreSupport.subproj/WebTextRendererFactory.m:
Changed image links to drag file contents.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView mouseDragged:]):
Always call KHTMLPart::closeURL when a new document is loaded.
Added support for saving and restoring document state in
the back/forward list. Document state includes form data.
* khtml/khtml_part.cpp:
(KHTMLPart::openURL):
(KHTMLPart::closeURL):
(KHTMLPart::begin):
* kwq/KWQKHTMLPartImpl.h:
* kwq/KWQKHTMLPartImpl.mm:
(KWQKHTMLPartImpl::saveDocumentState):
(KWQKHTMLPartImpl::restoreDocumentState):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge saveDocumentState]):
(-[WebCoreBridge restoreDocumentState]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index ed2ce7e..ae005b0 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,23 @@
+2002-09-05 Richard Williamson (Local) <rjw at apple.com>
+
+ Always call KHTMLPart::closeURL when a new document is loaded.
+
+ Added support for saving and restoring document state in
+ the back/forward list. Document state includes form data.
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::openURL):
+ (KHTMLPart::closeURL):
+ (KHTMLPart::begin):
+ * kwq/KWQKHTMLPartImpl.h:
+ * kwq/KWQKHTMLPartImpl.mm:
+ (KWQKHTMLPartImpl::saveDocumentState):
+ (KWQKHTMLPartImpl::restoreDocumentState):
+ * kwq/WebCoreBridge.h:
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge saveDocumentState]):
+ (-[WebCoreBridge restoreDocumentState]):
+
2002-09-04 Darin Adler <darin at apple.com>
* WebCore.pbproj/project.pbxproj:
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index ed2ce7e..ae005b0 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,23 @@
+2002-09-05 Richard Williamson (Local) <rjw at apple.com>
+
+ Always call KHTMLPart::closeURL when a new document is loaded.
+
+ Added support for saving and restoring document state in
+ the back/forward list. Document state includes form data.
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::openURL):
+ (KHTMLPart::closeURL):
+ (KHTMLPart::begin):
+ * kwq/KWQKHTMLPartImpl.h:
+ * kwq/KWQKHTMLPartImpl.mm:
+ (KWQKHTMLPartImpl::saveDocumentState):
+ (KWQKHTMLPartImpl::restoreDocumentState):
+ * kwq/WebCoreBridge.h:
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge saveDocumentState]):
+ (-[WebCoreBridge restoreDocumentState]):
+
2002-09-04 Darin Adler <darin at apple.com>
* WebCore.pbproj/project.pbxproj:
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index ed2ce7e..ae005b0 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,23 @@
+2002-09-05 Richard Williamson (Local) <rjw at apple.com>
+
+ Always call KHTMLPart::closeURL when a new document is loaded.
+
+ Added support for saving and restoring document state in
+ the back/forward list. Document state includes form data.
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::openURL):
+ (KHTMLPart::closeURL):
+ (KHTMLPart::begin):
+ * kwq/KWQKHTMLPartImpl.h:
+ * kwq/KWQKHTMLPartImpl.mm:
+ (KWQKHTMLPartImpl::saveDocumentState):
+ (KWQKHTMLPartImpl::restoreDocumentState):
+ * kwq/WebCoreBridge.h:
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge saveDocumentState]):
+ (-[WebCoreBridge restoreDocumentState]):
+
2002-09-04 Darin Adler <darin at apple.com>
* WebCore.pbproj/project.pbxproj:
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index 1f4a85c..1e3b3d8 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -447,6 +447,10 @@ bool KHTMLPart::openURL( const KURL &url )
SLOT( slotRedirection(KIO::Job*,const KURL&) ) );
#endif // APPLE_CHANGES
+#ifdef APPLE_CHANGES
+ closeURL();
+#endif
+
d->m_bComplete = false;
d->m_bLoadEventEmitted = false;
@@ -492,6 +496,10 @@ bool KHTMLPart::openURL( const KURL &url )
bool KHTMLPart::closeURL()
{
+#ifdef APPLE_CHANGES
+ impl->saveDocumentState();
+#endif
+
if ( d->m_job )
{
KHTMLPageCache::self()->cancelEntry(d->m_cacheId);
@@ -508,6 +516,15 @@ bool KHTMLPart::closeURL()
d->m_doc->updateRendering();
d->m_bLoadEventEmitted = false;
}
+
+#define DEBUG_FORM_STATE
+#ifdef DEBUG_FORM_STATE
+ QStringList list = d->m_doc->docState();
+
+ printf ("URL: %s\n", m_url.url().ascii());
+ for (uint i = 0; i < list.count(); i++)
+ printf ("%s\n", list[i].ascii());
+#endif
}
d->m_bComplete = true; // to avoid emitting completed() in slotFinishedParsing() (David)
@@ -1378,6 +1395,11 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
#ifndef APPLE_CHANGES
d->m_doc->setRestoreState(args.docState);
#endif
+
+#ifdef APPLE_CHANGES
+ impl->restoreDocumentState();
+#endif
+
d->m_doc->open();
// clear widget
d->m_view->resizeContents( 0, 0 );
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index 3694a66..258c117 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -94,6 +94,9 @@ public:
void unfocusWindow();
+ void saveDocumentState();
+ void restoreDocumentState();
+
bool isFrameSet();
void jumpToSelection();
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 5a94c49..8b41637 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -636,3 +636,14 @@ NodeImpl *KWQKHTMLPartImpl::nodeForWidget(QWidget *widget)
{
return static_cast<const RenderWidget *>(widget->eventFilterObject())->element();
}
+
+
+void KWQKHTMLPartImpl::saveDocumentState()
+{
+ [_bridge saveDocumentState];
+}
+
+void KWQKHTMLPartImpl::restoreDocumentState()
+{
+ [_bridge restoreDocumentState];
+}
\ No newline at end of file
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.h b/WebCore/kwq/KWQKHTMLPartImpl.h
index 3694a66..258c117 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.h
+++ b/WebCore/kwq/KWQKHTMLPartImpl.h
@@ -94,6 +94,9 @@ public:
void unfocusWindow();
+ void saveDocumentState();
+ void restoreDocumentState();
+
bool isFrameSet();
void jumpToSelection();
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 5a94c49..8b41637 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -636,3 +636,14 @@ NodeImpl *KWQKHTMLPartImpl::nodeForWidget(QWidget *widget)
{
return static_cast<const RenderWidget *>(widget->eventFilterObject())->element();
}
+
+
+void KWQKHTMLPartImpl::saveDocumentState()
+{
+ [_bridge saveDocumentState];
+}
+
+void KWQKHTMLPartImpl::restoreDocumentState()
+{
+ [_bridge restoreDocumentState];
+}
\ No newline at end of file
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 15f3976..b0f7a0b 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -85,6 +85,8 @@ typedef khtml::RenderPart KHTMLRenderPart;
- (void)addData:(NSData *)data withEncoding:(NSString *)encoding;
- (void)addData:(NSData *)data withOverrideEncoding:(CFStringEncoding)encoding;
- (void)closeURL;
+- (void)saveDocumentState;
+- (void)restoreDocumentState;
- (void)end;
- (void)installInFrame:(NSView *)view;
@@ -183,6 +185,8 @@ typedef khtml::RenderPart KHTMLRenderPart;
- (BOOL)defersLoading;
- (void)setDefersLoading:(BOOL)loading;
+- (void)saveDocumentState: (NSArray *)documentState;
+- (NSArray *)documentState;
@end
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index ba3455c..a3e5445 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -122,6 +122,38 @@ using khtml::RenderPart;
part->closeURL();
}
+- (void)saveDocumentState
+{
+ DocumentImpl *doc = part->impl->document();
+ if (doc != 0){
+ QStringList list = doc->docState();
+ NSMutableArray *documentState = [[[NSMutableArray alloc] init] autorelease];
+
+ for (uint i = 0; i < list.count(); i++){
+ QString s = list[i];
+ [documentState addObject: [NSString stringWithCharacters: (const unichar *)s.unicode() length: s.length()]];
+ }
+ [self saveDocumentState: documentState];
+ }
+}
+
+- (void)restoreDocumentState
+{
+ DocumentImpl *doc = part->impl->document();
+
+ if (doc != 0){
+ NSArray *documentState = [self documentState];
+
+ QStringList s;
+ for (uint i = 0; i < [documentState count]; i++){
+ NSString *string = [documentState objectAtIndex: i];
+ s.append(QString::fromNSString(string));
+ }
+
+ doc->setRestoreState(s);
+ }
+}
+
- (void)end
{
part->end();
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index fe066f2..f5612b7 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,32 @@
+2002-09-05 Richard Williamson (Local) <rjw at apple.com>
+
+ Added support for saving/restoring document state
+ in back/forward list.
+
+ * History.subproj/WebBackForwardList.m:
+ (-[WebBackForwardList addEntry:]):
+ * History.subproj/WebHistoryItem.h:
+ * History.subproj/WebHistoryItem.m:
+ (-[WebHistoryItem dealloc]):
+ (-[WebHistoryItem setLastVisitedDate:]):
+ (-[WebHistoryItem documentState]):
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge saveDocumentState:]):
+ (-[WebBridge documentState]):
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSource _startLoading:]):
+
+
+ Lookup post Jaguar CG SPI. Can now run and build
+ w/o patched CG.
+
+ * WebCoreSupport.subproj/WebTextRendererFactory.m:
+
+ Changed image links to drag file contents.
+
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView mouseDragged:]):
+
2002-09-05 Ken Kocienda <kocienda at apple.com>
The WebError object has been removed from WebResourceHandle.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index fe066f2..f5612b7 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,32 @@
+2002-09-05 Richard Williamson (Local) <rjw at apple.com>
+
+ Added support for saving/restoring document state
+ in back/forward list.
+
+ * History.subproj/WebBackForwardList.m:
+ (-[WebBackForwardList addEntry:]):
+ * History.subproj/WebHistoryItem.h:
+ * History.subproj/WebHistoryItem.m:
+ (-[WebHistoryItem dealloc]):
+ (-[WebHistoryItem setLastVisitedDate:]):
+ (-[WebHistoryItem documentState]):
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge saveDocumentState:]):
+ (-[WebBridge documentState]):
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSource _startLoading:]):
+
+
+ Lookup post Jaguar CG SPI. Can now run and build
+ w/o patched CG.
+
+ * WebCoreSupport.subproj/WebTextRendererFactory.m:
+
+ Changed image links to drag file contents.
+
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView mouseDragged:]):
+
2002-09-05 Ken Kocienda <kocienda at apple.com>
The WebError object has been removed from WebResourceHandle.
diff --git a/WebKit/History.subproj/WebBackForwardList.m b/WebKit/History.subproj/WebBackForwardList.m
index 189f311..e5a946d 100644
--- a/WebKit/History.subproj/WebBackForwardList.m
+++ b/WebKit/History.subproj/WebBackForwardList.m
@@ -35,6 +35,7 @@
-(void)addEntry:(WebHistoryItem *)entry
{
+ printf ("addEntry %s\n", [[[entry URL] absoluteString] cString]);
// If the last entry matches this new entry, then replace it rather than adding
// a new one, since we are doing a reload.
if ([uriList count] > index) {
diff --git a/WebKit/History.subproj/WebHistoryItem.h b/WebKit/History.subproj/WebHistoryItem.h
index 12a2f8a..88bfd5f 100644
--- a/WebKit/History.subproj/WebHistoryItem.h
+++ b/WebKit/History.subproj/WebHistoryItem.h
@@ -16,6 +16,7 @@
NSCalendarDate *_lastVisitedDate;
NSPoint _scrollPoint;
NSString *anchor;
+ NSArray *_documentState;
BOOL _loadedIcon;
}
@@ -43,6 +44,8 @@
- (void)setDisplayTitle:(NSString *)displayTitle;
- (void)setLastVisitedDate:(NSCalendarDate *)date;
- (void)setScrollPoint: (NSPoint)p;
+- (void)setDocumentState: (NSArray *)state;
+- (NSArray *)documentState;
- (NSPoint)scrollPoint;
- (unsigned)hash;
- (BOOL)isEqual:(id)anObject;
diff --git a/WebKit/History.subproj/WebHistoryItem.m b/WebKit/History.subproj/WebHistoryItem.m
index 8182f5b..ec581ed 100644
--- a/WebKit/History.subproj/WebHistoryItem.m
+++ b/WebKit/History.subproj/WebHistoryItem.m
@@ -69,6 +69,7 @@
[_displayTitle release];
[_icon release];
[_lastVisitedDate release];
+ [_documentState release];
[super dealloc];
}
@@ -173,6 +174,18 @@
}
}
+- (void)setDocumentState: (NSArray *)state;
+{
+ [state retain];
+ [_documentState release];
+ _documentState = state;
+}
+
+- (NSArray *)documentState
+{
+ return _documentState;
+}
+
-(NSPoint)scrollPoint
{
return _scrollPoint;
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 7d80df3..e712e83 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -300,6 +300,22 @@
fromDataSource:[self dataSource]];
}
+- (void)saveDocumentState: (NSArray *)documentState
+{
+ WebHistoryItem *backItem;
+
+ backItem = [[[frame controller] backForwardList] backEntry];
+ [backItem setDocumentState: documentState];
+}
+
+- (NSArray *)documentState
+{
+ WebHistoryItem *currentItem;
+
+ currentItem = [[[frame controller] backForwardList] currentEntry];
+ return [currentItem documentState];
+}
+
- (void)addBackForwardItemWithURL:(NSURL *)URL anchor:(NSString *)anchor;
{
WebHistoryItem *backForwardItem;
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRendererFactory.m b/WebKit/WebCoreSupport.subproj/WebTextRendererFactory.m
index b841f97..5e1fea1 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRendererFactory.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRendererFactory.m
@@ -142,6 +142,9 @@
functionPtr (fontCache, false);
CGFontCacheRelease(fontCache);
}
+ else {
+ NSLog (@"Unable to disabling glyph auto expiration in CG. Performance will be degraded.\n");
+ }
}
WEBKIT_ASSERT([[self sharedFactory] isMemberOfClass:self]);
}
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index d558b9c..70c9e05 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -163,7 +163,7 @@
- (void)_startLoading: (BOOL)forceRefresh
{
WEBKIT_ASSERT ([self _isStopping] == NO);
-
+
[self _setPrimaryLoadComplete: NO];
WEBKIT_ASSERT ([self webFrame] != nil);
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index e053480..b438247 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -431,35 +431,35 @@
if(imageURL || linkURL){
[_private->draggedURL release];
- if (imageURL)
+ if (imageURL){
_private->draggedURL = imageURL;
- else if (linkURL)
+
+ NSArray *fileType = [NSArray arrayWithObject:[[_private->draggedURL path] pathExtension]];
+ NSRect rect = NSMakeRect(point.x + -16, point.y - 16, 32, 32);
+ [self dragPromisedFilesOfTypes: fileType fromRect: rect source: self slideBack: YES event: event];
+ }
+ else if (linkURL) {
_private->draggedURL = linkURL;
+ NSPasteboard *pasteboard = [NSPasteboard pasteboardWithName:NSDragPboard];
+
+ [pasteboard declareTypes:[NSArray arrayWithObject:NSURLPboardType] owner:nil];
+ [_private->draggedURL writeToPasteboard: pasteboard];
+ NSSize offset = WebIconSmallSize;
+ offset.width /= 2;
+ offset.height /= 2;
+ [self dragImage:[[WebIconDatabase sharedIconDatabase] defaultIconWithSize:WebIconSmallSize]
+ at:[self convertPoint:[event locationInWindow] fromView:nil]
+ offset:offset
+ event:event
+ pasteboard:pasteboard
+ source:self
+ slideBack:NO];
+ }
else
_private->draggedURL = nil;
[_private->draggedURL retain];
-#ifdef DRAG_FILES
- NSArray *fileType = [NSArray arrayWithObject:[[_private->draggedURL path] pathExtension]];
- NSRect rect = NSMakeRect(point.x + -16, point.y - 16, 32, 32);
- [self dragPromisedFilesOfTypes: fileType fromRect: rect source: self slideBack: YES event: event];
-#else
- NSPasteboard *pasteboard = [NSPasteboard pasteboardWithName:NSDragPboard];
-
- [pasteboard declareTypes:[NSArray arrayWithObject:NSURLPboardType] owner:nil];
- [_private->draggedURL writeToPasteboard: pasteboard];
- NSSize offset = WebIconSmallSize;
- offset.width /= 2;
- offset.height /= 2;
- [self dragImage:[[WebIconDatabase sharedIconDatabase] defaultIconWithSize:WebIconSmallSize]
- at:[self convertPoint:[event locationInWindow] fromView:nil]
- offset:offset
- event:event
- pasteboard:pasteboard
- source:self
- slideBack:NO];
-#endif
return;
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list