[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 07:01:37 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 4ea6a4b6af637cce5bc3ad3774bd0f8ef911ead5
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Nov 16 00:06:02 2002 +0000
Fix for this bug:
Radar 3102708 (REGRESSION: assertion failure backing up to page)
KWQCheckCacheObjectStatus did not create an NSURL in a way that
dealt with the fact that we handle non-NSURL-compliant URL strings.
I have fixed it so it does, and in the process, factored out
the code to do it into a new KURL static function (KURL::getNSURLFromString).
* kwq/KWQKURL.h:
* kwq/KWQKURL.mm:
(KURL::getNSURL): Now calls through to KURL::getNSURLFromString
(KURL::encode_string)
(KURL::getNSURLFromString): New function to handle NSURL creation
* kwq/KWQLoader.mm:
(KWQCheckCacheObjectStatus)
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 82e161f..164e4cf 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,22 @@
+2002-11-15 Ken Kocienda <kocienda at apple.com>
+
+ Fix for this bug:
+
+ Radar 3102708 (REGRESSION: assertion failure backing up to page)
+
+ KWQCheckCacheObjectStatus did not create an NSURL in a way that
+ dealt with the fact that we handle non-NSURL-compliant URL strings.
+ I have fixed it so it does, and in the process, factored out
+ the code to do it into a new KURL static function (KURL::getNSURLFromString).
+
+ * kwq/KWQKURL.h:
+ * kwq/KWQKURL.mm:
+ (KURL::getNSURL): Now calls through to KURL::getNSURLFromString
+ (KURL::encode_string)
+ (KURL::getNSURLFromString): New function to handle NSURL creation
+ * kwq/KWQLoader.mm:
+ (KWQCheckCacheObjectStatus)
+
2002-11-15 David Hyatt <hyatt at apple.com>
Fix asserts in tables.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 82e161f..164e4cf 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,22 @@
+2002-11-15 Ken Kocienda <kocienda at apple.com>
+
+ Fix for this bug:
+
+ Radar 3102708 (REGRESSION: assertion failure backing up to page)
+
+ KWQCheckCacheObjectStatus did not create an NSURL in a way that
+ dealt with the fact that we handle non-NSURL-compliant URL strings.
+ I have fixed it so it does, and in the process, factored out
+ the code to do it into a new KURL static function (KURL::getNSURLFromString).
+
+ * kwq/KWQKURL.h:
+ * kwq/KWQKURL.mm:
+ (KURL::getNSURL): Now calls through to KURL::getNSURLFromString
+ (KURL::encode_string)
+ (KURL::getNSURLFromString): New function to handle NSURL creation
+ * kwq/KWQLoader.mm:
+ (KWQCheckCacheObjectStatus)
+
2002-11-15 David Hyatt <hyatt at apple.com>
Fix asserts in tables.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 82e161f..164e4cf 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,22 @@
+2002-11-15 Ken Kocienda <kocienda at apple.com>
+
+ Fix for this bug:
+
+ Radar 3102708 (REGRESSION: assertion failure backing up to page)
+
+ KWQCheckCacheObjectStatus did not create an NSURL in a way that
+ dealt with the fact that we handle non-NSURL-compliant URL strings.
+ I have fixed it so it does, and in the process, factored out
+ the code to do it into a new KURL static function (KURL::getNSURLFromString).
+
+ * kwq/KWQKURL.h:
+ * kwq/KWQKURL.mm:
+ (KURL::getNSURL): Now calls through to KURL::getNSURLFromString
+ (KURL::encode_string)
+ (KURL::getNSURLFromString): New function to handle NSURL creation
+ * kwq/KWQLoader.mm:
+ (KWQCheckCacheObjectStatus)
+
2002-11-15 David Hyatt <hyatt at apple.com>
Fix asserts in tables.
diff --git a/WebCore/kwq/KWQKURL.h b/WebCore/kwq/KWQKURL.h
index 901a852..bb75ba0 100644
--- a/WebCore/kwq/KWQKURL.h
+++ b/WebCore/kwq/KWQKURL.h
@@ -75,6 +75,7 @@ public:
static QString decode_string(const QString &);
static QString encode_string(const QString &);
+ static NSURL *getNSURLFromString(const QString &);
friend bool operator==(const KURL &, const KURL &);
diff --git a/WebCore/kwq/KWQKURL.mm b/WebCore/kwq/KWQKURL.mm
index 7b68f07..1b962a2 100644
--- a/WebCore/kwq/KWQKURL.mm
+++ b/WebCore/kwq/KWQKURL.mm
@@ -1057,28 +1057,7 @@ void KURL::parse(const char *url, const QString *originalString)
NSURL *KURL::getNSURL() const
{
- NSString *string = urlString.getNSString();
-
- // Had to re-add this hack to work around CFURL bug 2908969, and to prevent the symptoms
- // described in bug 3032058.
- if ([string hasPrefix:@"file:/"] && ![string hasPrefix:@"file://"]) {
- string = [NSString stringWithFormat:@"file://%@", [string substringFromIndex:5]];
- }
-
- NSURL *URL = [NSURL URLWithString:string];
- if (!URL) {
- // Try to create URL again, but this time do some more string escaping first.
- // Eventually, we would prefer not to have to take this extra step, as the extra
- // escaping causes bugs like 3064743.
- // Note the set of unescaped characters contains the square brackets.
- // This is a bit of license we take with CFURL and its code to detect characters
- // it considers illegal. See 3102332 for more information.
- CFStringRef stricterString = CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)string, CFSTR("[]%"), NULL, kCFStringEncodingUTF8);
- URL = [NSURL URLWithString:(NSString *)stricterString];
- CFRelease(stricterString);
- }
-
- return URL;
+ return KURL::getNSURLFromString(urlString);
}
QString KURL::encodedHtmlRef() const
@@ -1134,3 +1113,31 @@ QString KURL::encode_string(const QString& notEncodedString)
return result;
}
+
+NSURL *KURL::getNSURLFromString(const QString &urlString)
+{
+ NSString *string = urlString.getNSString();
+
+ // Had to re-add this hack to work around CFURL bug 2908969, and to prevent the symptoms
+ // described in bug 3032058.
+ if ([string hasPrefix:@"file:/"] && ![string hasPrefix:@"file://"]) {
+ string = [NSString stringWithFormat:@"file://%@", [string substringFromIndex:5]];
+ }
+
+ NSURL *URL = [NSURL URLWithString:string];
+ if (!URL) {
+ // Try to create URL again, but this time do some more string escaping first.
+ // Eventually, we would prefer not to have to take this extra step, as the extra
+ // escaping causes bugs like 3064743.
+ // Note the set of unescaped characters contains the square brackets.
+ // This is a bit of license we take with CFURL and its code to detect characters
+ // it considers illegal. See 3102332 for more information.
+ CFStringRef stricterString = CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)string, CFSTR("[]%"), NULL, kCFStringEncodingUTF8);
+ if (stricterString) {
+ URL = [NSURL URLWithString:(NSString *)stricterString];
+ CFRelease(stricterString);
+ }
+ }
+
+ return URL;
+}
diff --git a/WebCore/kwq/KWQLoader.mm b/WebCore/kwq/KWQLoader.mm
index 2cd74a2..8bc5ba4 100644
--- a/WebCore/kwq/KWQLoader.mm
+++ b/WebCore/kwq/KWQLoader.mm
@@ -88,11 +88,10 @@ void KWQCheckCacheObjectStatus(DocLoader *loader, CachedObject *cachedObject)
// Notify the caller that we "loaded".
WebCoreBridge *bridge = ((KHTMLPart *)loader->part())->kwq->bridge();
- NSURL *URL = [[NSURL alloc] initWithString:cachedObject->url().string().getNSString()];
+ NSURL *URL = KURL::getNSURLFromString(cachedObject->url().string());
ASSERT(URL);
CachedImage *cachedImage = dynamic_cast<CachedImage *>(cachedObject);
[bridge objectLoadedFromCache:URL response:(id)cachedObject->response() size:cachedImage ? cachedImage->dataSize() : cachedObject->size()];
- [URL release];
}
void KWQRetainResponse(void *response)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list