Title: [171314] trunk/Source
- Revision
- 171314
- Author
- [email protected]
- Date
- 2014-07-21 12:20:33 -0700 (Mon, 21 Jul 2014)
Log Message
[iOS] Handle QuickLook ResourceLoaders in the web process
https://bugs.webkit.org/show_bug.cgi?id=135113
Reviewed by David Kilzer.
Source/WebCore:
No new tests. QuickLook is not testable from WebKit.
* WebCore.exp.in:
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::maybeLoadQuickLookResource): Start loading the ResourceLoader if it is for a QuickLook resource.
* loader/ResourceLoadScheduler.h:
Source/WebKit2:
The QuickLook framework registers a NSURLProtocol to handle loading subresources of the HTML documents it
generates. In order for these loads to succeed, we need to start them in the same process in which QuickLook
generated the main resource.
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (171313 => 171314)
--- trunk/Source/WebCore/ChangeLog 2014-07-21 19:20:00 UTC (rev 171313)
+++ trunk/Source/WebCore/ChangeLog 2014-07-21 19:20:33 UTC (rev 171314)
@@ -1,3 +1,17 @@
+2014-07-21 Andy Estes <[email protected]>
+
+ [iOS] Handle QuickLook ResourceLoaders in the web process
+ https://bugs.webkit.org/show_bug.cgi?id=135113
+
+ Reviewed by David Kilzer.
+
+ No new tests. QuickLook is not testable from WebKit.
+
+ * WebCore.exp.in:
+ * loader/ResourceLoadScheduler.cpp:
+ (WebCore::ResourceLoadScheduler::maybeLoadQuickLookResource): Start loading the ResourceLoader if it is for a QuickLook resource.
+ * loader/ResourceLoadScheduler.h:
+
2014-07-21 Alexey Proskuryakov <[email protected]>
Case sensitive file system build fix.
Modified: trunk/Source/WebCore/WebCore.exp.in (171313 => 171314)
--- trunk/Source/WebCore/WebCore.exp.in 2014-07-21 19:20:00 UTC (rev 171313)
+++ trunk/Source/WebCore/WebCore.exp.in 2014-07-21 19:20:33 UTC (rev 171314)
@@ -3328,6 +3328,7 @@
__ZN7WebCore15QuickLookHandle6createEPNS_14ResourceLoaderEP13NSURLResponse
__ZN7WebCore15QuickLookHandle7didFailEv
__ZN7WebCore15QuickLookHandleD1Ev
+__ZN7WebCore21ResourceLoadScheduler26maybeLoadQuickLookResourceERNS_14ResourceLoaderE
__ZN7WebCore27qlPreviewConverterUTIForURLEP5NSURL
__ZN7WebCore30removeQLPreviewConverterForURLEP5NSURL
__ZN7WebCore31createTemporaryFileForQuickLookEP8NSString
Modified: trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp (171313 => 171314)
--- trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp 2014-07-21 19:20:00 UTC (rev 171313)
+++ trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp 2014-07-21 19:20:33 UTC (rev 171314)
@@ -46,6 +46,10 @@
#include <RuntimeApplicationChecksIOS.h>
#endif
+#if USE(QUICK_LOOK)
+#include "QuickLook.h"
+#endif
+
namespace WebCore {
// Match the parallel connection count used by the networking layer.
@@ -197,6 +201,17 @@
InspectorInstrumentation::didScheduleResourceRequest(loader->frameLoader() ? loader->frameLoader()->frame().document() : 0, loader->url());
}
+#if USE(QUICK_LOOK)
+bool ResourceLoadScheduler::maybeLoadQuickLookResource(ResourceLoader& loader)
+{
+ if (!loader.request().url().protocolIs(QLPreviewProtocol()))
+ return false;
+
+ loader.start();
+ return true;
+}
+#endif
+
void ResourceLoadScheduler::remove(ResourceLoader* resourceLoader)
{
ASSERT(resourceLoader);
Modified: trunk/Source/WebCore/loader/ResourceLoadScheduler.h (171313 => 171314)
--- trunk/Source/WebCore/loader/ResourceLoadScheduler.h 2014-07-21 19:20:00 UTC (rev 171313)
+++ trunk/Source/WebCore/loader/ResourceLoadScheduler.h 2014-07-21 19:20:33 UTC (rev 171314)
@@ -77,6 +77,10 @@
void notifyDidScheduleResourceRequest(ResourceLoader*);
+#if USE(QUICK_LOOK)
+ bool maybeLoadQuickLookResource(ResourceLoader&);
+#endif
+
private:
void scheduleLoad(ResourceLoader*, ResourceLoadPriority);
void scheduleServePendingRequests();
Modified: trunk/Source/WebKit2/ChangeLog (171313 => 171314)
--- trunk/Source/WebKit2/ChangeLog 2014-07-21 19:20:00 UTC (rev 171313)
+++ trunk/Source/WebKit2/ChangeLog 2014-07-21 19:20:33 UTC (rev 171314)
@@ -1,3 +1,17 @@
+2014-07-21 Andy Estes <[email protected]>
+
+ [iOS] Handle QuickLook ResourceLoaders in the web process
+ https://bugs.webkit.org/show_bug.cgi?id=135113
+
+ Reviewed by David Kilzer.
+
+ The QuickLook framework registers a NSURLProtocol to handle loading subresources of the HTML documents it
+ generates. In order for these loads to succeed, we need to start them in the same process in which QuickLook
+ generated the main resource.
+
+ * WebProcess/Network/WebResourceLoadScheduler.cpp:
+ (WebKit::WebResourceLoadScheduler::scheduleLoad):
+
2014-07-21 Brady Eidson <[email protected]>
DatabaseProcess doesn't relaunch after crashing.
Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp (171313 => 171314)
--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp 2014-07-21 19:20:00 UTC (rev 171313)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp 2014-07-21 19:20:33 UTC (rev 171314)
@@ -110,6 +110,14 @@
return;
}
+#if USE(QUICK_LOOK)
+ if (maybeLoadQuickLookResource(*resourceLoader)) {
+ LOG(NetworkScheduling, "(WebProcess) WebResourceLoadScheduler::scheduleLoad, url '%s' will be handled as a QuickLook resource.", resourceLoader->url().string().utf8().data());
+ m_webResourceLoaders.set(identifier, WebResourceLoader::create(resourceLoader));
+ return;
+ }
+#endif
+
LOG(NetworkScheduling, "(WebProcess) WebResourceLoadScheduler::scheduleLoad, url '%s' will be scheduled with the NetworkProcess with priority %i", resourceLoader->url().string().utf8().data(), priority);
ContentSniffingPolicy contentSniffingPolicy = resourceLoader->shouldSniffContent() ? SniffContent : DoNotSniffContent;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes