| Index: Source/core/page/PageConsole.cpp
|
| diff --git a/Source/core/page/PageConsole.cpp b/Source/core/page/PageConsole.cpp
|
| index 56d9dc26dd405222a3d691281ace9d8c18d5900c..45f016d715b30b186e5ec36d35fa96f7debcd209 100644
|
| --- a/Source/core/page/PageConsole.cpp
|
| +++ b/Source/core/page/PageConsole.cpp
|
| @@ -58,33 +58,10 @@ namespace {
|
|
|
| int muteCount = 0;
|
|
|
| -// Ensure that this stays in sync with the DeprecatedFeature enum.
|
| -static const char* const deprecationMessages[] = {
|
| - // CSP
|
| - "The 'X-WebKit-CSP' headers are deprecated; please consider using the canonical 'Content-Security-Policy' header instead.",
|
| -
|
| - // HTMLMediaElement
|
| - "'HTMLMediaElement.webkitAddKey()' is deprecated. Please use 'MediaKeySession.update()' instead.",
|
| - "'HTMLMediaElement.webkitGenerateKeyRequest()' is deprecated. Please use 'MediaKeys.createSession()' instead.",
|
| -
|
| - // Performance
|
| - "'window.performance.webkitGet*' methods have been deprecated. Please use the unprefixed 'performance.get*' methods instead.",
|
| - "'window.performance.webkit*' methods have been deprecated. Please use the unprefixed 'window.performance.*' methods instead.",
|
| -
|
| - // Quota
|
| - "'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead.",
|
| -
|
| - // Web Audio
|
| - "AudioBufferSourceNode 'looping' attribute is deprecated. Use 'loop' instead.",
|
| -};
|
| -
|
| -COMPILE_ASSERT(WTF_ARRAY_LENGTH(deprecationMessages) == static_cast<int>(WebCore::PageConsole::NumberOfFeatures), DeprecationMessages_matches_enum);
|
| -
|
| }
|
|
|
| PageConsole::PageConsole(Page* page)
|
| : m_page(page)
|
| - , m_deprecationNotifications(NumberOfFeatures)
|
| {
|
| }
|
|
|
| @@ -142,43 +119,4 @@ void PageConsole::unmute()
|
| muteCount--;
|
| }
|
|
|
| -void PageConsole::reportDeprecation(DOMWindow* window, DeprecatedFeature feature)
|
| -{
|
| - if (!window)
|
| - return;
|
| - PageConsole::reportDeprecation(window->document(), feature);
|
| -}
|
| -
|
| -// static
|
| -void PageConsole::reportDeprecation(ScriptExecutionContext* context, DeprecatedFeature feature)
|
| -{
|
| - if (!context || !context->isDocument())
|
| - return;
|
| - PageConsole::reportDeprecation(toDocument(context), feature);
|
| -}
|
| -
|
| -// static
|
| -void PageConsole::reportDeprecation(Document* document, DeprecatedFeature feature)
|
| -{
|
| - if (!document)
|
| - return;
|
| -
|
| - Page* page = document->page();
|
| - if (!page || !page->console())
|
| - return;
|
| -
|
| - page->console()->addDeprecationMessage(feature);
|
| -}
|
| -
|
| -void PageConsole::addDeprecationMessage(DeprecatedFeature feature)
|
| -{
|
| - ASSERT(feature < NumberOfFeatures);
|
| -
|
| - if (m_deprecationNotifications.quickGet(feature))
|
| - return;
|
| -
|
| - m_deprecationNotifications.quickSet(feature);
|
| - addMessage(DeprecationMessageSource, WarningMessageLevel, ASCIILiteral(deprecationMessages[feature]));
|
| -}
|
| -
|
| } // namespace WebCore
|
|
|