Switch HTMLMediaElement to release logging
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Sep 2017 03:44:05 +0000 (03:44 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Sep 2017 03:44:05 +0000 (03:44 +0000)
commita8ea05b096c3e5b5ab57098c63b2a6c23611c954
tree827fb7333a3ec208e526e5db49e71b1eb7de68aa
parent45d19d79878fafc24c245d2b669935377a335ba8
Switch HTMLMediaElement to release logging
https://bugs.webkit.org/show_bug.cgi?id=176065

Reviewed by Jer Noble.

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::privateBrowsingStateDidChange): Disable the logger when private browsing
mode is enabled.
(WebCore::Document::logger const):
* dom/Document.h:

Convert debug-only logging to configurable release logging.
* html/HTMLMediaElement.cpp:
(PAL::LogArgument<WebCore::URL>::toString): Logger template for URL that returns the url as a
String when only when the LOG_DISABLED build flag is not defined. Returns "[url]" when it is.
* html/HTMLMediaElement.h:

Source/WTF:

* wtf/MediaTime.cpp:
(WTF::MediaTime::dump const): Use toString.
(WTF::MediaTime::toString const): New.

Tools:

* TestWebKitAPI/Tests/WebCore/Logging.cpp:
(TestWebKitAPI::LogObserver::level const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/MediaTime.cpp
Source/WTF/wtf/MediaTime.h
Source/WebCore/ChangeLog
Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
Source/WebCore/PAL/pal/Logger.h
Source/WebCore/PAL/pal/LoggerHelper.h [new file with mode: 0644]
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/platform/graphics/MediaPlayer.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/Logging.cpp