[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:30:43 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 1a64f5694d39c793982398d9c44cd0018827334d
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Aug 10 18:24:33 2002 +0000
WebFoundation:
Added a new constant WebResourceHandleUseCachedObjectIfPresent.
This constant is used during reload so that a cached object
is returned regardless of its expiration.
* CacheLoader.subproj/WebCacheLoaderConstants.h: Added constant.
* CacheLoader.subproj/WebHTTPProtocolHandlerPrivate.m:
(-[WebHTTPProtocolHandler testAndSetCacheObjectState:]): Added check for new
WebResourceHandleUseCachedObjectIfPresent constant.
* CacheLoader.subproj/WebResourceLoad.m:
Also added a change to improve the percentage of cache hits:
(-[WebResourceLoad succeeded]): Use originalURL for caching. This will mean that
the cache is checked for what the user typed in, or has in their bookmarks. This
improves cache hits quite a bit.
WebCore:
Added an extra function which checks with WebKit to see if
the load is a reload. If it is, the WebCore cache is bypassed.
* khtml/misc/loader.cpp:
(DocLoader::requestImage): Added acall to new KWQCheckIfReloading function.
(DocLoader::requestStyleSheet): Ditto.
(DocLoader::requestScript): Ditto.
* kwq/KWQLoaderImpl.h:
* kwq/KWQLoaderImpl.mm:
(KWQCheckIfReloading): New function which checks with WebKit to see if the load is a reload.
* kwq/WebCoreBridge.h:
WebKit:
Added support for "stale mode" (loads triggered by use of back/forward), and
added support for reload.
Also added a bridge function so the WebCore cache can tell if a load is a reload.
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge dataSourceIsReloading]): New method.
* WebCoreSupport.subproj/WebSubresourceClient.m:
(+[WebSubresourceClient startLoadingResource:withURL:dataSource:]): Use same flags that were used for main resource load.
* WebView.subproj/WebDataSource.h:
* WebView.subproj/WebDataSource.m:
(-[WebDataSource attributes]): New accessor.
(-[WebDataSource flags]): New accessor.
* WebView.subproj/WebFrame.m:
(-[WebFrame reload:]): Reload adds WebResourceHandleFlagLoadFromOrigin flag to load.
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _goToItem:withFrameLoadType:]): Adds flags so that WebFoundation can tell when back/forward
has been used.
WebBrowser:
Fix for this bug:
Radar 2870727 ("Refresh" in Alexander doesn't bypass cache)
* BrowserDocument.m:
(-[BrowserDocument _goToURL:withFrameLoadType:fallbackURLs:]): Removed
code that prevented the call through to reload from being called, now
that I have hooked up the code so that reload is handled properly.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 1fb05e9..68187c7 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,17 @@
+2002-08-10 Ken Kocienda <kocienda at apple.com>
+
+ Added an extra function which checks with WebKit to see if
+ the load is a reload. If it is, the WebCore cache is bypassed.
+
+ * khtml/misc/loader.cpp:
+ (DocLoader::requestImage): Added acall to new KWQCheckIfReloading function.
+ (DocLoader::requestStyleSheet): Ditto.
+ (DocLoader::requestScript): Ditto.
+ * kwq/KWQLoaderImpl.h:
+ * kwq/KWQLoaderImpl.mm:
+ (KWQCheckIfReloading): New function which checks with WebKit to see if the load is a reload.
+ * kwq/WebCoreBridge.h:
+
2002-08-09 Darin Adler <darin at apple.com>
* force-clean-timestamp: JavaScriptCore headers changed that require a full build here.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 1fb05e9..68187c7 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,17 @@
+2002-08-10 Ken Kocienda <kocienda at apple.com>
+
+ Added an extra function which checks with WebKit to see if
+ the load is a reload. If it is, the WebCore cache is bypassed.
+
+ * khtml/misc/loader.cpp:
+ (DocLoader::requestImage): Added acall to new KWQCheckIfReloading function.
+ (DocLoader::requestStyleSheet): Ditto.
+ (DocLoader::requestScript): Ditto.
+ * kwq/KWQLoaderImpl.h:
+ * kwq/KWQLoaderImpl.mm:
+ (KWQCheckIfReloading): New function which checks with WebKit to see if the load is a reload.
+ * kwq/WebCoreBridge.h:
+
2002-08-09 Darin Adler <darin at apple.com>
* force-clean-timestamp: JavaScriptCore headers changed that require a full build here.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 1fb05e9..68187c7 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,17 @@
+2002-08-10 Ken Kocienda <kocienda at apple.com>
+
+ Added an extra function which checks with WebKit to see if
+ the load is a reload. If it is, the WebCore cache is bypassed.
+
+ * khtml/misc/loader.cpp:
+ (DocLoader::requestImage): Added acall to new KWQCheckIfReloading function.
+ (DocLoader::requestStyleSheet): Ditto.
+ (DocLoader::requestScript): Ditto.
+ * kwq/KWQLoaderImpl.h:
+ * kwq/KWQLoaderImpl.mm:
+ (KWQCheckIfReloading): New function which checks with WebKit to see if the load is a reload.
+ * kwq/WebCoreBridge.h:
+
2002-08-09 Darin Adler <darin at apple.com>
* force-clean-timestamp: JavaScriptCore headers changed that require a full build here.
diff --git a/WebCore/khtml/misc/loader.cpp b/WebCore/khtml/misc/loader.cpp
index 6c781cb..6e5fe48 100644
--- a/WebCore/khtml/misc/loader.cpp
+++ b/WebCore/khtml/misc/loader.cpp
@@ -981,6 +981,12 @@ CachedImage *DocLoader::requestImage( const DOM::DOMString &url)
KURL fullURL = m_doc->completeURL( url.string() );
if ( m_part && m_part->onlyLocalReferences() && fullURL.protocol() != "file") return 0;
+#ifdef APPLE_CHANGES
+ if (KWQCheckIfReloading(this)) {
+ setCachePolicy(KIO::CC_Reload);
+ }
+#endif
+
bool reload = needReload(fullURL);
#ifdef APPLE_CHANGES
@@ -997,6 +1003,12 @@ CachedCSSStyleSheet *DocLoader::requestStyleSheet( const DOM::DOMString &url, co
KURL fullURL = m_doc->completeURL( url.string() );
if ( m_part && m_part->onlyLocalReferences() && fullURL.protocol() != "file") return 0;
+#ifdef APPLE_CHANGES
+ if (KWQCheckIfReloading(this)) {
+ setCachePolicy(KIO::CC_Reload);
+ }
+#endif
+
bool reload = needReload(fullURL);
#ifdef APPLE_CHANGES
@@ -1013,6 +1025,12 @@ CachedScript *DocLoader::requestScript( const DOM::DOMString &url, const QString
KURL fullURL = m_doc->completeURL( url.string() );
if ( m_part && m_part->onlyLocalReferences() && fullURL.protocol() != "file") return 0;
+#ifdef APPLE_CHANGES
+ if (KWQCheckIfReloading(this)) {
+ setCachePolicy(KIO::CC_Reload);
+ }
+#endif
+
bool reload = needReload(fullURL);
#ifdef APPLE_CHANGES
diff --git a/WebCore/kwq/KWQLoader.h b/WebCore/kwq/KWQLoader.h
index 042381a..735b4b4 100644
--- a/WebCore/kwq/KWQLoader.h
+++ b/WebCore/kwq/KWQLoader.h
@@ -36,3 +36,4 @@ namespace KIO {
bool KWQServeRequest(khtml::Loader *, khtml::Request *, KIO::TransferJob *);
void KWQCheckCacheObjectStatus(khtml::DocLoader *, khtml::CachedObject *);
+bool KWQCheckIfReloading(khtml::DocLoader *loader);
\ No newline at end of file
diff --git a/WebCore/kwq/KWQLoader.mm b/WebCore/kwq/KWQLoader.mm
index eda3d28..5723c39 100644
--- a/WebCore/kwq/KWQLoader.mm
+++ b/WebCore/kwq/KWQLoader.mm
@@ -123,6 +123,12 @@ bool KWQServeRequest(Loader *loader, Request *request, TransferJob *job)
return true;
}
+bool KWQCheckIfReloading(DocLoader *loader)
+{
+ WebCoreBridge *bridge = ((KHTMLPart *)loader->part())->impl->getBridge();
+ return [bridge dataSourceIsReloading];
+}
+
void KWQCheckCacheObjectStatus(DocLoader *loader, CachedObject *cachedObject)
{
// Return from the function for objects that we didn't load from the cache.
diff --git a/WebCore/kwq/KWQLoaderImpl.h b/WebCore/kwq/KWQLoaderImpl.h
index 042381a..735b4b4 100644
--- a/WebCore/kwq/KWQLoaderImpl.h
+++ b/WebCore/kwq/KWQLoaderImpl.h
@@ -36,3 +36,4 @@ namespace KIO {
bool KWQServeRequest(khtml::Loader *, khtml::Request *, KIO::TransferJob *);
void KWQCheckCacheObjectStatus(khtml::DocLoader *, khtml::CachedObject *);
+bool KWQCheckIfReloading(khtml::DocLoader *loader);
\ No newline at end of file
diff --git a/WebCore/kwq/KWQLoaderImpl.mm b/WebCore/kwq/KWQLoaderImpl.mm
index eda3d28..5723c39 100644
--- a/WebCore/kwq/KWQLoaderImpl.mm
+++ b/WebCore/kwq/KWQLoaderImpl.mm
@@ -123,6 +123,12 @@ bool KWQServeRequest(Loader *loader, Request *request, TransferJob *job)
return true;
}
+bool KWQCheckIfReloading(DocLoader *loader)
+{
+ WebCoreBridge *bridge = ((KHTMLPart *)loader->part())->impl->getBridge();
+ return [bridge dataSourceIsReloading];
+}
+
void KWQCheckCacheObjectStatus(DocLoader *loader, CachedObject *cachedObject)
{
// Return from the function for objects that we didn't load from the cache.
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 9abcbfb..1320888 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -161,6 +161,7 @@ typedef khtml::RenderPart KHTMLRenderPart;
- (WebResourceHandle *)startLoadingResource:(id <WebCoreResourceLoader>)loader withURL:(NSURL *)URL;
- (void)reportError:(WebError *)error;
- (void)objectLoadedFromCache:(NSURL *)URL size:(unsigned)bytes;
+- (BOOL)dataSourceIsReloading;
- (void)reportClientRedirectTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date;
- (void)reportClientRedirectCancelled;
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index ea9ada0..e010338 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,24 @@
+2002-08-10 Ken Kocienda <kocienda at apple.com>
+
+ Added support for "stale mode" (loads triggered by use of back/forward), and
+ added support for reload.
+
+ Also added a bridge function so the WebCore cache can tell if a load is a reload.
+
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge dataSourceIsReloading]): New method.
+ * WebCoreSupport.subproj/WebSubresourceClient.m:
+ (+[WebSubresourceClient startLoadingResource:withURL:dataSource:]): Use same flags that were used for main resource load.
+ * WebView.subproj/WebDataSource.h:
+ * WebView.subproj/WebDataSource.m:
+ (-[WebDataSource attributes]): New accessor.
+ (-[WebDataSource flags]): New accessor.
+ * WebView.subproj/WebFrame.m:
+ (-[WebFrame reload:]): Reload adds WebResourceHandleFlagLoadFromOrigin flag to load.
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _goToItem:withFrameLoadType:]): Adds flags so that WebFoundation can tell when back/forward
+ has been used.
+
=== milestone 0.5 ===
=== Alexander-16 ===
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index ea9ada0..e010338 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,24 @@
+2002-08-10 Ken Kocienda <kocienda at apple.com>
+
+ Added support for "stale mode" (loads triggered by use of back/forward), and
+ added support for reload.
+
+ Also added a bridge function so the WebCore cache can tell if a load is a reload.
+
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge dataSourceIsReloading]): New method.
+ * WebCoreSupport.subproj/WebSubresourceClient.m:
+ (+[WebSubresourceClient startLoadingResource:withURL:dataSource:]): Use same flags that were used for main resource load.
+ * WebView.subproj/WebDataSource.h:
+ * WebView.subproj/WebDataSource.m:
+ (-[WebDataSource attributes]): New accessor.
+ (-[WebDataSource flags]): New accessor.
+ * WebView.subproj/WebFrame.m:
+ (-[WebFrame reload:]): Reload adds WebResourceHandleFlagLoadFromOrigin flag to load.
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _goToItem:withFrameLoadType:]): Adds flags so that WebFoundation can tell when back/forward
+ has been used.
+
=== milestone 0.5 ===
=== Alexander-16 ===
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index c1beff3..faf2558 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -194,6 +194,11 @@
[handle release];
}
+- (BOOL)dataSourceIsReloading
+{
+ return ([[self dataSource] flags] & WebResourceHandleFlagLoadFromOrigin);
+}
+
- (void)reportClientRedirectTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date
{
[[[frame controller] locationChangeHandler] clientRedirectTo:URL delay:seconds fireDate:date forFrame:frame];
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
index a73a854..9d273b6 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
@@ -62,7 +62,7 @@
WebResourceHandle *handle;
WebSubresourceClient *client;
- handle = [[[WebResourceHandle alloc] initWithURL:URL attributes:nil flags:0] autorelease];
+ handle = [[[WebResourceHandle alloc] initWithURL:URL attributes:[source attributes] flags:[source flags]] autorelease];
if (handle == nil) {
[rLoader cancel];
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
index a73a854..9d273b6 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
@@ -62,7 +62,7 @@
WebResourceHandle *handle;
WebSubresourceClient *client;
- handle = [[[WebResourceHandle alloc] initWithURL:URL attributes:nil flags:0] autorelease];
+ handle = [[[WebResourceHandle alloc] initWithURL:URL attributes:[source attributes] flags:[source flags]] autorelease];
if (handle == nil) {
[rLoader cancel];
diff --git a/WebKit/WebView.subproj/WebDataSource.h b/WebKit/WebView.subproj/WebDataSource.h
index 88183d7..d825934 100644
--- a/WebKit/WebView.subproj/WebDataSource.h
+++ b/WebKit/WebView.subproj/WebDataSource.h
@@ -40,6 +40,9 @@
- initWithLoader: (WebLoader *)loader;
#endif
+-(NSDictionary *)attributes;
+-(unsigned)flags;
+
- (NSData *)data;
- (id <WebDocumentRepresentation>)representation;
diff --git a/WebKit/WebView.subproj/WebDataSource.m b/WebKit/WebView.subproj/WebDataSource.m
index 30ca6c7..ffc283c 100644
--- a/WebKit/WebView.subproj/WebDataSource.m
+++ b/WebKit/WebView.subproj/WebDataSource.m
@@ -59,6 +59,16 @@
[super dealloc];
}
+-(NSDictionary *)attributes
+{
+ return _private->attributes;
+}
+
+-(unsigned)flags;
+{
+ return _private->flags;
+}
+
- (NSData *)data
{
if(!_private->resourceData){
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index c37618c..32ba32e 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -20,6 +20,7 @@
#import <WebKit/WebLocationChangeHandler.h>
#import <WebKit/WebViewPrivate.h>
+#import <WebFoundation/WebFoundation.h>
#import <WebFoundation/WebNSURLExtras.h>
@implementation WebFrame
@@ -194,12 +195,15 @@
- (void)reload: (BOOL)forceRefresh
{
WebDataSource *dataSource = [self dataSource];
-
+ unsigned flags;
+
if (dataSource == nil) {
return;
}
- WebDataSource *newDataSource = [[WebDataSource alloc] initWithURL:[dataSource originalURL] attributes:[dataSource _attributes] flags:[dataSource _flags]];
+ flags = [dataSource _flags] | WebResourceHandleFlagLoadFromOrigin;
+
+ WebDataSource *newDataSource = [[WebDataSource alloc] initWithURL:[dataSource originalURL] attributes:[dataSource _attributes] flags:flags];
[newDataSource _setParent:[dataSource parent]];
if ([self setProvisionalDataSource:newDataSource]) {
[self _setLoadType:WebFrameLoadTypeRefresh];
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 9ca2231..18135d2 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -677,7 +677,11 @@ static const char * const stateNames[] = {
[[_private->dataSource _bridge] scrollToAnchor: [item anchor]];
}
else {
- dataSource = [[WebDataSource alloc] initWithURL:itemURL];
+ unsigned flags = 0;
+ if (type == WebFrameLoadTypeBack || type == WebFrameLoadTypeForward) {
+ flags = WebResourceHandleUseCachedObjectIfPresent;
+ }
+ dataSource = [[WebDataSource alloc] initWithURL:itemURL attributes:nil flags:flags];
[self setProvisionalDataSource: dataSource];
[self _setLoadType: type];
[self startLoading];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list