Move Logger from PAL to WTF so it can be used outside of WebCore
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Dec 2017 20:33:53 +0000 (20:33 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Dec 2017 20:33:53 +0000 (20:33 +0000)
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

41 files changed:
Source/WTF/ChangeLog
Source/WTF/WTF.xcodeproj/project.pbxproj
Source/WTF/wtf/Logger.h [moved from Source/WebCore/PAL/pal/Logger.h with 99% similarity]
Source/WTF/wtf/LoggerHelper.h [moved from Source/WebCore/PAL/pal/LoggerHelper.h with 94% similarity]
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/PeerConnectionBackend.h
Source/WebCore/Modules/mediastream/RTCPeerConnection.h
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/html/HTMLMediaElementEnums.h
Source/WebCore/html/MediaElementSession.cpp
Source/WebCore/html/MediaElementSession.h
Source/WebCore/html/track/DataCue.h
Source/WebCore/html/track/TextTrackCue.h
Source/WebCore/html/track/TextTrackCueGeneric.h
Source/WebCore/html/track/TrackBase.cpp
Source/WebCore/html/track/TrackBase.h
Source/WebCore/html/track/VTTCue.h
Source/WebCore/platform/graphics/InbandTextTrackPrivate.h
Source/WebCore/platform/graphics/InbandTextTrackPrivateClient.h
Source/WebCore/platform/graphics/MediaPlayer.cpp
Source/WebCore/platform/graphics/MediaPlayer.h
Source/WebCore/platform/graphics/MediaPlayerEnums.h
Source/WebCore/platform/graphics/TrackPrivateBase.cpp
Source/WebCore/platform/graphics/TrackPrivateBase.h
Source/WebCore/platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
Source/WebCore/platform/mediastream/RTCIceConnectionState.h
Source/WebCore/platform/mediastream/RTCIceGatheringState.h
Source/WebCore/platform/mediastream/RTCPeerConnectionState.h
Source/WebCore/platform/mediastream/RTCSignalingState.h
Source/WebCore/platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/Logging.cpp

index 5e9c3a1fd2d15f68990023c66b5c5df96b963cfc..46c2a9dae1c3bcea699295e4ad0de2148a7afd5d 100644 (file)
@@ -1,3 +1,31 @@
+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
index 682ddfec7b302de024fd7aa3406fd5d4d60d65eb..0799e810fc42f5f3d13390332a50e43838e6b1bc 100644 (file)
 /* 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 */,
similarity index 99%
rename from Source/WebCore/PAL/pal/Logger.h
rename to Source/WTF/wtf/Logger.h
index 1c8276e8918c36264f80c2eca26713f1abebbd89..2c99bd50fe6e53368ef6a27291b91ab2eea12c37 100644 (file)
@@ -33,7 +33,7 @@
 #include <wtf/text/StringBuilder.h>
 #include <wtf/text/WTFString.h>
 
-namespace PAL {
+namespace WTF {
 
 template<typename T>
 struct LogArgument {
@@ -221,4 +221,6 @@ struct LogArgument<Logger::LogSiteIdentifier> {
     }
 };
 
-} // namespace PAL
+} // namespace WTF
+
+using WTF::Logger;
similarity index 94%
rename from Source/WebCore/PAL/pal/LoggerHelper.h
rename to Source/WTF/wtf/LoggerHelper.h
index 4be052773ed2ef6d6338f7ce36131cb8879649c5..b2507fccc3b336cc697983875df976a40284057a 100644 (file)
@@ -25,9 +25,9 @@
 
 #pragma once
 
-namespace PAL {
+#include <wtf/Logger.h>
 
-class Logger;
+namespace WTF {
 
 class LoggerHelper {
 public:
@@ -38,10 +38,9 @@ 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__)
@@ -68,4 +67,7 @@ public:
     
 };
 
-} // namespace PAL
+} // namespace WTF
+
+using WTF::LoggerHelper;
+
index f4368be6ed06ee0403c96be4e6293c20533e1bff..820304a52c96c176b671b7919e863f119e5553a9 100644 (file)
@@ -1,3 +1,69 @@
+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
index df66f92d09d9df3056ac550f3182f0fb09e311f1..9ef42eae4b4498f17d31ee8ed80dfba591312bab 100644 (file)
@@ -37,8 +37,7 @@
 #include "RTCRtpParameters.h"
 #include "RTCSessionDescription.h"
 #include "RTCSignalingState.h"
-#include <pal/Logger.h>
-#include <pal/LoggerHelper.h>
+#include <wtf/LoggerHelper.h>
 
 namespace WebCore {
 
@@ -67,7 +66,7 @@ using CreatePeerConnectionBackend = std::unique_ptr<PeerConnectionBackend> (*)(R
 
 class PeerConnectionBackend
 #if !RELEASE_LOG_DISABLED
-    : public PAL::LoggerHelper
+    : private LoggerHelper
 #endif
 {
 public:
@@ -120,7 +119,7 @@ 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;
@@ -176,7 +175,7 @@ private:
     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 };
index f1c971747f88695ba655303dd545a5660f51269e..bee8121d20c1995566cbcad3227adfdee397c7dc 100644 (file)
@@ -45,7 +45,7 @@
 #include "RTCPeerConnectionState.h"
 #include "RTCRtpTransceiver.h"
 #include "RTCSignalingState.h"
-#include <pal/LoggerHelper.h>
+#include <wtf/LoggerHelper.h>
 
 namespace WebCore {
 
@@ -70,7 +70,7 @@ class RTCPeerConnection final
     , public EventTargetWithInlineData
     , public ActiveDOMObject
 #if !RELEASE_LOG_DISABLED
-    , public PAL::LoggerHelper
+    , private LoggerHelper
 #endif
 {
 public:
@@ -160,7 +160,7 @@ 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;
@@ -204,7 +204,7 @@ private:
     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
 
index b747d208f0d1181af6fdf495f49dd4eb6849112d..eb0f394671b2f640c86b3da45e4cb7f4b8f305a4 100644 (file)
 #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 {
@@ -62,7 +61,7 @@ class LibWebRTCMediaEndpoint
     , private webrtc::PeerConnectionObserver
     , private webrtc::RTCStatsCollectorCallback
 #if !RELEASE_LOG_DISABLED
-    , public PAL::LoggerHelper
+    , private LoggerHelper
 #endif
 {
 public:
@@ -134,7 +133,7 @@ private:
     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;
@@ -213,14 +212,14 @@ private:
 
 #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;
@@ -233,6 +232,6 @@ struct LogArgument<webrtc::RTCStats> {
     }
 };
 
-}; // namespace PAL
+}; // namespace WTF
 
 #endif // USE(LIBWEBRTC)
index 664c562991fc061d3108708d5905aa7b72113070..a46a6d0272a51f2eff4f71cecf0281cd1a82f506 100644 (file)
@@ -1,3 +1,14 @@
+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
index d883fcea717fa2f9bdf9c1022bc5b781b9dfc91a..f936936845274befc8ef8cd7d54d5c46c831bcd1 100644 (file)
@@ -21,8 +21,6 @@
 /* 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 */,
index bcc3380d2449034e4faee3d1ee3f20c597c51079..7cdc70fd6ad24260f4f0ad785059165162307d29 100644 (file)
 #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>
index 92e6feaa48471e2d2971a4922399f5d06dd29d95..c23348d4911578ad09a86679eb143230495863ae 100644 (file)
 #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>
@@ -313,7 +313,7 @@ class Document
     , public FontSelectorClient
     , public FrameDestructionObserver
     , public Supplementable<Document>
-    , public PAL::Logger::Observer {
+    , public Logger::Observer {
 public:
     static Ref<Document> create(Frame* frame, const URL& url)
     {
@@ -1371,7 +1371,7 @@ public:
     TextAutoSizing& textAutoSizing();
 #endif
 
-    PAL::Logger& logger();
+    Logger& logger();
 
     void hasStorageAccess(Ref<DeferredPromise>&& passedPromise);
     void requestStorageAccess(Ref<DeferredPromise>&& passedPromise);
@@ -1855,7 +1855,7 @@ private:
 
     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;
index ca982e8cdd7a3efb7b2bb7497b14fadbda0f2283..758cf0c3e1d5cb63e2d2f91f14934cbc13b19a38 100644 (file)
@@ -88,7 +88,6 @@
 #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)
index 86cfdfa117489a7fdb962c92a939b791f990e8a1..bf2f73b2d4a123d0f7267e18eb6642a15e6927d5 100644 (file)
@@ -39,8 +39,8 @@
 #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)
@@ -66,7 +66,6 @@
 #endif
 
 namespace PAL {
-class Logger;
 class SleepDisabler;
 }
 
@@ -141,7 +140,7 @@ class HTMLMediaElement
     , private CDMClient
 #endif
 #if !RELEASE_LOG_DISABLED
-    , public PAL::LoggerHelper
+    , private LoggerHelper
 #endif
 {
 public:
@@ -540,7 +539,7 @@ 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
@@ -906,7 +905,7 @@ private:
     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;
@@ -1127,7 +1126,7 @@ private:
     size_t m_reportedExtraMemoryCost { 0 };
 
 #if !RELEASE_LOG_DISABLED
-    RefPtr<PAL::Logger> m_logger;
+    RefPtr<Logger> m_logger;
     uint64_t m_logIdentifier;
 #endif
 
index 898cf41846ce81a7ba870684a2f88a6026d71c93..cfa72fa73cdac711adf5498dab8c84f3c3019f4f 100644 (file)
@@ -63,7 +63,7 @@ String convertEnumerationToString(HTMLMediaElementEnums::NetworkState);
 
 } // namespace WebCore
 
-namespace PAL {
+namespace WTF {
 
 template<typename Type>
 struct LogArgument;
@@ -84,5 +84,5 @@ struct LogArgument<WebCore::HTMLMediaElementEnums::NetworkState> {
     }
 };
 
-}; // namespace PAL
+}; // namespace WTF
 
index bda91063bc580f714b22ea7fe43eae7fbae6ddb1..2d5bb51fbe667589512e598a2f8fcc22aff27d2c 100644 (file)
@@ -845,7 +845,7 @@ bool MediaElementSession::willLog(WTFLogLevel level) const
 }
 
 #if !RELEASE_LOG_DISABLED
-const PAL::Logger& MediaElementSession::logger() const
+const Logger& MediaElementSession::logger() const
 {
     return m_element.logger();
 }
index b3e89ee8cb62757c9e42055bf462f0cb24338105..6a1cb0bc8aec985c62e7c7d4c4885d0d024dda2b 100644 (file)
@@ -32,7 +32,7 @@
 #include "PlatformMediaSession.h"
 #include "SuccessOr.h"
 #include "Timer.h"
-#include <pal/LoggerHelper.h>
+#include <wtf/LoggerHelper.h>
 #include <wtf/TypeCasts.h>
 
 namespace WebCore {
@@ -54,9 +54,9 @@ class SourceBuffer;
 
 class MediaElementSession final : public PlatformMediaSession
 #if !RELEASE_LOG_DISABLED
-    , public PAL::LoggerHelper
+    , private LoggerHelper
 #endif
-    {
+{
     WTF_MAKE_FAST_ALLOCATED;
 public:
     explicit MediaElementSession(HTMLMediaElement&);
@@ -149,7 +149,7 @@ public:
     }
 
 #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;
index 940c25d61e0d972e1f84824f3f7c9a62801f06b9..c8edb1a0e7aebb0cb2c1a42f283636417a2bdcb7 100644 (file)
@@ -108,7 +108,7 @@ const DataCue* toDataCue(const TextTrackCue*);
 
 } // namespace WebCore
 
-namespace PAL {
+namespace WTF {
 
 template<typename Type>
 struct LogArgument;
index 1da56c7b996d7319cb54a3ab31e8aaeaa2276f17..bdb292f6521aa9af8e792cc476c4cca195892693 100644 (file)
@@ -121,7 +121,7 @@ private:
 
 } // namespace WebCore
 
-namespace PAL {
+namespace WTF {
 
 template<typename Type>
 struct LogArgument;
@@ -134,7 +134,6 @@ struct LogArgument<WebCore::TextTrackCue> {
     }
 };
 
-
 }
 
 #endif
index 266780bb4bc48577782de350312f046e97963dba..d5dedc4aba914e24da774e5c84c768516a89ff56 100644 (file)
@@ -94,7 +94,7 @@ private:
 
 } // namespace WebCore
 
-namespace PAL {
+namespace WTF {
 
 template<typename Type>
 struct LogArgument;
index 7f5d4483edff4c5542a454c7b58749f76cd1ff14..333a2f8b6cbeca67be326e17e894879c61a6a2ad 100644 (file)
@@ -35,6 +35,7 @@
 #include "HTMLMediaElement.h"
 
 namespace WebCore {
+using namespace WTF;
 
 static int s_uniqueId = 0;
 
@@ -45,9 +46,9 @@ static const void* nextLogIdentifier()
     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
@@ -64,7 +65,7 @@ TrackBase::TrackBase(Type type, const AtomicString& id, const AtomicString& labe
 
 #if !RELEASE_LOG_DISABLED
     if (!nullLogger().get()) {
-        nullLogger() = PAL::Logger::create(this);
+        nullLogger() = Logger::create(this);
         nullLogger()->setEnabled(this, false);
     }
 
index 213259dd6f7f38c6569730dd028717f35e7e3644..0168c51934498de23249e9fc3caa73721bc50670 100644 (file)
@@ -27,8 +27,7 @@
 
 #if ENABLE(VIDEO_TRACK)
 
-#include <pal/Logger.h>
-#include <pal/LoggerHelper.h>
+#include <wtf/LoggerHelper.h>
 #include <wtf/text/AtomicString.h>
 
 namespace WebCore {
@@ -40,7 +39,7 @@ class SourceBuffer;
 class TrackBase
     : public RefCounted<TrackBase>
 #if !RELEASE_LOG_DISABLED
-    , private PAL::LoggerHelper
+    , private LoggerHelper
 #endif
 {
 public:
@@ -75,7 +74,7 @@ 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
@@ -97,7 +96,7 @@ private:
     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
 };
index 97beb1ac7b0bf6e41d58fe72631413b56a9b2403..52293851a6120fcece7ca76b107d2b75d798b3b3 100644 (file)
@@ -229,7 +229,7 @@ const VTTCue* toVTTCue(const TextTrackCue*);
 
 } // namespace WebCore
 
-namespace PAL {
+namespace WTF {
 
 template<typename Type>
 struct LogArgument;
index d41a597fb50971a70ec862e7db82cdae8732ee3f..38b5191c620842ed0afdc7b06dee109ed2df29a8 100644 (file)
@@ -29,7 +29,6 @@
 #if ENABLE(VIDEO_TRACK)
 
 #include "InbandTextTrackPrivateClient.h"
-#include <pal/Logger.h>
 
 namespace WebCore {
 
index 0c54c89a3730e2a9e54b985624fd71737acbda17..19ecc59c46ce031a2df2be63c0030b534b801a34 100644 (file)
@@ -264,7 +264,7 @@ public:
 
 } // namespace WebCore
 
-namespace PAL {
+namespace WTF {
 
 template<typename Type>
 struct LogArgument;
index 4a473af84e51969dd8d809941b663f510c544026..2ef212f7095d099cfc8f7ce31d7b4900af677cd0 100644 (file)
@@ -92,9 +92,9 @@ namespace WebCore {
 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
@@ -172,10 +172,10 @@ public:
 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);
         }
 
@@ -1503,7 +1503,7 @@ bool MediaPlayer::shouldCheckHardwareSupport() const
 }
 
 #if !RELEASE_LOG_DISABLED
-const PAL::Logger& MediaPlayer::mediaPlayerLogger()
+const Logger& MediaPlayer::mediaPlayerLogger()
 {
     return client().mediaPlayerLogger();
 }
index ddd0ecb59fbffdca437aec5e6ee0832e197abf12..e27f16d05cf877986c126d21d3e8797cc15d26df 100644 (file)
 #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>
@@ -303,7 +303,7 @@ public:
 
 #if !RELEASE_LOG_DISABLED
     virtual const void* mediaPlayerLogIdentifier() { return nullptr; }
-    virtual const PAL::Logger& mediaPlayerLogger() = 0;
+    virtual const Logger& mediaPlayerLogger() = 0;
 #endif
 };
 
@@ -633,7 +633,7 @@ public:
     bool shouldCheckHardwareSupport() const;
 
 #if !RELEASE_LOG_DISABLED
-    const PAL::Logger& mediaPlayerLogger();
+    const Logger& mediaPlayerLogger();
     const void* mediaPlayerLogIdentifier() { return client().mediaPlayerLogIdentifier(); }
 #endif
 
@@ -689,14 +689,14 @@ public:
 
 } // 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();
     }
index 90e748aeadbc9eca38376aa401d05e7c9a8278c4..155683839c7312b6de1492d0a42751d932bd0565 100644 (file)
@@ -50,7 +50,7 @@ WTF::String convertEnumerationToString(MediaPlayerEnums::NetworkState);
 } // namespace WebCore
 
 
-namespace PAL {
+namespace WTF {
 
 template<typename Type>
 struct LogArgument;
@@ -71,4 +71,4 @@ struct LogArgument<WebCore::MediaPlayerEnums::NetworkState> {
     }
 };
 
-}; // namespace PAL
+}; // namespace WTF
index 42a9bf3a44c376593fa2dacb01af29cb7db4963d..4363140a5712d74199d700f73da9323927e8c243 100644 (file)
@@ -33,7 +33,7 @@
 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;
index 505de22c630e06aeb2c061a8c8c83dc8ca1236d8..0fb69769f2b63f3976d054e8102bd822d412cf5f 100644 (file)
@@ -29,8 +29,7 @@
 
 #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>
@@ -49,7 +48,7 @@ public:
 class TrackPrivateBase
     : public ThreadSafeRefCounted<TrackPrivateBase>
 #if !RELEASE_LOG_DISABLED
-    , private PAL::LoggerHelper
+    , private LoggerHelper
 #endif
 {
     WTF_MAKE_NONCOPYABLE(TrackPrivateBase);
@@ -74,8 +73,8 @@ public:
     }
 
 #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
@@ -84,7 +83,7 @@ protected:
     TrackPrivateBase() = default;
 
 #if !RELEASE_LOG_DISABLED
-    RefPtr<const PAL::Logger> m_logger;
+    RefPtr<const Logger> m_logger;
     const void* m_logIdentifier;
 #endif
 };
index 65f57fa514bbe606269ed739070b6737f64e8077..2aafa1c11f2f30dc9054e83615b502b3bb7bbed2 100644 (file)
@@ -35,7 +35,6 @@
 #import <AVFoundation/AVPlayerItem.h>
 #import <AVFoundation/AVPlayerItemTrack.h>
 #import <objc/runtime.h>
-#import <pal/Logger.h>
 #import <wtf/SoftLinking.h>
 
 @class AVMediaSelectionOption;
index 4466dca8dfece9eba06c7b52523730f0efc0d852..798d16d6588003c5c4d9b344120857e6ae75aa93 100644 (file)
@@ -42,7 +42,6 @@
 #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>
index 7c172729b04b922ad90fe77a8f483c950039d4f8..110a99c24289da9c211c8ff7a0577e41c2b524d7 100644 (file)
 #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;
@@ -52,7 +48,7 @@ class GenericCueData;
 
 class MediaPlayerPrivateAVFoundation : public MediaPlayerPrivateInterface, public AVFInbandTrackParent
 #if !RELEASE_LOG_DISABLED
-    , private PAL::LoggerHelper
+    , private LoggerHelper
 #endif
 {
 public:
@@ -153,7 +149,7 @@ 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;
@@ -355,7 +351,7 @@ private:
     MediaPlayer::Preload m_preload;
 
 #if !RELEASE_LOG_DISABLED
-    Ref<const PAL::Logger> m_logger;
+    Ref<const Logger> m_logger;
     const void* m_logIdentifier;
 #endif
 
index 923eb9814b0d7a5098e52d90504f1db1ac9061f0..820e274e952c49998ddfdabf172026c2eb98e618 100644 (file)
@@ -3370,7 +3370,7 @@ NSArray* playerKVOProperties()
 
 #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"])
index 9b2374c34c2e15706db1e13f534fa63c655ae124..ab9895da74568a8c2fda5598da80de26eccbe274 100644 (file)
@@ -42,7 +42,7 @@ String convertEnumerationToString(RTCIceConnectionState); // in JSCRTCIceConnect
 
 }; // namespace WebCore
 
-namespace PAL {
+namespace WTF {
 
 template<typename Type>
 struct LogArgument;
@@ -55,6 +55,6 @@ struct LogArgument<WebCore::RTCIceConnectionState> {
     }
 };
 
-}; // namespace PAL
+}; // namespace WTF
 
 #endif
index d3ddf00248364ad7fd8e4d5eef2387ba5e7f92f2..1c1215d2255d6e170fcf4c443eecf801a1b31938 100644 (file)
@@ -40,7 +40,7 @@ String convertEnumerationToString(RTCIceGatheringState); // in JSCRTCIceGatherin
 
 }; // namespace WebCore
 
-namespace PAL {
+namespace WTF {
 
 template<typename Type>
 struct LogArgument;
@@ -53,6 +53,6 @@ struct LogArgument<WebCore::RTCIceGatheringState> {
     }
 };
 
-}; // namespace PAL
+}; // namespace WTF
 
 #endif
index 0184da15edaf13a7cc79e50843b199c95fabcd55..6968e0fe231666d26147f1ca1ddbf4be41bf5765 100644 (file)
@@ -41,7 +41,7 @@ String convertEnumerationToString(RTCPeerConnectionState); // in JSCRTCPeerConne
 
 }; // namespace WebCore
 
-namespace PAL {
+namespace WTF {
 
 template<typename Type>
 struct LogArgument;
@@ -54,6 +54,6 @@ struct LogArgument<WebCore::RTCPeerConnectionState> {
     }
 };
 
-}; // namespace PAL
+}; // namespace WTF
 
 #endif
index 4df9421d1f721cb29cc59ae691ea55e547a8786b..494977dfa1d8816a1a60f48aaec0c479841384f1 100644 (file)
@@ -40,7 +40,7 @@ String convertEnumerationToString(RTCSignalingState); // in JSCRTCSignalingState
 
 }; // namespace WebCore
 
-namespace PAL {
+namespace WTF {
 
 template<typename Type>
 struct LogArgument;
@@ -53,6 +53,6 @@ struct LogArgument<WebCore::RTCSignalingState> {
     }
 };
 
-}; // namespace PAL
+}; // namespace WTF
 
 #endif
index c3def9d89ebf95fdb107691cdbbf5ab792474bbb..100a5964e2dd854667d13ee4c0546aea9fc1dc30 100644 (file)
@@ -31,7 +31,6 @@
 #include "AudioSession.h"
 #include "CAAudioStreamDescription.h"
 #include "Logging.h"
-#include <pal/Logger.h>
 
 #include <pal/cf/CoreMediaSoftLink.h>
 
index 93fe3442efa47068c612e94e5416f31246b34e1b..fe228defa58eb198fc77b9316ae522726058c9e0 100644 (file)
@@ -1,3 +1,13 @@
+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
index b45de826d8961d76c3a80235f4d9b744a00763d2..1e4c342a59e284f0489819a5bb37df05873d3ff5 100644 (file)
 
 #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";