Web Inspector: streamline Console's MessageType and MessageSource semantics.
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Sep 2011 13:46:08 +0000 (13:46 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Sep 2011 13:46:08 +0000 (13:46 +0000)
commit818376c5fcaec0eea0329a8fa83eab7379efabb0
tree7ef31ab02bbb9617363ec49472fdf9978bfdb8f9
parent545247378b47507f71c0c5eda5615f420d355628
Web Inspector: streamline Console's MessageType and MessageSource semantics.
https://bugs.webkit.org/show_bug.cgi?id=68342

Source/WebCore:

This change fixes semantics of the MessageSource and MessageType:
MessageSource is now the source of the message (be it Network, HTML
parser or Console API). MessageType is only defined for the Console API
messages and contains the name of the API call (log, dir, dirxml, etc.).
Subsequent https://bugs.webkit.org/show_bug.cgi?id=66371 will make MessageType
private to the inspector.

Reviewed by Tony Gentilcore.

* dom/Document.cpp:
(WebCore::Document::logExceptionToConsole):
* inspector/ConsoleMessage.cpp:
(WebCore::messageSourceValue):
(WebCore::messageTypeValue):
(WebCore::ConsoleMessage::addToFrontend):
* inspector/Inspector.json:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::didReceiveResponse):
(WebCore::InspectorConsoleAgent::didFailLoading):
* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessage.createTextMessage):
(WebInspector.ConsoleMessage.prototype._formatMessage):
(WebInspector.ConsoleMessage.prototype.toString):
* page/Console.cpp:
(WebCore::printMessageSourceAndLevelPrefix):
(WebCore::Console::addMessage):
(WebCore::Console::dir):
(WebCore::Console::dirxml):
(WebCore::Console::group):
(WebCore::Console::groupCollapsed):
(WebCore::Console::groupEnd):
* page/ConsoleTypes.h:
* websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::didFailSocketStream):

Source/WebKit/mac:

This change fixes semantics of the MessageSource and MessageType:
MessageSource is now the source of the message (be it Network, HTML
parser or Console API). MessageType is only defined for the Console API
messages and contains the name of the API call (log, dir, dirxml, etc.).
Subsequent https://bugs.webkit.org/show_bug.cgi?id=66371 will make MessageType
private to the inspector.

Reviewed by Tony Gentilcore.

* WebCoreSupport/WebChromeClient.mm:
(stringForMessageSource):
(stringForMessageType):
* WebView/WebUIDelegatePrivate.h:

LayoutTests:

This change fixes semantics of the MessageSource and MessageType:
MessageSource is now the source of the message (be it Network, HTML
parser or Console API). MessageType is only defined for the Console API
messages and contains the name of the API call (log, dir, dirxml, etc.).
Subsequent https://bugs.webkit.org/show_bug.cgi?id=66371 will make MessageType
private to the inspector.

Reviewed by Tony Gentilcore.

* inspector/protocol/console-agent-expected.txt:
* platform/chromium/http/tests/inspector/console-resource-errors-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/protocol/console-agent-expected.txt
LayoutTests/platform/chromium/http/tests/inspector/console-resource-errors-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/inspector/ConsoleMessage.cpp
Source/WebCore/inspector/Inspector.json
Source/WebCore/inspector/InspectorConsoleAgent.cpp
Source/WebCore/inspector/front-end/ConsoleMessage.js
Source/WebCore/page/Console.cpp
Source/WebCore/page/ConsoleTypes.h
Source/WebCore/websockets/WebSocketChannel.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKit/mac/WebView/WebUIDelegatePrivate.h