Diff
Modified: trunk/Source/WebCore/ChangeLog (210129 => 210130)
--- trunk/Source/WebCore/ChangeLog 2016-12-23 02:24:28 UTC (rev 210129)
+++ trunk/Source/WebCore/ChangeLog 2016-12-23 04:41:52 UTC (rev 210130)
@@ -1,5 +1,32 @@
2016-12-22 Andy Estes <[email protected]>
+ Reduce QuickLook.h include overhead
+ https://bugs.webkit.org/show_bug.cgi?id=166454
+
+ Reviewed by Andreas Kling.
+
+ * dom/Document.cpp: Included QuickLook.h for QLPreviewProtocol().
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::setQuickLookHandle): Moved from DocumentLoader.h to here.
+ * loader/DocumentLoader.h: Stopped including QuickLook.h and forward-declared
+ QuickLookHandle.
+ (WebCore::DocumentLoader::setQuickLookHandle): Moved definition out-of-line since it
+ requires QuickLookHandle to be a complete type.
+ * loader/ios/QuickLook.h: Updated to use #pragma once. Cleaned up includes and forward
+ declarations.
+ * platform/network/ResourceHandle.cpp: Included QuickLook.h so that QuickLookHandle is a
+ complete type in the ResourceHandle constructor.
+ * platform/network/ResourceHandle.h: Stopped including QuickLook.h and forward-declared
+ QuickLookHandle.
+ (WebCore::ResourceHandle::setQuickLookHandle): Moved definition out-of-line since it
+ requires QuickLookHandle to be a complete type.
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::ResourceHandle::setQuickLookHandle): Moved from ResourceHandle.h to here.
+ * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: Included QuickLook.h for
+ QuickLookHandle.
+
+2016-12-22 Andy Estes <[email protected]>
+
[iOS] Move QuickLook from WebCore/platform to WebCore/loader
https://bugs.webkit.org/show_bug.cgi?id=166449
Modified: trunk/Source/WebCore/dom/Document.cpp (210129 => 210130)
--- trunk/Source/WebCore/dom/Document.cpp 2016-12-23 02:24:28 UTC (rev 210129)
+++ trunk/Source/WebCore/dom/Document.cpp 2016-12-23 04:41:52 UTC (rev 210130)
@@ -239,6 +239,10 @@
#include "MediaSession.h"
#endif
+#if USE(QUICK_LOOK)
+#include "QuickLook.h"
+#endif
+
#if ENABLE(REQUEST_ANIMATION_FRAME)
#include "RequestAnimationFrameCallback.h"
#include "ScriptedAnimationController.h"
Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (210129 => 210130)
--- trunk/Source/WebCore/loader/DocumentLoader.cpp 2016-12-23 02:24:28 UTC (rev 210129)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp 2016-12-23 04:41:52 UTC (rev 210130)
@@ -1801,4 +1801,11 @@
return m_frame ? m_frame->isAlwaysOnLoggingAllowed() : true;
}
+#if USE(QUICK_LOOK)
+void DocumentLoader::setQuickLookHandle(std::unique_ptr<QuickLookHandle> quickLookHandle)
+{
+ m_quickLookHandle = WTFMove(quickLookHandle);
+}
+#endif
+
} // namespace WebCore
Modified: trunk/Source/WebCore/loader/DocumentLoader.h (210129 => 210130)
--- trunk/Source/WebCore/loader/DocumentLoader.h 2016-12-23 02:24:28 UTC (rev 210129)
+++ trunk/Source/WebCore/loader/DocumentLoader.h 2016-12-23 04:41:52 UTC (rev 210130)
@@ -52,10 +52,6 @@
#include <wtf/RunLoopTimer.h>
#endif
-#if USE(QUICK_LOOK)
-#include "QuickLook.h"
-#endif
-
#if PLATFORM(COCOA) && !USE(CFURLCONNECTION)
#include <wtf/SchedulePair.h>
#endif
@@ -74,6 +70,7 @@
class FrameLoader;
class IconLoader;
class Page;
+class QuickLookHandle;
class ResourceLoader;
class SharedBuffer;
class SubresourceLoader;
@@ -273,7 +270,7 @@
URL documentURL() const;
#if USE(QUICK_LOOK)
- void setQuickLookHandle(std::unique_ptr<QuickLookHandle> quickLookHandle) { m_quickLookHandle = WTFMove(quickLookHandle); }
+ WEBCORE_EXPORT void setQuickLookHandle(std::unique_ptr<QuickLookHandle>);
QuickLookHandle* quickLookHandle() const { return m_quickLookHandle.get(); }
#endif
Modified: trunk/Source/WebCore/loader/ios/QuickLook.h (210129 => 210130)
--- trunk/Source/WebCore/loader/ios/QuickLook.h 2016-12-23 02:24:28 UTC (rev 210129)
+++ trunk/Source/WebCore/loader/ios/QuickLook.h 2016-12-23 04:41:52 UTC (rev 210130)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2009-2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,20 +23,16 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef QuickLook_h
-#define QuickLook_h
+#pragma once
#if USE(QUICK_LOOK)
-#import "QuickLookHandleClient.h"
-#import "ResourceRequest.h"
-#import <objc/objc-runtime.h>
-#import <wtf/RefPtr.h>
+#include "QuickLookHandleClient.h"
+#include <objc/objc.h>
+#include <wtf/Forward.h>
+#include <wtf/RefPtr.h>
+#include <wtf/RetainPtr.h>
-#if USE(CFURLCONNECTION)
-#include "CFNetworkSPI.h"
-#endif
-
OBJC_CLASS NSData;
OBJC_CLASS NSDictionary;
OBJC_CLASS NSFileHandle;
@@ -50,11 +46,11 @@
namespace WebCore {
-class QuickLookHandleClient;
class ResourceHandle;
class ResourceLoader;
class ResourceResponse;
class SynchronousResourceHandleCFURLConnectionDelegate;
+class URL;
WEBCORE_EXPORT NSSet *QLPreviewGetSupportedMIMETypesSet();
@@ -122,5 +118,3 @@
} // namespace WebCore
#endif // USE(QUICK_LOOK)
-
-#endif // QuickLook_h
Modified: trunk/Source/WebCore/platform/network/ResourceHandle.cpp (210129 => 210130)
--- trunk/Source/WebCore/platform/network/ResourceHandle.cpp 2016-12-23 02:24:28 UTC (rev 210129)
+++ trunk/Source/WebCore/platform/network/ResourceHandle.cpp 2016-12-23 04:41:52 UTC (rev 210130)
@@ -38,6 +38,10 @@
#include <wtf/text/AtomicStringHash.h>
#include <wtf/text/CString.h>
+#if USE(QUICK_LOOK)
+#include "QuickLook.h"
+#endif
+
namespace WebCore {
static bool shouldForceContentSniffing;
Modified: trunk/Source/WebCore/platform/network/ResourceHandle.h (210129 => 210130)
--- trunk/Source/WebCore/platform/network/ResourceHandle.h 2016-12-23 02:24:28 UTC (rev 210129)
+++ trunk/Source/WebCore/platform/network/ResourceHandle.h 2016-12-23 04:41:52 UTC (rev 210130)
@@ -35,10 +35,6 @@
#include <wtf/RetainPtr.h>
#endif
-#if USE(QUICK_LOOK)
-#include "QuickLook.h"
-#endif
-
#if USE(SOUP)
typedef struct _GTlsCertificate GTlsCertificate;
typedef struct _SoupSession SoupSession;
@@ -83,6 +79,7 @@
class URL;
class NetworkingContext;
class ProtectionSpace;
+class QuickLookHandle;
class ResourceError;
class ResourceHandleClient;
class ResourceHandleInternal;
@@ -152,7 +149,7 @@
#if USE(QUICK_LOOK)
QuickLookHandle* quickLookHandle() { return m_quickLook.get(); }
- void setQuickLookHandle(std::unique_ptr<QuickLookHandle> handle) { m_quickLook = WTFMove(handle); }
+ void setQuickLookHandle(std::unique_ptr<QuickLookHandle>);
#endif
#if PLATFORM(WIN) && USE(CURL)
Modified: trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm (210129 => 210130)
--- trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm 2016-12-23 02:24:28 UTC (rev 210129)
+++ trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm 2016-12-23 04:41:52 UTC (rev 210130)
@@ -752,5 +752,12 @@
#endif // ENABLE(WEB_TIMING)
+#if USE(QUICK_LOOK)
+void ResourceHandle::setQuickLookHandle(std::unique_ptr<QuickLookHandle> handle)
+{
+ m_quickLook = WTFMove(handle);
+}
+#endif
+
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm (210129 => 210130)
--- trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm 2016-12-23 02:24:28 UTC (rev 210129)
+++ trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm 2016-12-23 04:41:52 UTC (rev 210130)
@@ -32,6 +32,7 @@
#import "AuthenticationMac.h"
#import "Logging.h"
#import "NSURLRequestSPI.h"
+#import "QuickLook.h"
#import "ResourceHandle.h"
#import "ResourceHandleClient.h"
#import "ResourceRequest.h"
Modified: trunk/Source/WebKit/ChangeLog (210129 => 210130)
--- trunk/Source/WebKit/ChangeLog 2016-12-23 02:24:28 UTC (rev 210129)
+++ trunk/Source/WebKit/ChangeLog 2016-12-23 04:41:52 UTC (rev 210130)
@@ -1,3 +1,12 @@
+2016-12-22 Andy Estes <[email protected]>
+
+ Reduce QuickLook.h include overhead
+ https://bugs.webkit.org/show_bug.cgi?id=166454
+
+ Reviewed by Andreas Kling.
+
+ * WebCoreSupport/WebResourceLoadScheduler.cpp: Stopped including QuickLook.h.
+
2016-12-15 Myles C. Maxfield <[email protected]>
Sort Xcode project files
Modified: trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.cpp (210129 => 210130)
--- trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.cpp 2016-12-23 02:24:28 UTC (rev 210129)
+++ trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.cpp 2016-12-23 04:41:52 UTC (rev 210130)
@@ -43,10 +43,6 @@
#include <WebCore/RuntimeApplicationChecks.h>
#endif
-#if USE(QUICK_LOOK)
-#include <WebCore/QuickLook.h>
-#endif
-
// Match the parallel connection count used by the networking layer.
static unsigned maxRequestsInFlightPerHost;
#if !PLATFORM(IOS)
Modified: trunk/Source/WebKit2/ChangeLog (210129 => 210130)
--- trunk/Source/WebKit2/ChangeLog 2016-12-23 02:24:28 UTC (rev 210129)
+++ trunk/Source/WebKit2/ChangeLog 2016-12-23 04:41:52 UTC (rev 210130)
@@ -1,3 +1,14 @@
+2016-12-22 Andy Estes <[email protected]>
+
+ Reduce QuickLook.h include overhead
+ https://bugs.webkit.org/show_bug.cgi?id=166454
+
+ Reviewed by Andreas Kling.
+
+ * WebProcess/Network/WebLoaderStrategy.cpp: Included QuickLook.h for QLPreviewProtocol().
+ * WebProcess/Network/WebResourceLoader.cpp: Included QuickLook.h for QuickLookHandle.
+ * WebProcess/Network/WebResourceLoader.h: Stopped including QuickLook.h.
+
2016-12-22 Tim Horton <[email protected]>
Null deref under WebPageProxy::applicationDidFinishSnapshottingAfterEnteringBackground
Modified: trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp (210129 => 210130)
--- trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp 2016-12-23 02:24:28 UTC (rev 210129)
+++ trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp 2016-12-23 04:41:52 UTC (rev 210130)
@@ -57,6 +57,10 @@
#include <WebCore/SubresourceLoader.h>
#include <wtf/text/CString.h>
+#if USE(QUICK_LOOK)
+#include <WebCore/QuickLook.h>
+#endif
+
using namespace WebCore;
#define RELEASE_LOG_IF_ALLOWED(permissionChecker, fmt, ...) RELEASE_LOG_IF(permissionChecker.isAlwaysOnLoggingAllowed(), Network, "%p - WebLoaderStrategy::" fmt, this, ##__VA_ARGS__)
Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp (210129 => 210130)
--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp 2016-12-23 02:24:28 UTC (rev 210129)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp 2016-12-23 04:41:52 UTC (rev 210130)
@@ -44,6 +44,10 @@
#include <WebCore/ResourceLoader.h>
#include <WebCore/SubresourceLoader.h>
+#if USE(QUICK_LOOK)
+#include <WebCore/QuickLook.h>
+#endif
+
using namespace WebCore;
#define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - WebResourceLoader::" fmt, this, ##__VA_ARGS__)
Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h (210129 => 210130)
--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h 2016-12-23 02:24:28 UTC (rev 210129)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h 2016-12-23 04:41:52 UTC (rev 210130)
@@ -32,10 +32,6 @@
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
-#if USE(QUICK_LOOK)
-#include <WebCore/QuickLook.h>
-#endif
-
namespace IPC {
class DataReference;
}