https://bugs.webkit.org/show_bug.cgi?id=180561
Reviewed by Alex Christensen.
Source/WebCore:
No new tests, existing API test updated.
* Modules/mediastream/PeerConnectionBackend.h:
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
(PAL::LogArgument<webrtc::RTCStats>::toString): Deleted.
* dom/Document.cpp:
* dom/Document.h:
* html/HTMLMediaElement.cpp:
(PAL::LogArgument<WebCore::URL>::toString): Deleted.
* html/HTMLMediaElement.h:
* html/HTMLMediaElementEnums.h:
(PAL::LogArgument<WebCore::HTMLMediaElementEnums::ReadyState>::toString): Deleted.
(PAL::LogArgument<WebCore::HTMLMediaElementEnums::NetworkState>::toString): Deleted.
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::logger const):
* html/MediaElementSession.h:
* html/track/DataCue.h:
(PAL::LogArgument<WebCore::DataCue>::toString): Deleted.
* html/track/TextTrackCue.h:
(PAL::LogArgument<WebCore::TextTrackCue>::toString): Deleted.
* html/track/TextTrackCueGeneric.h:
(PAL::LogArgument<WebCore::TextTrackCueGeneric>::toString): Deleted.
* html/track/TrackBase.cpp:
(WebCore::nullLogger):
(WebCore::TrackBase::TrackBase):
* html/track/TrackBase.h:
* html/track/VTTCue.h:
(PAL::LogArgument<WebCore::VTTCue>::toString): Deleted.
* platform/graphics/InbandTextTrackPrivate.h:
* platform/graphics/InbandTextTrackPrivateClient.h:
(PAL::LogArgument<WebCore::GenericCueData>::toString): Deleted.
* platform/graphics/MediaPlayer.cpp:
(WebCore::nullLogger):
(WebCore::MediaPlayer::mediaPlayerLogger):
* platform/graphics/MediaPlayer.h:
(WTF::LogArgument<MediaTime>::toString):
(PAL::LogArgument<WTF::MediaTime>::toString): Deleted.
* platform/graphics/MediaPlayerEnums.h:
(PAL::LogArgument<WebCore::MediaPlayerEnums::ReadyState>::toString): Deleted.
(PAL::LogArgument<WebCore::MediaPlayerEnums::NetworkState>::toString): Deleted.
* platform/graphics/TrackPrivateBase.cpp:
(WebCore::TrackPrivateBase::setLogger):
* platform/graphics/TrackPrivateBase.h:
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
* platform/mediastream/RTCIceConnectionState.h:
(PAL::LogArgument<WebCore::RTCIceConnectionState>::toString): Deleted.
* platform/mediastream/RTCIceGatheringState.h:
(PAL::LogArgument<WebCore::RTCIceGatheringState>::toString): Deleted.
* platform/mediastream/RTCPeerConnectionState.h:
(PAL::LogArgument<WebCore::RTCPeerConnectionState>::toString): Deleted.
* platform/mediastream/RTCSignalingState.h:
(PAL::LogArgument<WebCore::RTCSignalingState>::toString): Deleted.
* platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
Source/WebCore/PAL:
* PAL.xcodeproj/project.pbxproj:
* pal/Logger.h: Removed.
* pal/LoggerHelper.h: Removed.
Source/WTF:
* WTF.xcodeproj/project.pbxproj:
* wtf/Logger.h: Copied from Source/WebCore/PAL/pal/Logger.h.
(PAL::LogArgument::toString): Deleted.
(PAL::Logger::create): Deleted.
(PAL::Logger::logAlways const): Deleted.
(PAL::Logger::error const): Deleted.
(PAL::Logger::warning const): Deleted.
(PAL::Logger::info const): Deleted.
(PAL::Logger::debug const): Deleted.
(PAL::Logger::willLog const): Deleted.
(PAL::Logger::enabled const): Deleted.
(PAL::Logger::setEnabled): Deleted.
(PAL::Logger::LogSiteIdentifier::LogSiteIdentifier): Deleted.
(PAL::Logger::addObserver): Deleted.
(PAL::Logger::removeObserver): Deleted.
(PAL::Logger::Logger): Deleted.
(PAL::Logger::log): Deleted.
(PAL::Logger::observers): Deleted.
(PAL::LogArgument<Logger::LogSiteIdentifier>::toString): Deleted.
* wtf/LoggerHelper.h: Copied from Source/WebCore/PAL/pal/LoggerHelper.h.
Tools:
* TestWebKitAPI/Tests/WebCore/Logging.cpp:
(TestWebKitAPI::TEST_F):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225696
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2017-12-08 Eric Carlson <eric.carlson@apple.com>
+
+ Move Logger from PAL to WTF so it can be used outside of WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=180561
+
+ Reviewed by Alex Christensen.
+
+ * WTF.xcodeproj/project.pbxproj:
+ * wtf/Logger.h: Copied from Source/WebCore/PAL/pal/Logger.h.
+ (PAL::LogArgument::toString): Deleted.
+ (PAL::Logger::create): Deleted.
+ (PAL::Logger::logAlways const): Deleted.
+ (PAL::Logger::error const): Deleted.
+ (PAL::Logger::warning const): Deleted.
+ (PAL::Logger::info const): Deleted.
+ (PAL::Logger::debug const): Deleted.
+ (PAL::Logger::willLog const): Deleted.
+ (PAL::Logger::enabled const): Deleted.
+ (PAL::Logger::setEnabled): Deleted.
+ (PAL::Logger::LogSiteIdentifier::LogSiteIdentifier): Deleted.
+ (PAL::Logger::addObserver): Deleted.
+ (PAL::Logger::removeObserver): Deleted.
+ (PAL::Logger::Logger): Deleted.
+ (PAL::Logger::log): Deleted.
+ (PAL::Logger::observers): Deleted.
+ (PAL::LogArgument<Logger::LogSiteIdentifier>::toString): Deleted.
+ * wtf/LoggerHelper.h: Copied from Source/WebCore/PAL/pal/LoggerHelper.h.
+
2017-12-08 Yusuke Suzuki <utatane.tea@gmail.com>
Remove pthread_once in favor of dispatch_once
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
+ 077CD86A1FD9CFD200828587 /* Logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Logger.h; sourceTree = "<group>"; };
+ 077CD86B1FD9CFD300828587 /* LoggerHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoggerHelper.h; sourceTree = "<group>"; };
0F0D85B317234CB100338210 /* NoLock.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NoLock.h; sourceTree = "<group>"; };
0F0F52691F421FF8004A452C /* StringMalloc.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = StringMalloc.cpp; sourceTree = "<group>"; };
0F0F526A1F421FF8004A452C /* StringMalloc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StringMalloc.h; sourceTree = "<group>"; };
0F60F32E1DFCBD1B00416D6C /* LockedPrintStream.h */,
A8A472C3151A825A004123FF /* Locker.h */,
5311BD551EA7E15A00525281 /* LocklessBag.h */,
+ 077CD86A1FD9CFD200828587 /* Logger.h */,
+ 077CD86B1FD9CFD300828587 /* LoggerHelper.h */,
513E170A1CD7D5BF00E3650B /* LoggingAccumulator.h */,
0F30BA8C1E78708E002CA847 /* LoggingHashID.h */,
0F30BA8D1E78708E002CA847 /* LoggingHashMap.h */,
#include <wtf/text/StringBuilder.h>
#include <wtf/text/WTFString.h>
-namespace PAL {
+namespace WTF {
template<typename T>
struct LogArgument {
}
};
-} // namespace PAL
+} // namespace WTF
+
+using WTF::Logger;
#pragma once
-namespace PAL {
+#include <wtf/Logger.h>
-class Logger;
+namespace WTF {
class LoggerHelper {
public:
virtual WTFLogChannel& logChannel() const = 0;
virtual const void* logIdentifier() const = 0;
-
#if !RELEASE_LOG_DISABLED
-#define LOGIDENTIFIER PAL::Logger::LogSiteIdentifier(logClassName(), __func__, logIdentifier())
+#define LOGIDENTIFIER WTF::Logger::LogSiteIdentifier(logClassName(), __func__, logIdentifier())
#define ALWAYS_LOG(...) logger().logAlways(logChannel(), __VA_ARGS__)
#define ERROR_LOG(...) logger().error(logChannel(), __VA_ARGS__)
};
-} // namespace PAL
+} // namespace WTF
+
+using WTF::LoggerHelper;
+
+2017-12-08 Eric Carlson <eric.carlson@apple.com>
+
+ Move Logger from PAL to WTF so it can be used outside of WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=180561
+
+ Reviewed by Alex Christensen.
+
+ No new tests, existing API test updated.
+
+ * Modules/mediastream/PeerConnectionBackend.h:
+ * Modules/mediastream/RTCPeerConnection.h:
+ * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
+ (PAL::LogArgument<webrtc::RTCStats>::toString): Deleted.
+ * dom/Document.cpp:
+ * dom/Document.h:
+ * html/HTMLMediaElement.cpp:
+ (PAL::LogArgument<WebCore::URL>::toString): Deleted.
+ * html/HTMLMediaElement.h:
+ * html/HTMLMediaElementEnums.h:
+ (PAL::LogArgument<WebCore::HTMLMediaElementEnums::ReadyState>::toString): Deleted.
+ (PAL::LogArgument<WebCore::HTMLMediaElementEnums::NetworkState>::toString): Deleted.
+ * html/MediaElementSession.cpp:
+ (WebCore::MediaElementSession::logger const):
+ * html/MediaElementSession.h:
+ * html/track/DataCue.h:
+ (PAL::LogArgument<WebCore::DataCue>::toString): Deleted.
+ * html/track/TextTrackCue.h:
+ (PAL::LogArgument<WebCore::TextTrackCue>::toString): Deleted.
+ * html/track/TextTrackCueGeneric.h:
+ (PAL::LogArgument<WebCore::TextTrackCueGeneric>::toString): Deleted.
+ * html/track/TrackBase.cpp:
+ (WebCore::nullLogger):
+ (WebCore::TrackBase::TrackBase):
+ * html/track/TrackBase.h:
+ * html/track/VTTCue.h:
+ (PAL::LogArgument<WebCore::VTTCue>::toString): Deleted.
+ * platform/graphics/InbandTextTrackPrivate.h:
+ * platform/graphics/InbandTextTrackPrivateClient.h:
+ (PAL::LogArgument<WebCore::GenericCueData>::toString): Deleted.
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::nullLogger):
+ (WebCore::MediaPlayer::mediaPlayerLogger):
+ * platform/graphics/MediaPlayer.h:
+ (WTF::LogArgument<MediaTime>::toString):
+ (PAL::LogArgument<WTF::MediaTime>::toString): Deleted.
+ * platform/graphics/MediaPlayerEnums.h:
+ (PAL::LogArgument<WebCore::MediaPlayerEnums::ReadyState>::toString): Deleted.
+ (PAL::LogArgument<WebCore::MediaPlayerEnums::NetworkState>::toString): Deleted.
+ * platform/graphics/TrackPrivateBase.cpp:
+ (WebCore::TrackPrivateBase::setLogger):
+ * platform/graphics/TrackPrivateBase.h:
+ * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
+ * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
+ * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+ (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
+ * platform/mediastream/RTCIceConnectionState.h:
+ (PAL::LogArgument<WebCore::RTCIceConnectionState>::toString): Deleted.
+ * platform/mediastream/RTCIceGatheringState.h:
+ (PAL::LogArgument<WebCore::RTCIceGatheringState>::toString): Deleted.
+ * platform/mediastream/RTCPeerConnectionState.h:
+ (PAL::LogArgument<WebCore::RTCPeerConnectionState>::toString): Deleted.
+ * platform/mediastream/RTCSignalingState.h:
+ (PAL::LogArgument<WebCore::RTCSignalingState>::toString): Deleted.
+ * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
+
2017-12-08 Yusuke Suzuki <utatane.tea@gmail.com>
Remove pthread_once in favor of dispatch_once
#include "RTCRtpParameters.h"
#include "RTCSessionDescription.h"
#include "RTCSignalingState.h"
-#include <pal/Logger.h>
-#include <pal/LoggerHelper.h>
+#include <wtf/LoggerHelper.h>
namespace WebCore {
class PeerConnectionBackend
#if !RELEASE_LOG_DISABLED
- : public PAL::LoggerHelper
+ : private LoggerHelper
#endif
{
public:
virtual void applyRotationForOutgoingVideoSources() { }
#if !RELEASE_LOG_DISABLED
- const PAL::Logger& logger() const final { return m_logger.get(); }
+ const Logger& logger() const final { return m_logger.get(); }
const void* logIdentifier() const final { return m_logIdentifier; }
const char* logClassName() const override { return "PeerConnectionBackend"; }
WTFLogChannel& logChannel() const final;
Vector<PendingICECandidate> m_pendingICECandidates;
#if !RELEASE_LOG_DISABLED
- Ref<const PAL::Logger> m_logger;
+ Ref<const Logger> m_logger;
const void* m_logIdentifier;
#endif
bool m_negotiationNeeded { false };
#include "RTCPeerConnectionState.h"
#include "RTCRtpTransceiver.h"
#include "RTCSignalingState.h"
-#include <pal/LoggerHelper.h>
+#include <wtf/LoggerHelper.h>
namespace WebCore {
, public EventTargetWithInlineData
, public ActiveDOMObject
#if !RELEASE_LOG_DISABLED
- , public PAL::LoggerHelper
+ , private LoggerHelper
#endif
{
public:
bool hasPendingActivity() const final;
#if !RELEASE_LOG_DISABLED
- const PAL::Logger& logger() const final { return m_logger.get(); }
+ const Logger& logger() const final { return m_logger.get(); }
const void* logIdentifier() const final { return m_logIdentifier; }
const char* logClassName() const final { return "RTCPeerConnection"; }
WTFLogChannel& logChannel() const final;
RTCPeerConnectionState m_connectionState { RTCPeerConnectionState::New };
#if !RELEASE_LOG_DISABLED
- Ref<const PAL::Logger> m_logger;
+ Ref<const Logger> m_logger;
const void* m_logIdentifier;
#endif
#include "RealtimeOutgoingAudioSource.h"
#include "RealtimeOutgoingVideoSource.h"
#include <Timer.h>
-#include <pal/Logger.h>
-#include <pal/LoggerHelper.h>
#include <webrtc/api/jsep.h>
#include <webrtc/api/peerconnectioninterface.h>
#include <webrtc/pc/peerconnectionfactory.h>
#include <webrtc/pc/rtcstatscollector.h>
+#include <wtf/LoggerHelper.h>
#include <wtf/ThreadSafeRefCounted.h>
namespace webrtc {
, private webrtc::PeerConnectionObserver
, private webrtc::RTCStatsCollectorCallback
#if !RELEASE_LOG_DISABLED
- , public PAL::LoggerHelper
+ , private LoggerHelper
#endif
{
public:
bool shouldOfferAllowToReceiveVideo() const;
#if !RELEASE_LOG_DISABLED
- const PAL::Logger& logger() const final { return m_logger.get(); }
+ const Logger& logger() const final { return m_logger.get(); }
const void* logIdentifier() const final { return m_logIdentifier; }
const char* logClassName() const final { return "LibWebRTCMediaEndpoint"; }
WTFLogChannel& logChannel() const final;
#if !RELEASE_LOG_DISABLED
int64_t m_statsFirstDeliveredTimestamp { 0 };
- Ref<const PAL::Logger> m_logger;
+ Ref<const Logger> m_logger;
const void* m_logIdentifier;
#endif
};
} // namespace WebCore
-namespace PAL {
+namespace WTF {
template<typename Type>
struct LogArgument;
}
};
-}; // namespace PAL
+}; // namespace WTF
#endif // USE(LIBWEBRTC)
+2017-12-08 Eric Carlson <eric.carlson@apple.com>
+
+ Move Logger from PAL to WTF so it can be used outside of WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=180561
+
+ Reviewed by Alex Christensen.
+
+ * PAL.xcodeproj/project.pbxproj:
+ * pal/Logger.h: Removed.
+ * pal/LoggerHelper.h: Removed.
+
2017-12-07 Myles C. Maxfield <mmaxfield@apple.com>
[Cocoa] Add SPI to disallow user-installed fonts
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
- 0708AC331F4C874B001F788F /* Logger.h in Headers */ = {isa = PBXBuildFile; fileRef = 0708AC321F4C874A001F788F /* Logger.h */; };
- 07377ADC1F5777D90027F16D /* LoggerHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 07377ADB1F5777D70027F16D /* LoggerHelper.h */; };
0C00CFD41F68CE4600AAC26D /* MediaTimeAVFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C00CFD21F68CE4600AAC26D /* MediaTimeAVFoundation.h */; };
0C2D9E731EEF5AF600DBC317 /* ExportMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C2D9E721EEF5AF600DBC317 /* ExportMacros.h */; };
0C2DA06D1F33CA8400DBC317 /* CFLocaleSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C2DA0671F33CA8400DBC317 /* CFLocaleSPI.h */; };
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
- 0708AC321F4C874A001F788F /* Logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Logger.h; sourceTree = "<group>"; };
- 07377ADB1F5777D70027F16D /* LoggerHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoggerHelper.h; sourceTree = "<group>"; };
0C00CFD11F68CE4600AAC26D /* MediaTimeAVFoundation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MediaTimeAVFoundation.cpp; path = avfoundation/MediaTimeAVFoundation.cpp; sourceTree = "<group>"; };
0C00CFD21F68CE4600AAC26D /* MediaTimeAVFoundation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MediaTimeAVFoundation.h; path = avfoundation/MediaTimeAVFoundation.h; sourceTree = "<group>"; };
0C2D9E721EEF5AF600DBC317 /* ExportMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExportMacros.h; sourceTree = "<group>"; };
F44291621FA52670002CC93E /* FileSizeFormatter.cpp */,
F442915F1FA5261E002CC93E /* FileSizeFormatter.h */,
A39DE74D1F7C443C007BCB00 /* HysteresisActivity.h */,
- 0708AC321F4C874A001F788F /* Logger.h */,
- 07377ADB1F5777D70027F16D /* LoggerHelper.h */,
1C4876D61F8D7F4E00CCEEBD /* Logging.cpp */,
1C4876D71F8D7F4E00CCEEBD /* Logging.h */,
1C4876DD1F8D812B00CCEEBD /* LogInitialization.h */,
A30D41211F0DD0EA00B71954 /* KillRing.h in Headers */,
0C5AF91C1F43A4C7002EAC02 /* LaunchServicesSPI.h in Headers */,
0C2DA1471F3BEB4900DBC317 /* LinkPresentationSPI.h in Headers */,
- 0708AC331F4C874B001F788F /* Logger.h in Headers */,
- 07377ADC1F5777D90027F16D /* LoggerHelper.h in Headers */,
1C4876D91F8D7F4E00CCEEBD /* Logging.h in Headers */,
0C77858B1F45130F00F4EBB6 /* LookupSPI.h in Headers */,
0C2DA1481F3BEB4900DBC317 /* MachVMSPI.h in Headers */,
#include <ctime>
#include <inspector/ConsoleMessage.h>
#include <inspector/ScriptCallStack.h>
-#include <pal/Logger.h>
#include <wtf/CurrentTime.h>
#include <wtf/Language.h>
#include <wtf/NeverDestroyed.h>
#include "UserActionElementSet.h"
#include "ViewportArguments.h"
#include "VisibilityState.h"
-#include <pal/Logger.h>
#include <pal/SessionID.h>
#include <wtf/Deque.h>
#include <wtf/Forward.h>
#include <wtf/HashCountedSet.h>
#include <wtf/HashSet.h>
+#include <wtf/Logger.h>
#include <wtf/ObjectIdentifier.h>
#include <wtf/WeakPtr.h>
#include <wtf/text/AtomicStringHash.h>
, public FontSelectorClient
, public FrameDestructionObserver
, public Supplementable<Document>
- , public PAL::Logger::Observer {
+ , public Logger::Observer {
public:
static Ref<Document> create(Frame* frame, const URL& url)
{
TextAutoSizing& textAutoSizing();
#endif
- PAL::Logger& logger();
+ Logger& logger();
void hasStorageAccess(Ref<DeferredPromise>&& passedPromise);
void requestStorageAccess(Ref<DeferredPromise>&& passedPromise);
OrientationNotifier m_orientationNotifier;
mutable PAL::SessionID m_sessionID;
- mutable RefPtr<PAL::Logger> m_logger;
+ mutable RefPtr<Logger> m_logger;
RefPtr<StringCallback> m_consoleMessageListener;
static bool hasEverCreatedAnAXObjectCache;
#include "UserContentController.h"
#include "UserGestureIndicator.h"
#include <limits>
-#include <pal/Logger.h>
#include <pal/SessionID.h>
#include <pal/system/SleepDisabler.h>
#include <runtime/Uint8Array.h>
#include "VideoFullscreenModel.h"
#endif
-namespace PAL {
+namespace WTF {
template <>
struct LogArgument<WebCore::URL> {
static String toString(const WebCore::URL& url)
#include "MediaPlayer.h"
#include "MediaProducer.h"
#include "VisibilityChangeClient.h"
-#include <pal/LoggerHelper.h>
#include <wtf/Function.h>
+#include <wtf/LoggerHelper.h>
#include <wtf/WeakPtr.h>
#if ENABLE(VIDEO_TRACK)
#endif
namespace PAL {
-class Logger;
class SleepDisabler;
}
, private CDMClient
#endif
#if !RELEASE_LOG_DISABLED
- , public PAL::LoggerHelper
+ , private LoggerHelper
#endif
{
public:
bool supportsSeeking() const override;
#if !RELEASE_LOG_DISABLED
- const PAL::Logger& logger() const final { return *m_logger.get(); }
+ const Logger& logger() const final { return *m_logger.get(); }
const void* logIdentifier() const final { return reinterpret_cast<const void*>(m_logIdentifier); }
WTFLogChannel& logChannel() const final;
#endif
const char* logClassName() const final { return "HTMLMediaElement"; }
const void* mediaPlayerLogIdentifier() final { return logIdentifier(); }
- const PAL::Logger& mediaPlayerLogger() final { return logger(); }
+ const Logger& mediaPlayerLogger() final { return logger(); }
#endif
WeakPtrFactory<HTMLMediaElement> m_weakFactory;
size_t m_reportedExtraMemoryCost { 0 };
#if !RELEASE_LOG_DISABLED
- RefPtr<PAL::Logger> m_logger;
+ RefPtr<Logger> m_logger;
uint64_t m_logIdentifier;
#endif
} // namespace WebCore
-namespace PAL {
+namespace WTF {
template<typename Type>
struct LogArgument;
}
};
-}; // namespace PAL
+}; // namespace WTF
}
#if !RELEASE_LOG_DISABLED
-const PAL::Logger& MediaElementSession::logger() const
+const Logger& MediaElementSession::logger() const
{
return m_element.logger();
}
#include "PlatformMediaSession.h"
#include "SuccessOr.h"
#include "Timer.h"
-#include <pal/LoggerHelper.h>
+#include <wtf/LoggerHelper.h>
#include <wtf/TypeCasts.h>
namespace WebCore {
class MediaElementSession final : public PlatformMediaSession
#if !RELEASE_LOG_DISABLED
- , public PAL::LoggerHelper
+ , private LoggerHelper
#endif
- {
+{
WTF_MAKE_FAST_ALLOCATED;
public:
explicit MediaElementSession(HTMLMediaElement&);
}
#if !RELEASE_LOG_DISABLED
- const PAL::Logger& logger() const final;
+ const Logger& logger() const final;
const void* logIdentifier() const final;
const char* logClassName() const final { return "MediaElementSession"; }
WTFLogChannel& logChannel() const final;
} // namespace WebCore
-namespace PAL {
+namespace WTF {
template<typename Type>
struct LogArgument;
} // namespace WebCore
-namespace PAL {
+namespace WTF {
template<typename Type>
struct LogArgument;
}
};
-
}
#endif
} // namespace WebCore
-namespace PAL {
+namespace WTF {
template<typename Type>
struct LogArgument;
#include "HTMLMediaElement.h"
namespace WebCore {
+using namespace WTF;
static int s_uniqueId = 0;
return reinterpret_cast<const void*>(++logIdentifier);
}
-static RefPtr<PAL::Logger>& nullLogger()
+static RefPtr<Logger>& nullLogger()
{
- static NeverDestroyed<RefPtr<PAL::Logger>> logger;
+ static NeverDestroyed<RefPtr<Logger>> logger;
return logger;
}
#endif
#if !RELEASE_LOG_DISABLED
if (!nullLogger().get()) {
- nullLogger() = PAL::Logger::create(this);
+ nullLogger() = Logger::create(this);
nullLogger()->setEnabled(this, false);
}
#if ENABLE(VIDEO_TRACK)
-#include <pal/Logger.h>
-#include <pal/LoggerHelper.h>
+#include <wtf/LoggerHelper.h>
#include <wtf/text/AtomicString.h>
namespace WebCore {
class TrackBase
: public RefCounted<TrackBase>
#if !RELEASE_LOG_DISABLED
- , private PAL::LoggerHelper
+ , private LoggerHelper
#endif
{
public:
virtual bool enabled() const = 0;
#if !RELEASE_LOG_DISABLED
- const PAL::Logger& logger() const final { ASSERT(m_logger); return *m_logger.get(); }
+ const Logger& logger() const final { ASSERT(m_logger); return *m_logger.get(); }
const void* logIdentifier() const final { return m_logIdentifier; }
WTFLogChannel& logChannel() const final;
#endif
AtomicString m_language;
AtomicString m_validBCP47Language;
#if !RELEASE_LOG_DISABLED
- RefPtr<const PAL::Logger> m_logger;
+ RefPtr<const Logger> m_logger;
const void* m_logIdentifier;
#endif
};
} // namespace WebCore
-namespace PAL {
+namespace WTF {
template<typename Type>
struct LogArgument;
#if ENABLE(VIDEO_TRACK)
#include "InbandTextTrackPrivateClient.h"
-#include <pal/Logger.h>
namespace WebCore {
} // namespace WebCore
-namespace PAL {
+namespace WTF {
template<typename Type>
struct LogArgument;
const PlatformMedia NoPlatformMedia = { PlatformMedia::None, {0} };
#if !RELEASE_LOG_DISABLED
-static RefPtr<PAL::Logger>& nullLogger()
+static RefPtr<Logger>& nullLogger()
{
- static NeverDestroyed<RefPtr<PAL::Logger>> logger;
+ static NeverDestroyed<RefPtr<Logger>> logger;
return logger;
}
#endif
class NullMediaPlayerClient : public MediaPlayerClient {
public:
#if !RELEASE_LOG_DISABLED
- const PAL::Logger& mediaPlayerLogger() final
+ const Logger& mediaPlayerLogger() final
{
if (!nullLogger().get()) {
- nullLogger() = PAL::Logger::create(this);
+ nullLogger() = Logger::create(this);
nullLogger()->setEnabled(this, false);
}
}
#if !RELEASE_LOG_DISABLED
-const PAL::Logger& MediaPlayer::mediaPlayerLogger()
+const Logger& MediaPlayer::mediaPlayerLogger()
{
return client().mediaPlayerLogger();
}
#include "SecurityOriginHash.h"
#include "Timer.h"
#include "VideoTrackPrivate.h"
-#include <pal/Logger.h>
#include <runtime/Uint8Array.h>
#include <wtf/Forward.h>
#include <wtf/Function.h>
#include <wtf/HashSet.h>
+#include <wtf/Logger.h>
#include <wtf/MediaTime.h>
#include <wtf/Noncopyable.h>
#include <wtf/Ref.h>
#if !RELEASE_LOG_DISABLED
virtual const void* mediaPlayerLogIdentifier() { return nullptr; }
- virtual const PAL::Logger& mediaPlayerLogger() = 0;
+ virtual const Logger& mediaPlayerLogger() = 0;
#endif
};
bool shouldCheckHardwareSupport() const;
#if !RELEASE_LOG_DISABLED
- const PAL::Logger& mediaPlayerLogger();
+ const Logger& mediaPlayerLogger();
const void* mediaPlayerLogIdentifier() { return client().mediaPlayerLogIdentifier(); }
#endif
} // namespace WebCore
-namespace PAL {
+namespace WTF {
template<typename Type>
struct LogArgument;
template <>
-struct LogArgument<WTF::MediaTime> {
- static String toString(const WTF::MediaTime& time)
+struct LogArgument<MediaTime> {
+ static String toString(const MediaTime& time)
{
return time.toString();
}
} // namespace WebCore
-namespace PAL {
+namespace WTF {
template<typename Type>
struct LogArgument;
}
};
-}; // namespace PAL
+}; // namespace WTF
namespace WebCore {
#if !RELEASE_LOG_DISABLED
-void TrackPrivateBase::setLogger(const PAL::Logger& logger, const void* logIdentifier)
+void TrackPrivateBase::setLogger(const Logger& logger, const void* logIdentifier)
{
m_logger = &logger;
m_logIdentifier = logIdentifier;
#if ENABLE(VIDEO_TRACK)
-#include <pal/Logger.h>
-#include <pal/LoggerHelper.h>
+#include <wtf/LoggerHelper.h>
#include <wtf/MediaTime.h>
#include <wtf/ThreadSafeRefCounted.h>
#include <wtf/text/AtomicString.h>
class TrackPrivateBase
: public ThreadSafeRefCounted<TrackPrivateBase>
#if !RELEASE_LOG_DISABLED
- , private PAL::LoggerHelper
+ , private LoggerHelper
#endif
{
WTF_MAKE_NONCOPYABLE(TrackPrivateBase);
}
#if !RELEASE_LOG_DISABLED
- void setLogger(const PAL::Logger&, const void*);
- const PAL::Logger& logger() const final { ASSERT(m_logger); return *m_logger.get(); }
+ void setLogger(const Logger&, const void*);
+ const Logger& logger() const final { ASSERT(m_logger); return *m_logger.get(); }
const void* logIdentifier() const final { return m_logIdentifier; }
WTFLogChannel& logChannel() const final;
#endif
TrackPrivateBase() = default;
#if !RELEASE_LOG_DISABLED
- RefPtr<const PAL::Logger> m_logger;
+ RefPtr<const Logger> m_logger;
const void* m_logIdentifier;
#endif
};
#import <AVFoundation/AVPlayerItem.h>
#import <AVFoundation/AVPlayerItemTrack.h>
#import <objc/runtime.h>
-#import <pal/Logger.h>
#import <wtf/SoftLinking.h>
@class AVMediaSelectionOption;
#include "URL.h"
#include <CoreMedia/CoreMedia.h>
#include <heap/HeapInlines.h>
-#include <pal/Logger.h>
#include <runtime/DataView.h>
#include <runtime/TypedArrayInlines.h>
#include <runtime/Uint16Array.h>
#include "InbandTextTrackPrivateAVF.h"
#include "MediaPlayerPrivate.h"
#include "Timer.h"
-#include <pal/LoggerHelper.h>
#include <wtf/Deque.h>
#include <wtf/Function.h>
#include <wtf/HashSet.h>
#include <wtf/Lock.h>
+#include <wtf/LoggerHelper.h>
#include <wtf/RetainPtr.h>
#include <wtf/WeakPtr.h>
-namespace PAL {
-class Logger;
-}
-
namespace WebCore {
class InbandMetadataTextTrackPrivateAVF;
class MediaPlayerPrivateAVFoundation : public MediaPlayerPrivateInterface, public AVFInbandTrackParent
#if !RELEASE_LOG_DISABLED
- , private PAL::LoggerHelper
+ , private LoggerHelper
#endif
{
public:
#endif
#if !RELEASE_LOG_DISABLED
- const PAL::Logger& logger() const final { return m_logger.get(); }
+ const Logger& logger() const final { return m_logger.get(); }
const char* logClassName() const override { return "MediaPlayerPrivateAVFoundation"; }
const void* logIdentifier() const final { return reinterpret_cast<const void*>(m_logIdentifier); }
WTFLogChannel& logChannel() const final;
MediaPlayer::Preload m_preload;
#if !RELEASE_LOG_DISABLED
- Ref<const PAL::Logger> m_logger;
+ Ref<const Logger> m_logger;
const void* m_logIdentifier;
#endif
#if !RELEASE_LOG_DISABLED
if (m_callback->logger().willLog(m_callback->logChannel(), WTFLogLevelDebug) && !([keyPath isEqualToString:@"loadedTimeRanges"] || [keyPath isEqualToString:@"seekableTimeRanges"])) {
- auto identifier = PAL::Logger::LogSiteIdentifier("MediaPlayerPrivateAVFoundation", "observeValueForKeyPath", m_callback->logIdentifier());
+ auto identifier = Logger::LogSiteIdentifier("MediaPlayerPrivateAVFoundation", "observeValueForKeyPath", m_callback->logIdentifier());
if (shouldLogValue) {
if ([keyPath isEqualToString:@"duration"])
}; // namespace WebCore
-namespace PAL {
+namespace WTF {
template<typename Type>
struct LogArgument;
}
};
-}; // namespace PAL
+}; // namespace WTF
#endif
}; // namespace WebCore
-namespace PAL {
+namespace WTF {
template<typename Type>
struct LogArgument;
}
};
-}; // namespace PAL
+}; // namespace WTF
#endif
}; // namespace WebCore
-namespace PAL {
+namespace WTF {
template<typename Type>
struct LogArgument;
}
};
-}; // namespace PAL
+}; // namespace WTF
#endif
}; // namespace WebCore
-namespace PAL {
+namespace WTF {
template<typename Type>
struct LogArgument;
}
};
-}; // namespace PAL
+}; // namespace WTF
#endif
#include "AudioSession.h"
#include "CAAudioStreamDescription.h"
#include "Logging.h"
-#include <pal/Logger.h>
#include <pal/cf/CoreMediaSoftLink.h>
+2017-12-08 Eric Carlson <eric.carlson@apple.com>
+
+ Move Logger from PAL to WTF so it can be used outside of WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=180561
+
+ Reviewed by Alex Christensen.
+
+ * TestWebKitAPI/Tests/WebCore/Logging.cpp:
+ (TestWebKitAPI::TEST_F):
+
2017-12-08 Chris Dumez <cdumez@apple.com>
Different WebKitTestRunner instances should use different service worker registrations databases
#include "config.h"
#include "WTFStringUtilities.h"
-#include <pal/Logger.h>
-#include <pal/LoggerHelper.h>
#include <wtf/Assertions.h>
+#include <wtf/LoggerHelper.h>
#include <wtf/MainThread.h>
#define LOG_CHANNEL_PREFIX Test
-using namespace PAL;
using namespace WTF;
const char* logTestingSubsystem = "com.webkit.testing";