[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 07:08:39 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 683c446f0dc5d7c68fcd0e8c809a291a6971f3f7
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 26 02:49:38 2002 +0000
i Added a debug menu to turn back/forward cache on and off.
Off by default. Use with discretion. Still leaks like
a sieve. Useful to provide a sense of potential speed up.
* Debug/DebugUtilities.m:
(-[DebugUtilities createDebugMenu]):
(-[BrowserDocument validate_showDOMTree:]):
(-[BrowserDocument toggleBackForwardEnabled:]):
Changes fro back/forward cache.
* History.subproj/WebHistoryItem.h:
* History.subproj/WebHistoryItem.m:
(+[WebHistoryItem setUsePageCache:]):
(+[WebHistoryItem usePageCache]):
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge saveDocumentToPageCache:]):
* WebView.subproj/WebFramePrivate.h:
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _detachFromParent]):
(-[WebFrame _canCachePage]):
(-[WebFrame _setState:]):
Tweaked some debugging info.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::~DocumentImpl):
(DocumentImpl::detach):
Added debugging info. Fixed property map save function.
* kjs/nodes.cpp:
(FunctionCallNode::evaluate):
* kjs/property_map.cpp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index db75b63..2402166 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,5 +1,13 @@
2002-11-25 Richard Williamson <rjw at apple.com>
+ Added debugging info. Fixed property map save function.
+
+ * kjs/nodes.cpp:
+ (FunctionCallNode::evaluate):
+ * kjs/property_map.cpp:
+
+2002-11-25 Richard Williamson <rjw at apple.com>
+
Changes for back/forward. Currently disabled.
* kjs/property_map.cpp:
diff --git a/JavaScriptCore/ChangeLog-2002-12-03 b/JavaScriptCore/ChangeLog-2002-12-03
index db75b63..2402166 100644
--- a/JavaScriptCore/ChangeLog-2002-12-03
+++ b/JavaScriptCore/ChangeLog-2002-12-03
@@ -1,5 +1,13 @@
2002-11-25 Richard Williamson <rjw at apple.com>
+ Added debugging info. Fixed property map save function.
+
+ * kjs/nodes.cpp:
+ (FunctionCallNode::evaluate):
+ * kjs/property_map.cpp:
+
+2002-11-25 Richard Williamson <rjw at apple.com>
+
Changes for back/forward. Currently disabled.
* kjs/property_map.cpp:
diff --git a/JavaScriptCore/ChangeLog-2003-10-25 b/JavaScriptCore/ChangeLog-2003-10-25
index db75b63..2402166 100644
--- a/JavaScriptCore/ChangeLog-2003-10-25
+++ b/JavaScriptCore/ChangeLog-2003-10-25
@@ -1,5 +1,13 @@
2002-11-25 Richard Williamson <rjw at apple.com>
+ Added debugging info. Fixed property map save function.
+
+ * kjs/nodes.cpp:
+ (FunctionCallNode::evaluate):
+ * kjs/property_map.cpp:
+
+2002-11-25 Richard Williamson <rjw at apple.com>
+
Changes for back/forward. Currently disabled.
* kjs/property_map.cpp:
diff --git a/JavaScriptCore/kjs/nodes.cpp b/JavaScriptCore/kjs/nodes.cpp
index e3fc7cc..7d44324 100644
--- a/JavaScriptCore/kjs/nodes.cpp
+++ b/JavaScriptCore/kjs/nodes.cpp
@@ -738,6 +738,10 @@ Value FunctionCallNode::evaluate(ExecState *exec)
Value v = ref.getValue(exec);
+ Object o = v.toObject(exec);
+ UString s = o.toString(exec);
+ //printf ("FunctionCallNode::evaluate %s\n", s.ascii());
+
if (v.type() != ObjectType) {
#ifndef NDEBUG
printInfo(exec, "WARNING: Failed function call attempt on", v, line);
diff --git a/JavaScriptCore/kjs/property_map.cpp b/JavaScriptCore/kjs/property_map.cpp
index bed7711..154c27c 100644
--- a/JavaScriptCore/kjs/property_map.cpp
+++ b/JavaScriptCore/kjs/property_map.cpp
@@ -185,12 +185,36 @@ ValueImp *PropertyMap::get(const Identifier &name) const
return 0;
}
+#ifdef DEBUG_PROPERTIES
+static void printAttributes(int attributes)
+{
+ if (attributes == 0)
+ printf ("None ");
+ if (attributes & ReadOnly)
+ printf ("ReadOnly ");
+ if (attributes & DontEnum)
+ printf ("DontEnum ");
+ if (attributes & DontDelete)
+ printf ("DontDelete ");
+ if (attributes & Internal)
+ printf ("Internal ");
+ if (attributes & Function)
+ printf ("Function ");
+}
+#endif
+
void PropertyMap::put(const Identifier &name, ValueImp *value, int attributes)
{
checkConsistency();
UString::Rep *rep = name._ustring.rep;
+#ifdef DEBUG_PROPERTIES
+ printf ("adding property %s, attributes = 0x%08x (", name.ascii(), attributes);
+ printAttributes(attributes);
+ printf (")\n");
+#endif
+
#if USE_SINGLE_ENTRY
if (!_table) {
UString::Rep *key = _singleEntry.key;
@@ -418,7 +442,8 @@ void PropertyMap::save(SavedProperties &p) const
#endif
} else {
for (int i = 0; i != _table->size; ++i)
- if (_table->entries[i].key && _table->entries[i].attributes == 0)
+ if (_table->entries[i].key && (_table->entries[i].attributes == 0 || _table->entries[i].attributes == (DontDelete | Internal)))
+ //if (_table->entries[i].key)
++count;
}
@@ -427,7 +452,9 @@ void PropertyMap::save(SavedProperties &p) const
p._properties = 0;
return;
}
+
p._properties = new SavedProperty [count];
+ p._count = count;
SavedProperty *prop = p._properties;
@@ -441,9 +468,11 @@ void PropertyMap::save(SavedProperties &p) const
#endif
} else {
for (int i = 0; i != _table->size; ++i) {
- if (_table->entries[i].key && _table->entries[i].attributes == 0) {
+ if (_table->entries[i].key && (_table->entries[i].attributes == 0 || _table->entries[i].attributes == (DontDelete | Internal))) {
+ //if (_table->entries[i].key) {
prop->key = Identifier(_table->entries[i].key);
prop->value = Value(_table->entries[i].value);
+ ++prop;
}
}
}
@@ -451,8 +480,9 @@ void PropertyMap::save(SavedProperties &p) const
void PropertyMap::restore(const SavedProperties &p)
{
- for (int i = 0; i != p._count; ++i)
+ for (int i = 0; i != p._count; ++i){
put(p._properties[i].key, p._properties[i].value.imp(), 0);
+ }
}
#if DO_CONSISTENCY_CHECK
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index ec45d08..f6e4f2a 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,11 @@
+2002-11-25 Richard Williamson <rjw at apple.com>
+
+ Tweaked some debugging info.
+
+ * khtml/xml/dom_docimpl.cpp:
+ (DocumentImpl::~DocumentImpl):
+ (DocumentImpl::detach):
+
2002-11-25 Chris Blumenberg <cblu at apple.com>
Use ^= to refer to OBJECTs with TYPEs that start with "image/". This is better than hard-coding image mime types.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index ec45d08..f6e4f2a 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,11 @@
+2002-11-25 Richard Williamson <rjw at apple.com>
+
+ Tweaked some debugging info.
+
+ * khtml/xml/dom_docimpl.cpp:
+ (DocumentImpl::~DocumentImpl):
+ (DocumentImpl::detach):
+
2002-11-25 Chris Blumenberg <cblu at apple.com>
Use ^= to refer to OBJECTs with TYPEs that start with "image/". This is better than hard-coding image mime types.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index ec45d08..f6e4f2a 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,11 @@
+2002-11-25 Richard Williamson <rjw at apple.com>
+
+ Tweaked some debugging info.
+
+ * khtml/xml/dom_docimpl.cpp:
+ (DocumentImpl::~DocumentImpl):
+ (DocumentImpl::detach):
+
2002-11-25 Chris Blumenberg <cblu at apple.com>
Use ^= to refer to OBJECTs with TYPEs that start with "image/". This is better than hard-coding image mime types.
diff --git a/WebCore/khtml/xml/dom_docimpl.cpp b/WebCore/khtml/xml/dom_docimpl.cpp
index 3da2eb2..a8a096c 100644
--- a/WebCore/khtml/xml/dom_docimpl.cpp
+++ b/WebCore/khtml/xml/dom_docimpl.cpp
@@ -325,7 +325,10 @@ DocumentImpl::~DocumentImpl()
if (m_focusNode)
m_focusNode->deref();
- delete m_renderArena;
+ if (m_renderArena){
+ delete m_renderArena;
+ m_renderArena = 0;
+ }
}
@@ -1005,6 +1008,7 @@ void DocumentImpl::detach()
{
#if APPLE_CHANGES
if (!m_inPageCache){
+ //printf ("detaching document\n");
#endif
RenderObject* render = m_render;
@@ -1018,10 +1022,15 @@ void DocumentImpl::detach()
m_view = 0;
- delete m_renderArena;
- m_renderArena = 0;
+ if (m_renderArena){
+ delete m_renderArena;
+ m_renderArena = 0;
+ }
#if APPLE_CHANGES
}
+ //else {
+ // printf ("not detaching document\n");
+ //}
#endif
}
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 1bfa5de..9098189 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,19 @@
+2002-11-25 Richard Williamson <rjw at apple.com>
+
+ Changes fro back/forward cache.
+
+ * History.subproj/WebHistoryItem.h:
+ * History.subproj/WebHistoryItem.m:
+ (+[WebHistoryItem setUsePageCache:]):
+ (+[WebHistoryItem usePageCache]):
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge saveDocumentToPageCache:]):
+ * WebView.subproj/WebFramePrivate.h:
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _detachFromParent]):
+ (-[WebFrame _canCachePage]):
+ (-[WebFrame _setState:]):
+
2002-11-25 Chris Blumenberg <cblu at apple.com>
Fixed 2 drag-related crashes. Oops.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 1bfa5de..9098189 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,19 @@
+2002-11-25 Richard Williamson <rjw at apple.com>
+
+ Changes fro back/forward cache.
+
+ * History.subproj/WebHistoryItem.h:
+ * History.subproj/WebHistoryItem.m:
+ (+[WebHistoryItem setUsePageCache:]):
+ (+[WebHistoryItem usePageCache]):
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge saveDocumentToPageCache:]):
+ * WebView.subproj/WebFramePrivate.h:
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _detachFromParent]):
+ (-[WebFrame _canCachePage]):
+ (-[WebFrame _setState:]):
+
2002-11-25 Chris Blumenberg <cblu at apple.com>
Fixed 2 drag-related crashes. Oops.
diff --git a/WebKit/History.subproj/WebHistoryItem.h b/WebKit/History.subproj/WebHistoryItem.h
index 38c1add..82618fe 100644
--- a/WebKit/History.subproj/WebHistoryItem.h
+++ b/WebKit/History.subproj/WebHistoryItem.h
@@ -69,4 +69,6 @@
- (BOOL)pageCacheEnabled;
- (void)setPageCacheEnabled: (BOOL)f;
- (NSMutableDictionary *)pageCache;
++ (void)setUsePageCache: (BOOL)f;
++ (BOOL)usePageCache;
@end
diff --git a/WebKit/History.subproj/WebHistoryItem.m b/WebKit/History.subproj/WebHistoryItem.m
index 95dec43..b20385a 100644
--- a/WebKit/History.subproj/WebHistoryItem.m
+++ b/WebKit/History.subproj/WebHistoryItem.m
@@ -413,4 +413,18 @@
{
return pageCache;
}
+
+// Off be default for now.
+static BOOL usePageCache = 0;
+
++ (void)setUsePageCache: (BOOL)f
+{
+ usePageCache = f;
+}
+
++ (BOOL)usePageCache
+{
+ return usePageCache;
+}
+
@end
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 340e696..ed73094 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -329,6 +329,7 @@
printf ("WebBridge saveDocumentToPageCache: not saving\n");
return false;
}
+ ASSERT ([[item pageCache] objectForKey: @"WebCorePageState"] == nil);
[[item pageCache] setObject: documentInfo forKey: @"WebCorePageState"];
printf ("WebBridge saveDocumentToPageCache: saving\n");
return true;
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index c68b3fe..fe08270 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -156,4 +156,7 @@ typedef enum {
- (void)_setJustOpenedForTargetedLink:(BOOL)justOpened;
+- (BOOL)_canCachePage;
+- (void)_purgePageCache;
+
@end
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index eb60d7a..f79e16c 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -250,6 +250,7 @@ static const char * const stateNames[] = {
[self stopLoading];
[self _saveScrollPositionToItem:[_private currentItem]];
+
[bridge closeURL];
[[self children] makeObjectsPerformSelector:@selector(_detachFromParent)];
@@ -532,7 +533,7 @@ static const char * const stateNames[] = {
- (BOOL)_canCachePage
{
- return NO;
+ return [WebHistoryItem usePageCache];
}
- (void)_purgePageCache
@@ -568,6 +569,22 @@ static const char * const stateNames[] = {
// but in the case where someone does, it means garbage outside
// the occupied part of the scroll view.
[[[self webView] frameScrollView] setDrawsBackground:NO];
+
+ // Cache the page, if possible.
+ if ([_private->bridge canCachePage] && [self _canCachePage] && [_private currentItem]){
+ if (![[_private currentItem] pageCache]){
+ NSLog (@"saving page cache for %@, %@", [self name], [[self dataSource] URL]);
+ [[_private currentItem] setPageCacheEnabled: YES];
+ [[self dataSource] _setStoredInPageCache: YES];
+ [[[_private currentItem] pageCache] setObject: [self dataSource] forKey: @"WebKitDataSource"];
+ [[[_private currentItem] pageCache] setObject: [[self webView] documentView] forKey: @"WebKitDocumentView"];
+ [_private->bridge saveDocumentToPageCache];
+ [self _purgePageCache];
+ }
+ else {
+ NSLog (@"already have page cache for %@, %@", [self name], [[self dataSource] URL]);
+ }
+ }
}
if (_private->state == WebFrameStateComplete) {
@@ -579,17 +596,6 @@ static const char * const stateNames[] = {
[_private->scheduledLayoutTimer fire];
ASSERT(_private->scheduledLayoutTimer == nil);
[_private setPreviousItem:nil];
-
- // Cache the page, if possible.
- if ([_private->bridge canCachePage] && [self _canCachePage]){
- LOG (PageCache, "enabling page cache for %@, %@", [self name], [[self dataSource] URL]);
- [[_private currentItem] setPageCacheEnabled: YES];
- [[self dataSource] _setStoredInPageCache: YES];
- [[[_private currentItem] pageCache] setObject: [self dataSource] forKey: @"WebKitDataSource"];
- [[[_private currentItem] pageCache] setObject: [[self webView] documentView] forKey: @"WebKitDocumentView"];
- [_private->bridge saveDocumentToPageCache];
- [self _purgePageCache];
- }
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list