Skip to content
Permalink
Browse files
Reduce QuickLook.h include overhead
https://bugs.webkit.org/show_bug.cgi?id=166454

Reviewed by Andreas Kling.

Source/WebCore:

* 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.

Source/WebKit:

* WebCoreSupport/WebResourceLoadScheduler.cpp: Stopped including QuickLook.h.

Source/WebKit2:

* 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.


Canonical link: https://commits.webkit.org/183734@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
aestes committed Dec 23, 2016
1 parent 6ac18d8 commit 43a58232c1c4eb5d54d8d2bb71aa0ea16e8684de
@@ -1,3 +1,30 @@
2016-12-22 Andy Estes <aestes@apple.com>

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 <aestes@apple.com>

[iOS] Move QuickLook from WebCore/platform to WebCore/loader
@@ -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"
@@ -1801,4 +1801,11 @@ bool DocumentLoader::isAlwaysOnLoggingAllowed() const
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
@@ -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 Frame;
class FrameLoader;
class IconLoader;
class Page;
class QuickLookHandle;
class ResourceLoader;
class SharedBuffer;
class SubresourceLoader;
@@ -273,7 +270,7 @@ class DocumentLoader : public RefCounted<DocumentLoader>, private CachedRawResou
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

@@ -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,19 +23,15 @@
* 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>

#if USE(CFURLCONNECTION)
#include "CFNetworkSPI.h"
#endif
#include "QuickLookHandleClient.h"
#include <objc/objc.h>
#include <wtf/Forward.h>
#include <wtf/RefPtr.h>
#include <wtf/RetainPtr.h>

OBJC_CLASS NSData;
OBJC_CLASS NSDictionary;
@@ -50,11 +46,11 @@ OBJC_CLASS QLPreviewConverter;

namespace WebCore {

class QuickLookHandleClient;
class ResourceHandle;
class ResourceLoader;
class ResourceResponse;
class SynchronousResourceHandleCFURLConnectionDelegate;
class URL;

WEBCORE_EXPORT NSSet *QLPreviewGetSupportedMIMETypesSet();

@@ -122,5 +118,3 @@ class QuickLookHandle {
} // namespace WebCore

#endif // USE(QUICK_LOOK)

#endif // QuickLook_h
@@ -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;
@@ -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 Frame;
class URL;
class NetworkingContext;
class ProtectionSpace;
class QuickLookHandle;
class ResourceError;
class ResourceHandleClient;
class ResourceHandleInternal;
@@ -152,7 +149,7 @@ class ResourceHandle : public RefCounted<ResourceHandle>, public AuthenticationC

#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)
@@ -752,5 +752,12 @@ static bool synchronousWillSendRequestEnabled()

#endif // ENABLE(WEB_TIMING)

#if USE(QUICK_LOOK)
void ResourceHandle::setQuickLookHandle(std::unique_ptr<QuickLookHandle> handle)
{
m_quickLook = WTFMove(handle);
}
#endif

} // namespace WebCore

@@ -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"
@@ -1,3 +1,12 @@
2016-12-22 Andy Estes <aestes@apple.com>

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 <mmaxfield@apple.com>

Sort Xcode project files
@@ -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)
@@ -1,3 +1,14 @@
2016-12-22 Andy Estes <aestes@apple.com>

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 <timothy_horton@apple.com>

Null deref under WebPageProxy::applicationDidFinishSnapshottingAfterEnteringBackground
@@ -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__)
@@ -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__)
@@ -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;
}

0 comments on commit 43a5823

Please sign in to comment.