Title: [117151] branches/safari-536-branch/Source/WebKit/mac
Diff
Modified: branches/safari-536-branch/Source/WebKit/mac/ChangeLog (117150 => 117151)
--- branches/safari-536-branch/Source/WebKit/mac/ChangeLog 2012-05-15 21:04:41 UTC (rev 117150)
+++ branches/safari-536-branch/Source/WebKit/mac/ChangeLog 2012-05-15 21:06:39 UTC (rev 117151)
@@ -1,5 +1,33 @@
2012-05-15 Lucas Forschler <[email protected]>
+ Merge 116820
+
+ 2012-05-11 Brady Eidson <[email protected]>
+
+ <rdar://problem/11361907> and https://bugs.webkit.org/show_bug.cgi?id=86265
+ REGRESSION(r104885): Images missing from printed YummySoup! recipes
+
+ We thought clients were passing paths as URLs.
+ It turns out it was more likely they were passing file: URLs with the file: scheme removed.
+ And that jives perfectly with the behavior change caused by r104885.
+
+ Reviewed by Alexey Proskuryakov.
+
+ Rename _webkit_URLFromURLOrPath to _webkit_URLFromURLOrSchemelessFileURL, and change it
+ to create the new URL simply by appending "file:":
+ * Misc/WebNSURLExtras.h:
+ * Misc/WebNSURLExtras.mm:
+ (-[NSURL _webkit_URLFromURLOrSchemelessFileURL]):
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame loadRequest:]): Create the fixed url simply by appending "file:" to the
+ existing URL string.
+ (-[WebFrame loadData:MIMEType:textEncodingName:baseURL:]):
+ (-[WebFrame loadHTMLString:baseURL:]):
+ (-[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:]):
+
+2012-05-15 Lucas Forschler <[email protected]>
+
Merge 116695
2012-05-10 Anders Carlsson <[email protected]>
Modified: branches/safari-536-branch/Source/WebKit/mac/Misc/WebNSURLExtras.h (117150 => 117151)
--- branches/safari-536-branch/Source/WebKit/mac/Misc/WebNSURLExtras.h 2012-05-15 21:04:41 UTC (rev 117150)
+++ branches/safari-536-branch/Source/WebKit/mac/Misc/WebNSURLExtras.h 2012-05-15 21:06:39 UTC (rev 117151)
@@ -69,7 +69,7 @@
- (NSString *)_webkit_suggestedFilenameWithMIMEType:(NSString *)MIMEType;
-- (NSURL *)_webkit_URLFromURLOrPath;
+- (NSURL *)_webkit_URLFromURLOrSchemelessFileURL;
@end
Modified: branches/safari-536-branch/Source/WebKit/mac/Misc/WebNSURLExtras.mm (117150 => 117151)
--- branches/safari-536-branch/Source/WebKit/mac/Misc/WebNSURLExtras.mm 2012-05-15 21:04:41 UTC (rev 117150)
+++ branches/safari-536-branch/Source/WebKit/mac/Misc/WebNSURLExtras.mm 2012-05-15 21:06:39 UTC (rev 117151)
@@ -276,12 +276,12 @@
return suggestedFilenameWithMIMEType(self, MIMEType);
}
-- (NSURL *)_webkit_URLFromURLOrPath
+- (NSURL *)_webkit_URLFromURLOrSchemelessFileURL
{
if ([self scheme])
return self;
- return [NSURL fileURLWithPath:[self absoluteString]];
+ return [NSURL URLWithString:[@"file:" stringByAppendingString:[self absoluteString]]];
}
@end
Modified: branches/safari-536-branch/Source/WebKit/mac/WebView/WebFrame.mm (117150 => 117151)
--- branches/safari-536-branch/Source/WebKit/mac/WebView/WebFrame.mm 2012-05-15 21:04:41 UTC (rev 117150)
+++ branches/safari-536-branch/Source/WebKit/mac/WebView/WebFrame.mm 2012-05-15 21:06:39 UTC (rev 117151)
@@ -1402,7 +1402,7 @@
// Note that other users of WebKit API use nil requests or requests with nil URLs, so we
// only implement this workaround when the request had a non-nil URL.
if (!resourceRequest.url().isValid() && [request URL])
- resourceRequest.setURL([NSURL fileURLWithPath:[[request URL] absoluteString]]);
+ resourceRequest.setURL([NSURL URLWithString:[@"file:" stringByAppendingString:[[request URL] absoluteString]]]);
coreFrame->loader()->load(resourceRequest, false);
}
@@ -1445,7 +1445,7 @@
if (!MIMEType)
MIMEType = @"text/html";
- [self _loadData:data MIMEType:MIMEType textEncodingName:encodingName baseURL:[baseURL _webkit_URLFromURLOrPath] unreachableURL:nil];
+ [self _loadData:data MIMEType:MIMEType textEncodingName:encodingName baseURL:[baseURL _webkit_URLFromURLOrSchemelessFileURL] unreachableURL:nil];
}
- (void)_loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL unreachableURL:(NSURL *)unreachableURL
@@ -1458,14 +1458,14 @@
{
WebCoreThreadViolationCheckRoundTwo();
- [self _loadHTMLString:string baseURL:[baseURL _webkit_URLFromURLOrPath] unreachableURL:nil];
+ [self _loadHTMLString:string baseURL:[baseURL _webkit_URLFromURLOrSchemelessFileURL] unreachableURL:nil];
}
- (void)loadAlternateHTMLString:(NSString *)string baseURL:(NSURL *)baseURL forUnreachableURL:(NSURL *)unreachableURL
{
WebCoreThreadViolationCheckRoundTwo();
- [self _loadHTMLString:string baseURL:[baseURL _webkit_URLFromURLOrPath] unreachableURL:[unreachableURL _webkit_URLFromURLOrPath]];
+ [self _loadHTMLString:string baseURL:[baseURL _webkit_URLFromURLOrSchemelessFileURL] unreachableURL:[unreachableURL _webkit_URLFromURLOrSchemelessFileURL]];
}
- (void)loadArchive:(WebArchive *)archive
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes