Add diagnostic logging for plugins-per-page.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jul 2012 22:58:02 +0000 (22:58 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jul 2012 22:58:02 +0000 (22:58 +0000)
commit7f571581768794211c674aae90436dfa37ec12ed
tree37e14e11c904a85c6b207523b97ff30ae7cfb6a5
parent3d4db78780d7b29074dd708cd54ed65b6d80030e
Add diagnostic logging for plugins-per-page.
https://bugs.webkit.org/show_bug.cgi?id=92538

Reviewed by Anders Carlsson.

Add some diagnostic logging for whether a page has seen a plugin, and
whether a page has seen a plugin of a specific type.

Move the diagnostic logging out of the elemements themselves:
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::updateWidget):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateWidget):

Instead, log when the plugin is requested, thereby catching plugins which are
rejected because, e.g., Java is disabled or not installed:
* loader/SubframeLoader.cpp:
(WebCore::logPluginRequest):
(WebCore::SubframeLoader::requestObject):
(WebCore::SubframeLoader::createJavaAppletWidget):

Add new diagnostic key values:
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::pageContainsPluginKey):
(WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey):
* page/DiagnosticLoggingKeys.h:

Add a map of plugin types seen per-page for diagnostic purposes:
* page/Page.cpp:
(WebCore::Page::hasSeenAnyPlugin):
(WebCore::Page::hasSeenPlugin):
(WebCore::Page::sawPlugin):
* page/Page.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123930 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLEmbedElement.cpp
Source/WebCore/html/HTMLObjectElement.cpp
Source/WebCore/loader/SubframeLoader.cpp
Source/WebCore/page/DiagnosticLoggingKeys.cpp
Source/WebCore/page/DiagnosticLoggingKeys.h
Source/WebCore/page/Page.cpp
Source/WebCore/page/Page.h