WebKit Bugzilla
Attachment 340562 Details for
Bug 185716
: Stop softlinking QuickLook when loading from client-registered schemes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185716-20180517013222.patch (text/plain), 2.90 KB, created by
Tim Horton
on 2018-05-17 01:32:23 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Tim Horton
Created:
2018-05-17 01:32:23 PDT
Size:
2.90 KB
patch
obsolete
>Subversion Revision: 231891 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index ae073322d0fbd8ef35315365458b069da8e51084..b5ffcafcb3a694b41f6ac630694b7e98d76e07b5 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2018-05-17 Tim Horton <timothy_horton@apple.com> >+ >+ Stop softlinking QuickLook when loading from client-registered schemes >+ https://bugs.webkit.org/show_bug.cgi?id=185716 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests, just a performance improvement. >+ >+ * platform/ios/QuickLook.h: >+ * platform/ios/QuickLook.mm: >+ (WebCore::isQuickLookPreviewURL): >+ (WebCore::QLPreviewProtocol): Deleted. >+ Hard-code the QuickLook preview URL scheme, instead of loading the QuickLook >+ framework to retrieve it. It will never change, and just in case it does, >+ add an ASSERT (which does load QuickLook) so that we'll find out. >+ > 2018-05-17 Thibault Saunier <tsaunier@igalia.com> > > [GStreamer]: Consider GstStream(Collection) as if if was not a GInitiallyUnowned >diff --git a/Source/WebCore/platform/ios/QuickLook.h b/Source/WebCore/platform/ios/QuickLook.h >index 0de64b55a7842af09b75ce8fcd69e43bb5c38f56..1bc6bb64537cf4085ba20fd8111f152524941c3d 100644 >--- a/Source/WebCore/platform/ios/QuickLook.h >+++ b/Source/WebCore/platform/ios/QuickLook.h >@@ -40,7 +40,6 @@ class URL; > WEBCORE_EXPORT NSSet *QLPreviewGetSupportedMIMETypesSet(); > WEBCORE_EXPORT void removeQLPreviewConverterForURL(NSURL *); > WEBCORE_EXPORT RetainPtr<NSURLRequest> registerQLPreviewConverterIfNeeded(NSURL *, NSString *mimeType, NSData *); >-WEBCORE_EXPORT const char* QLPreviewProtocol(); > WEBCORE_EXPORT bool isQuickLookPreviewURL(const URL&); > WEBCORE_EXPORT NSString *createTemporaryFileForQuickLook(NSString *fileName); > >diff --git a/Source/WebCore/platform/ios/QuickLook.mm b/Source/WebCore/platform/ios/QuickLook.mm >index 37bad00b43722eac5d84d0e13e8581186f768bbe..23a4cb171227c34eac772d7ae02b48ade652857a 100644 >--- a/Source/WebCore/platform/ios/QuickLook.mm >+++ b/Source/WebCore/platform/ios/QuickLook.mm >@@ -96,18 +96,10 @@ RetainPtr<NSURLRequest> registerQLPreviewConverterIfNeeded(NSURL *url, NSString > return nil; > } > >-const char* QLPreviewProtocol() >-{ >- static const char* const previewProtocol = fastStrDup([QLPreviewScheme UTF8String]); >- return previewProtocol; >-} >- > bool isQuickLookPreviewURL(const URL& url) > { >- // Use some known protocols as a short-cut to avoid loading the QuickLook framework. >- if (url.protocolIsInHTTPFamily() || url.isBlankURL() || url.protocolIsBlob() || url.protocolIsData() || SchemeRegistry::shouldTreatURLSchemeAsLocal(url.protocol().toString())) >- return false; >- return url.protocolIs(QLPreviewProtocol()); >+ ASSERT([QLPreviewScheme isEqualToString:@"x-apple-ql-id"]); >+ return url.protocolIs("x-apple-ql-id"); > } > > static NSDictionary *temporaryFileAttributes()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185716
:
340562
|
340615
|
340656
|
340673
|
340682