Web Inspector: ConsoleMessage should include line and column number where possible
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Apr 2013 18:31:05 +0000 (18:31 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Apr 2013 18:31:05 +0000 (18:31 +0000)
https://bugs.webkit.org/show_bug.cgi?id=114929

Source/WebCore:

  - adds "m_column" to WebCore::ConsoleMessage
  - adds "column" to Console.ConsoleMessage in the inspector protocol
  - set the column number for console.* functions (Console.cpp)
  - set the column number for XSLT errors (XSLTProcessor)
  - plumb columnNumber everywhere else it is needed, set it to 0 and file
    bugs for all cases missing columnNumber that could provide it.

Reviewed by Timothy Hatcher.

Test: inspector/console/console-url-line-column.html
      inspector/console/console-messages-stack-traces.html

* inspector/ConsoleMessage.h:
* inspector/ConsoleMessage.cpp:
(WebCore::ConsoleMessage::ConsoleMessage):
(WebCore::ConsoleMessage::autogenerateMetadata):
(WebCore::ConsoleMessage::addToFrontend):
(WebCore::ConsoleMessage::isEqual):
Add m_column and set it where appropriate.

* inspector/Inspector.json:
Add column property to Console.ConsoleMessage.

* page/Console.cpp:
(WebCore::internalAddMessage):
(WebCore::Console::profile):
Set columnNumber like lineNumber from the last stack frame.
(WebCore::Console::groupEnd):
Line and column are unused in this message type, set both to 0.

* xml/XSLTProcessorLibxslt.cpp:
(WebCore::XSLTProcessor::parseErrorFunc):
* xml/XSLTProcessorQt.cpp:
(WebCore::XSLTMessageHandler::handleMessage):
Add real column numbers, the XSLT handlers already had it available.

* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
* css/CSSParser.cpp:
(WebCore::CSSParser::logError):
* dom/ScriptExecutionContext.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::addConsoleMessage):
* dom/Document.cpp:
(WebCore::Document::logExceptionToConsole):
(WebCore::Document::addMessage):
* dom/Document.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::addMessageToConsole):
(WebCore::InspectorConsoleAgent::stopTiming):
(WebCore::InspectorConsoleAgent::didFinishXHRLoading):
(WebCore::InspectorConsoleAgent::didReceiveResponse):
(WebCore::InspectorConsoleAgent::didFailLoading):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
(WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::addProfileImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::addProfile):
(WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
(WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
(WebCore::InspectorProfilerAgent::start):
(WebCore::InspectorProfilerAgent::stop):
* inspector/InspectorProfilerAgent.h:
(InspectorProfilerAgent):
* loader/EmptyClients.h:
(WebCore::EmptyChromeClient::addMessageToConsole):
* page/ChromeClient.h:
(WebCore::ChromeClient::addMessageToConsole):
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::logToConsole):
* page/PageConsole.cpp:
(WebCore::PageConsole::addMessage):
* page/PageConsole.h:
* workers/DefaultSharedWorkerRepository.cpp:
(SharedWorkerProxy):
(WebCore::postExceptionTask):
(WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
(WebCore::postConsoleMessageTask):
(WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
* workers/SharedWorkerContext.cpp:
(WebCore::SharedWorkerContext::logExceptionToConsole):
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::logExceptionToConsole):
(WebCore::WorkerContext::addConsoleMessage):
(WebCore::WorkerContext::addMessage):
(WebCore::WorkerContext::addMessageToWorkerConsole):
* workers/WorkerContext.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerExceptionTask::create):
(WebCore::WorkerExceptionTask::WorkerExceptionTask):
(WebCore::WorkerExceptionTask::performTask):
(WorkerExceptionTask):
(WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
(WebCore::postConsoleMessageTask):
(WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
* workers/WorkerMessagingProxy.h:
(WorkerMessagingProxy):
* workers/WorkerReportingProxy.h:
(WorkerReportingProxy):
Plumb columnNumber through where appropriate. File bugs where missing.

Source/WebKit/blackberry:

Reviewed by Timothy Hatcher.

* Api/DumpRenderTreeClient.h:
* Api/WebPageClient.h:
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::addMessageToConsole):
* WebCoreSupport/ChromeClientBlackBerry.h:
(ChromeClientBlackBerry):

Source/WebKit/efl:

Reviewed by Timothy Hatcher.

* WebCoreSupport/ChromeClientEfl.cpp:
(WebCore::ChromeClientEfl::addMessageToConsole):
* WebCoreSupport/ChromeClientEfl.h:
(ChromeClientEfl):

Source/WebKit/gtk:

Reviewed by Timothy Hatcher.

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::addMessageToConsole):
* WebCoreSupport/ChromeClientGtk.h:
(ChromeClient):

Source/WebKit/mac:

Reviewed by Timothy Hatcher.

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::addMessageToConsole):

Source/WebKit/qt:

Reviewed by Timothy Hatcher.

* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::ChromeClientQt::addMessageToConsole):
* WebCoreSupport/ChromeClientQt.h:

Source/WebKit/win:

Reviewed by Timothy Hatcher.

* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::addMessageToConsole):
* WebCoreSupport/WebChromeClient.h:

Source/WebKit/wince:

Reviewed by Timothy Hatcher.

* WebCoreSupport/ChromeClientWinCE.cpp:
(WebKit::ChromeClientWinCE::addMessageToConsole):
* WebCoreSupport/ChromeClientWinCE.h:

Source/WebKit2:

Reviewed by Timothy Hatcher.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::addMessageToConsole):
* WebProcess/WebCoreSupport/WebChromeClient.h:

LayoutTests:

Update a test that was outputting the url and line number of console
method calls, to output the column number as well. Added a test that
verifies that console API messages have stack traces if appropriate.

Reviewed by Timothy Hatcher.

* inspector/console/console-url-and-line-expected.txt: Removed.
* inspector/console/console-url-line-column-expected.txt: Added.
* inspector/console/console-url-line-column.html: Renamed from LayoutTests/inspector/console/console-url-and-line.html.
* inspector/console/console-messages-stack-traces-expected.txt: Added.
* inspector/console/console-messages-stack-traces.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@149125 268f45cc-cd09-0410-ab3c-d52691b4dbfc

64 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/console/console-messages-stack-traces-expected.txt [new file with mode: 0644]
LayoutTests/inspector/console/console-messages-stack-traces.html [new file with mode: 0644]
LayoutTests/inspector/console/console-url-and-line-expected.txt [deleted file]
LayoutTests/inspector/console/console-url-line-column-expected.txt [new file with mode: 0644]
LayoutTests/inspector/console/console-url-line-column.html [moved from LayoutTests/inspector/console/console-url-and-line.html with 70% similarity]
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/ScriptExecutionContext.cpp
Source/WebCore/dom/ScriptExecutionContext.h
Source/WebCore/inspector/ConsoleMessage.cpp
Source/WebCore/inspector/ConsoleMessage.h
Source/WebCore/inspector/Inspector.json
Source/WebCore/inspector/InspectorConsoleAgent.cpp
Source/WebCore/inspector/InspectorConsoleAgent.h
Source/WebCore/inspector/InspectorConsoleInstrumentation.h
Source/WebCore/inspector/InspectorInstrumentation.cpp
Source/WebCore/inspector/InspectorInstrumentation.h
Source/WebCore/inspector/InspectorProfilerAgent.cpp
Source/WebCore/inspector/InspectorProfilerAgent.h
Source/WebCore/loader/EmptyClients.h
Source/WebCore/page/ChromeClient.h
Source/WebCore/page/Console.cpp
Source/WebCore/page/ContentSecurityPolicy.cpp
Source/WebCore/page/PageConsole.cpp
Source/WebCore/page/PageConsole.h
Source/WebCore/workers/DefaultSharedWorkerRepository.cpp
Source/WebCore/workers/SharedWorkerContext.cpp
Source/WebCore/workers/WorkerContext.cpp
Source/WebCore/workers/WorkerContext.h
Source/WebCore/workers/WorkerMessagingProxy.cpp
Source/WebCore/workers/WorkerMessagingProxy.h
Source/WebCore/workers/WorkerReportingProxy.h
Source/WebCore/xml/XSLTProcessorLibxslt.cpp
Source/WebCore/xml/XSLTProcessorQt.cpp
Source/WebKit/blackberry/Api/DumpRenderTreeClient.h
Source/WebKit/blackberry/Api/WebPageClient.h
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp
Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.h
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
Source/WebKit/win/WebCoreSupport/WebChromeClient.h
Source/WebKit/wince/ChangeLog
Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h

index a60728c..a82c023 100644 (file)
@@ -1,3 +1,20 @@
+2013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: ConsoleMessage should include line and column number where possible
+        https://bugs.webkit.org/show_bug.cgi?id=114929
+
+        Update a test that was outputting the url and line number of console
+        method calls, to output the column number as well. Added a test that
+        verifies that console API messages have stack traces if appropriate.
+
+        Reviewed by Timothy Hatcher.
+
+        * inspector/console/console-url-and-line-expected.txt: Removed.
+        * inspector/console/console-url-line-column-expected.txt: Added.
+        * inspector/console/console-url-line-column.html: Renamed from LayoutTests/inspector/console/console-url-and-line.html.
+        * inspector/console/console-messages-stack-traces-expected.txt: Added.
+        * inspector/console/console-messages-stack-traces.html: Added.
+
 2013-04-25  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
 
         Sec-WebSocket-Extensions header field must not appear more than once in an HTTP response.
diff --git a/LayoutTests/inspector/console/console-messages-stack-traces-expected.txt b/LayoutTests/inspector/console/console-messages-stack-traces-expected.txt
new file mode 100644 (file)
index 0000000..5927939
--- /dev/null
@@ -0,0 +1,15 @@
+CONSOLE MESSAGE: line 17: log
+CONSOLE MESSAGE: line 18: info
+CONSOLE MESSAGE: line 19: warn
+CONSOLE MESSAGE: line 20: debug
+CONSOLE MESSAGE: line 21: error
+CONSOLE MESSAGE: line 22: assert
+CONSOLE MESSAGE: line 23: trace
+CONSOLE MESSAGE: line 24: 1,2,3
+CONSOLE MESSAGE: line 25: [object HTMLBodyElement]
+CONSOLE MESSAGE: line 31: MARKER: EXPECT NO STACK TRACES
+CONSOLE MESSAGE: line 35: MARKER: DONE
+Tests that console-api messages contain stack traces.
+
+SUCCESS
+
diff --git a/LayoutTests/inspector/console/console-messages-stack-traces.html b/LayoutTests/inspector/console/console-messages-stack-traces.html
new file mode 100644 (file)
index 0000000..8bf6cb0
--- /dev/null
@@ -0,0 +1,82 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/console-test.js"></script>
+<script>
+
+function performConsoleMessages() {
+    // No console message.
+    console.timeStamp();
+    console.markTimeline();
+
+    // Expected to have stack traces.
+    console.time("time"); // Nothing until timeEnd.
+    console.clear();
+    console.group("group");
+    console.profile("profile");
+    console.log("log");
+    console.info("info");
+    console.warn("warn");
+    console.error("debug");
+    console.error("error");
+    console.assert(false, "assert");
+    console.trace("trace");
+    console.dir([1,2,3]);
+    console.dirxml(document.body);
+    console.count("count");
+    console.profileEnd("profile");
+    console.timeEnd("time");
+
+    // Not expected to have stack traces.
+    console.log("MARKER: EXPECT NO STACK TRACES");
+    console.groupEnd("group");
+
+    // End the test
+    console.log("MARKER: DONE");
+}
+
+function test()
+{
+    InspectorTest.addSniffer(WebInspector.ConsoleDispatcher.prototype, "messageAdded", messageAdded, true);
+
+    var hadIssue = false;
+    var expectStackTraces = true;
+
+    function messageAdded(payload)
+    {
+        if (payload.level === "log") {
+            if (payload.text === "MARKER: DONE") {
+                InspectorTest.addResult(hadIssue ? "FAILURE" : "SUCCESS");
+                InspectorTest.completeTest();
+                return;
+            }
+            if (payload.text === "MARKER: EXPECT NO STACK TRACES") {
+                expectStackTraces = false;
+                return;
+            }
+        }
+
+        var url = payload.url;
+        var lastSlashIndex = url.lastIndexOf("/");
+        url = url.substring(lastSlashIndex + 1);
+
+        if ("stackTrace" in payload && !expectStackTraces) {
+            InspectorTest.addResult("Unexpected stack trace for: " + JSON.stringify(payload));
+            hadIssue = true;
+        } else if (!("stackTrace" in payload) && expectStackTraces) {
+            InspectorTest.addResult("Expected stack trace for: " + JSON.stringify(payload));
+            hadIssue = true;
+        }
+    }
+
+    InspectorTest.evaluateInPage("performConsoleMessages()");
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>Tests that console-api messages contain stack traces.</p>
+
+</body>
+</html>
diff --git a/LayoutTests/inspector/console/console-url-and-line-expected.txt b/LayoutTests/inspector/console/console-url-and-line-expected.txt
deleted file mode 100644 (file)
index 9671fc0..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-CONSOLE MESSAGE: line 9: one
-CONSOLE MESSAGE: line 10: two
-CONSOLE MESSAGE: line 11: three
-Tests that console's url and line properties are defiend for console.log entries. Bug 72256.
-
-Message at location: console-url-and-line.html:9
-Message at location: console-url-and-line.html:10
-Message at location: console-url-and-line.html:11
-
diff --git a/LayoutTests/inspector/console/console-url-line-column-expected.txt b/LayoutTests/inspector/console/console-url-line-column-expected.txt
new file mode 100644 (file)
index 0000000..a0fc9f3
--- /dev/null
@@ -0,0 +1,19 @@
+CONSOLE MESSAGE: line 9: one
+CONSOLE MESSAGE: line 10: two
+CONSOLE MESSAGE: line 11: three
+CONSOLE MESSAGE: line 14: error
+CONSOLE MESSAGE: line 14: log
+CONSOLE MESSAGE: line 15: info
+CONSOLE MESSAGE: line 15: warn
+CONSOLE MESSAGE: line 16: assert
+Tests that url, line, and column properties are defined for console functions.
+
+Message at location: console-url-line-column.html:9:15
+Message at location: console-url-line-column.html:10:15
+Message at location: console-url-line-column.html:11:15
+Message at location: console-url-line-column.html:14:17
+Message at location: console-url-line-column.html:14:39
+Message at location: console-url-line-column.html:15:16
+Message at location: console-url-line-column.html:15:38
+Message at location: console-url-line-column.html:16:18
+
@@ -9,6 +9,11 @@ function log() {
     console.log("one");
     console.log("two");
     console.log("three");
+
+    // Different types and different columns.
+    console.error("error"); console.log("log");
+    console.info("info"); console.warn("warn");
+    console.assert(false, "assert");
 }
 
 function test()
@@ -20,8 +25,8 @@ function test()
         var url = payload.url;
         var lastSlashIndex = url.lastIndexOf("/");
         url = url.substring(lastSlashIndex + 1);
-        InspectorTest.addResult("Message at location: " + url + ":" + payload.line);
-        if (payload.line === 10)
+        InspectorTest.addResult("Message at location: " + url + ":" + payload.line + ":" + payload.column);
+        if (payload.line === 16)
             InspectorTest.completeTest();
     }
 
@@ -33,7 +38,7 @@ function test()
 
 <body onload="runTest()">
 <p>
-Tests that console's url and line properties are defiend for console.log entries. Bug 72256.
+Tests that url, line, and column properties are defined for console functions.
 </p>
 
 </body>
index 934b2e9..2b229f3 100644 (file)
@@ -1,3 +1,116 @@
+2013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: ConsoleMessage should include line and column number where possible
+        https://bugs.webkit.org/show_bug.cgi?id=114929
+
+          - adds "m_column" to WebCore::ConsoleMessage
+          - adds "column" to Console.ConsoleMessage in the inspector protocol
+          - set the column number for console.* functions (Console.cpp)
+          - set the column number for XSLT errors (XSLTProcessor)
+          - plumb columnNumber everywhere else it is needed, set it to 0 and file
+            bugs for all cases missing columnNumber that could provide it.
+
+        Reviewed by Timothy Hatcher.
+
+        Test: inspector/console/console-url-line-column.html
+              inspector/console/console-messages-stack-traces.html
+
+        * inspector/ConsoleMessage.h:
+        * inspector/ConsoleMessage.cpp:
+        (WebCore::ConsoleMessage::ConsoleMessage):
+        (WebCore::ConsoleMessage::autogenerateMetadata):
+        (WebCore::ConsoleMessage::addToFrontend):
+        (WebCore::ConsoleMessage::isEqual):
+        Add m_column and set it where appropriate.
+
+        * inspector/Inspector.json:
+        Add column property to Console.ConsoleMessage.
+
+        * page/Console.cpp:
+        (WebCore::internalAddMessage):
+        (WebCore::Console::profile):
+        Set columnNumber like lineNumber from the last stack frame.
+        (WebCore::Console::groupEnd):
+        Line and column are unused in this message type, set both to 0.
+
+        * xml/XSLTProcessorLibxslt.cpp:
+        (WebCore::XSLTProcessor::parseErrorFunc):
+        * xml/XSLTProcessorQt.cpp:
+        (WebCore::XSLTMessageHandler::handleMessage):
+        Add real column numbers, the XSLT handlers already had it available.
+
+        * bindings/js/JSCustomXPathNSResolver.cpp:
+        (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::logError):
+        * dom/ScriptExecutionContext.h:
+        * dom/ScriptExecutionContext.cpp:
+        (WebCore::ScriptExecutionContext::addConsoleMessage):
+        * dom/Document.cpp:
+        (WebCore::Document::logExceptionToConsole):
+        (WebCore::Document::addMessage):
+        * dom/Document.h:
+        * inspector/InspectorConsoleAgent.cpp:
+        (WebCore::InspectorConsoleAgent::addMessageToConsole):
+        (WebCore::InspectorConsoleAgent::stopTiming):
+        (WebCore::InspectorConsoleAgent::didFinishXHRLoading):
+        (WebCore::InspectorConsoleAgent::didReceiveResponse):
+        (WebCore::InspectorConsoleAgent::didFailLoading):
+        * inspector/InspectorConsoleAgent.h:
+        * inspector/InspectorConsoleInstrumentation.h:
+        (WebCore::InspectorInstrumentation::addMessageToConsole):
+        (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole):
+        * inspector/InspectorInstrumentation.cpp:
+        (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
+        (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
+        (WebCore::InspectorInstrumentation::addProfileImpl):
+        * inspector/InspectorInstrumentation.h:
+        (InspectorInstrumentation):
+        * inspector/InspectorProfilerAgent.cpp:
+        (WebCore::InspectorProfilerAgent::addProfile):
+        (WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
+        (WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
+        (WebCore::InspectorProfilerAgent::start):
+        (WebCore::InspectorProfilerAgent::stop):
+        * inspector/InspectorProfilerAgent.h:
+        (InspectorProfilerAgent):
+        * loader/EmptyClients.h:
+        (WebCore::EmptyChromeClient::addMessageToConsole):
+        * page/ChromeClient.h:
+        (WebCore::ChromeClient::addMessageToConsole):
+        * page/ContentSecurityPolicy.cpp:
+        (WebCore::ContentSecurityPolicy::logToConsole):
+        * page/PageConsole.cpp:
+        (WebCore::PageConsole::addMessage):
+        * page/PageConsole.h:
+        * workers/DefaultSharedWorkerRepository.cpp:
+        (SharedWorkerProxy):
+        (WebCore::postExceptionTask):
+        (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
+        (WebCore::postConsoleMessageTask):
+        (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
+        * workers/SharedWorkerContext.cpp:
+        (WebCore::SharedWorkerContext::logExceptionToConsole):
+        * workers/WorkerContext.cpp:
+        (WebCore::WorkerContext::logExceptionToConsole):
+        (WebCore::WorkerContext::addConsoleMessage):
+        (WebCore::WorkerContext::addMessage):
+        (WebCore::WorkerContext::addMessageToWorkerConsole):
+        * workers/WorkerContext.h:
+        * workers/WorkerMessagingProxy.cpp:
+        (WebCore::WorkerExceptionTask::create):
+        (WebCore::WorkerExceptionTask::WorkerExceptionTask):
+        (WebCore::WorkerExceptionTask::performTask):
+        (WorkerExceptionTask):
+        (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
+        (WebCore::postConsoleMessageTask):
+        (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
+        * workers/WorkerMessagingProxy.h:
+        (WorkerMessagingProxy):
+        * workers/WorkerReportingProxy.h:
+        (WorkerReportingProxy):
+        Plumb columnNumber through where appropriate. File bugs where missing.
+
 2013-04-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
 
         [Qt] Animated opacity does not trigger accelerated compositing
index ebb5f63..12e1563 100644 (file)
@@ -78,7 +78,7 @@ String JSCustomXPathNSResolver::lookupNamespaceURI(const String& prefix)
     if (callType == CallTypeNone) {
         callType = m_customResolver->methodTable()->getCallData(m_customResolver.get(), callData);
         if (callType == CallTypeNone) {
-            // FIXME: Pass actual line number and source URL.
+            // FIXME: <http://webkit.org/b/114312> JSCustomXPathNSResolver::lookupNamespaceURI Console Message should include Line, Column, and SourceURL
             if (PageConsole* console = m_globalObject->impl()->pageConsole())
                 console->addMessage(JSMessageSource, ErrorMessageLevel, "XPathNSResolver does not have a lookupNamespaceURI method.");
             return String();
index 3d1ab1d..059860b 100644 (file)
@@ -11510,8 +11510,9 @@ bool CSSParser::isLoggingErrors()
 
 void CSSParser::logError(const String& message, int lineNumber)
 {
+    // FIXME: <http://webkit.org/b/114313> CSS Parser ConsoleMessage errors should include column numbers
     PageConsole* console = m_styleSheet->singleOwnerDocument()->page()->console();
-    console->addMessage(CSSMessageSource, WarningMessageLevel, message, m_styleSheet->baseURL().string(), lineNumber + 1);
+    console->addMessage(CSSMessageSource, WarningMessageLevel, message, m_styleSheet->baseURL().string(), lineNumber + 1, 0);
 }
 
 StyleRuleKeyframes* CSSParser::createKeyframesRule(const String& name, PassOwnPtr<Vector<RefPtr<StyleKeyframe> > > popKeyframes)
index 4eeced1..9e9f63a 100644 (file)
@@ -2657,7 +2657,7 @@ EventTarget* Document::errorEventTarget()
 
 void Document::logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack> callStack)
 {
-    addMessage(JSMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber, callStack);
+    addMessage(JSMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber, 0, callStack);
 }
 
 void Document::setURL(const KURL& url)
@@ -4843,7 +4843,7 @@ void Document::addConsoleMessage(MessageSource source, MessageLevel level, const
         page->console()->addMessage(source, level, message, requestIdentifier, this);
 }
 
-void Document::addMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
+void Document::addMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
 {
     if (!isContextThread()) {
         postTask(AddConsoleMessageTask::create(source, level, message));
@@ -4851,7 +4851,7 @@ void Document::addMessage(MessageSource source, MessageLevel level, const String
     }
 
     if (Page* page = this->page())
-        page->console()->addMessage(source, level, message, sourceURL, lineNumber, callStack, state, requestIdentifier);
+        page->console()->addMessage(source, level, message, sourceURL, lineNumber, columnNumber, callStack, state, requestIdentifier);
 }
 
 const SecurityOrigin* Document::topOrigin() const
index 432fbab..ea14741 100644 (file)
@@ -1248,7 +1248,7 @@ private:
     virtual const KURL& virtualURL() const; // Same as url(), but needed for ScriptExecutionContext to implement it without a performance loss for direct calls.
     virtual KURL virtualCompleteURL(const String&) const; // Same as completeURL() for the same reason as above.
 
-    virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0);
+    virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0);
 
     virtual double minimumTimerInterval() const;
 
index e89566d..ca5224d 100644 (file)
@@ -302,9 +302,9 @@ void ScriptExecutionContext::reportException(const String& errorMessage, int lin
     m_pendingExceptions.clear();
 }
 
-void ScriptExecutionContext::addConsoleMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, ScriptState* state, unsigned long requestIdentifier)
+void ScriptExecutionContext::addConsoleMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, ScriptState* state, unsigned long requestIdentifier)
 {
-    addMessage(source, level, message, sourceURL, lineNumber, 0, state, requestIdentifier);
+    addMessage(source, level, message, sourceURL, lineNumber, columnNumber, 0, state, requestIdentifier);
 }
 
 bool ScriptExecutionContext::dispatchErrorEvent(const String& errorMessage, int lineNumber, const String& sourceURL, CachedScript* cachedScript)
index e3cecc0..245228b 100644 (file)
@@ -76,9 +76,10 @@ public:
     virtual void disableEval(const String& errorMessage) = 0;
 
     bool sanitizeScriptError(String& errorMessage, int& lineNumber, String& sourceURL, CachedScript* = 0);
+    // FIXME: <http://webkit.org/b/114315> ScriptExecutionContext log exception should include a column number
     void reportException(const String& errorMessage, int lineNumber, const String& sourceURL, PassRefPtr<ScriptCallStack>, CachedScript* = 0);
 
-    void addConsoleMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
+    void addConsoleMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
     virtual void addConsoleMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0) = 0;
 
     virtual const SecurityOrigin* topOrigin() const = 0;
@@ -182,8 +183,9 @@ private:
     virtual const KURL& virtualURL() const = 0;
     virtual KURL virtualCompleteURL(const String&) const = 0;
 
-    virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0) = 0;
+    virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0) = 0;
     virtual EventTarget* errorEventTarget() = 0;
+    // FIXME: <http://webkit.org/b/114315> ScriptExecutionContext log exception should include a column number
     virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>) = 0;
     bool dispatchErrorEvent(const String& errorMessage, int lineNumber, const String& sourceURL, CachedScript*);
 
index cfd6321..b7bed4b 100644 (file)
@@ -56,19 +56,21 @@ ConsoleMessage::ConsoleMessage(bool canGenerateCallStack, MessageSource source,
     , m_message(message)
     , m_url()
     , m_line(0)
+    , m_column(0)
     , m_repeatCount(1)
     , m_requestId(IdentifiersFactory::requestId(requestIdentifier))
 {
     autogenerateMetadata(canGenerateCallStack);
 }
 
-ConsoleMessage::ConsoleMessage(bool canGenerateCallStack, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& url, unsigned line, ScriptState* state, unsigned long requestIdentifier)
+ConsoleMessage::ConsoleMessage(bool canGenerateCallStack, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& url, unsigned line, unsigned column, ScriptState* state, unsigned long requestIdentifier)
     : m_source(source)
     , m_type(type)
     , m_level(level)
     , m_message(message)
     , m_url(url)
     , m_line(line)
+    , m_column(column)
     , m_repeatCount(1)
     , m_requestId(IdentifiersFactory::requestId(requestIdentifier))
 {
@@ -82,6 +84,7 @@ ConsoleMessage::ConsoleMessage(bool, MessageSource source, MessageType type, Mes
     , m_message(message)
     , m_arguments(0)
     , m_line(0)
+    , m_column(0)
     , m_repeatCount(1)
     , m_requestId(IdentifiersFactory::requestId(requestIdentifier))
 {
@@ -89,6 +92,7 @@ ConsoleMessage::ConsoleMessage(bool, MessageSource source, MessageType type, Mes
         const ScriptCallFrame& frame = callStack->at(0);
         m_url = frame.sourceURL();
         m_line = frame.lineNumber();
+        m_column = frame.columnNumber();
     }
     m_callStack = callStack;
 }
@@ -101,6 +105,7 @@ ConsoleMessage::ConsoleMessage(bool canGenerateCallStack, MessageSource source,
     , m_arguments(arguments)
     , m_url()
     , m_line(0)
+    , m_column(0)
     , m_repeatCount(1)
     , m_requestId(IdentifiersFactory::requestId(requestIdentifier))
 {
@@ -127,6 +132,7 @@ void ConsoleMessage::autogenerateMetadata(bool canGenerateCallStack, ScriptState
         const ScriptCallFrame& frame = m_callStack->at(0);
         m_url = frame.sourceURL();
         m_line = frame.lineNumber();
+        m_column = frame.columnNumber();
         return;
     }
 
@@ -191,6 +197,7 @@ void ConsoleMessage::addToFrontend(InspectorFrontend::Console* frontend, Injecte
     // FIXME: only send out type for ConsoleAPI source messages.
     jsonObj->setType(messageTypeValue(m_type));
     jsonObj->setLine(static_cast<int>(m_line));
+    jsonObj->setColumn(static_cast<int>(m_column));
     jsonObj->setUrl(m_url);
     jsonObj->setRepeatCount(static_cast<int>(m_repeatCount));
     if (m_source == NetworkMessageSource && !m_requestId.isEmpty())
@@ -255,6 +262,7 @@ bool ConsoleMessage::isEqual(ConsoleMessage* msg) const
         && msg->m_level == m_level
         && msg->m_message == m_message
         && msg->m_line == m_line
+        && msg->m_column == m_column
         && msg->m_url == m_url
         && msg->m_requestId == m_requestId;
 }
index 6a38d34..db9f5c1 100644 (file)
@@ -53,7 +53,7 @@ class ConsoleMessage {
     WTF_MAKE_NONCOPYABLE(ConsoleMessage); WTF_MAKE_FAST_ALLOCATED;
 public:
     ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, unsigned long requestIdentifier = 0);
-    ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, const String& url, unsigned line, ScriptState* = 0, unsigned long requestIdentifier = 0);
+    ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, const String& url, unsigned line, unsigned column, ScriptState* = 0, unsigned long requestIdentifier = 0);
     ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0);
     ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptArguments>, ScriptState*, unsigned long requestIdentifier = 0);
     ~ConsoleMessage();
@@ -82,6 +82,7 @@ private:
     RefPtr<ScriptCallStack> m_callStack;
     String m_url;
     unsigned m_line;
+    unsigned m_column;
     unsigned m_repeatCount;
     String m_requestId;
 };
index d991b84..a12532a 100644 (file)
                     { "name": "type", "type": "string", "optional": true, "enum": ["log", "dir", "dirxml", "table", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "timing", "profile", "profileEnd"], "description": "Console message type." },
                     { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." },
                     { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message." },
+                    { "name": "column", "type": "integer", "optional": true, "description": "Column number on the line in the resource that generated this message." },
                     { "name": "repeatCount", "type": "integer", "optional": true, "description": "Repeat count for repeated messages." },
                     { "name": "parameters", "type": "array", "items": { "$ref": "Runtime.RemoteObject" }, "optional": true, "description": "Message parameters in case of the formatted message." },
                     { "name": "stackTrace", "$ref": "StackTrace", "optional": true, "description": "JavaScript stack trace for assertions and error messages." },
index d70bfcf..576deb0 100644 (file)
@@ -178,7 +178,7 @@ void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageTyp
     addConsoleMessage(adoptPtr(new ConsoleMessage(!isWorkerAgent(), source, type, level, message, arguments, state, requestIdentifier)));
 }
 
-void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, ScriptState* state, unsigned long requestIdentifier)
+void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* state, unsigned long requestIdentifier)
 {
     if (!developerExtrasEnabled())
         return;
@@ -193,7 +193,7 @@ void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageTyp
         return;
 
     bool canGenerateCallStack = !isWorkerAgent() && m_frontend;
-    addConsoleMessage(adoptPtr(new ConsoleMessage(canGenerateCallStack, source, type, level, message, scriptId, lineNumber, state, requestIdentifier)));
+    addConsoleMessage(adoptPtr(new ConsoleMessage(canGenerateCallStack, source, type, level, message, scriptId, lineNumber, columnNumber, state, requestIdentifier)));
 }
 
 Vector<unsigned> InspectorConsoleAgent::consoleMessageArgumentCounts()
@@ -230,8 +230,7 @@ void InspectorConsoleAgent::stopTiming(const String& title, PassRefPtr<ScriptCal
 
     double elapsed = monotonicallyIncreasingTime() - startTime;
     String message = title + String::format(": %.3fms", elapsed * 1000);
-    const ScriptCallFrame& lastCaller = callStack->at(0);
-    addMessageToConsole(ConsoleAPIMessageSource, TimingMessageType, DebugMessageLevel, message, lastCaller.sourceURL(), lastCaller.lineNumber());
+    addMessageToConsole(ConsoleAPIMessageSource, TimingMessageType, DebugMessageLevel, message, callStack);
 }
 
 void InspectorConsoleAgent::count(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
@@ -273,10 +272,9 @@ void InspectorConsoleAgent::didFinishXHRLoading(unsigned long requestIdentifier,
         return;
     if (m_frontend && m_state->getBoolean(ConsoleAgentState::monitoringXHR)) {
         String message = "XHR finished loading: \"" + url + "\".";
-        addMessageToConsole(NetworkMessageSource, LogMessageType, DebugMessageLevel, message, sendURL, sendLineNumber, 0, requestIdentifier);
+        // FIXME: <http://webkit.org/b/114316> InspectorConsoleAgent::didFinishXHRLoading ConsoleMessage should include a column number
+        addMessageToConsole(NetworkMessageSource, LogMessageType, DebugMessageLevel, message, sendURL, sendLineNumber, 0, 0, requestIdentifier);
     }
-
-
 }
 
 void InspectorConsoleAgent::didReceiveResponse(unsigned long requestIdentifier, const ResourceResponse& response)
@@ -286,7 +284,7 @@ void InspectorConsoleAgent::didReceiveResponse(unsigned long requestIdentifier,
 
     if (response.httpStatusCode() >= 400) {
         String message = "Failed to load resource: the server responded with a status of " + String::number(response.httpStatusCode()) + " (" + response.httpStatusText() + ')';
-        addMessageToConsole(NetworkMessageSource, LogMessageType, ErrorMessageLevel, message, response.url().string(), 0, 0, requestIdentifier);
+        addMessageToConsole(NetworkMessageSource, LogMessageType, ErrorMessageLevel, message, response.url().string(), 0, 0, 0, requestIdentifier);
     }
 }
 
@@ -302,7 +300,7 @@ void InspectorConsoleAgent::didFailLoading(unsigned long requestIdentifier, cons
         message.appendLiteral(": ");
         message.append(error.localizedDescription());
     }
-    addMessageToConsole(NetworkMessageSource, LogMessageType, ErrorMessageLevel, message.toString(), error.failingURL(), 0, 0, requestIdentifier);
+    addMessageToConsole(NetworkMessageSource, LogMessageType, ErrorMessageLevel, message.toString(), error.failingURL(), 0, 0, 0, requestIdentifier);
 }
 
 void InspectorConsoleAgent::setMonitoringXHREnabled(ErrorString*, bool enabled)
index 47ac86d..da31190 100644 (file)
@@ -71,7 +71,7 @@ public:
     virtual void restore();
 
     void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, ScriptState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier = 0);
-    void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
+    void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
 
     // FIXME: Remove once we no longer generate stacks outside of Inspector.
     void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0);
@@ -88,8 +88,8 @@ public:
     void didReceiveResponse(unsigned long requestIdentifier, const ResourceResponse&);
     void didFailLoading(unsigned long requestIdentifier, const ResourceError&);
 #if ENABLE(JAVASCRIPT_DEBUGGER)
-    void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL);
-    void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL);
+    void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, unsigned columnNumber, const String& sourceURL);
+    void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL);
 #endif
     virtual void setMonitoringXHREnabled(ErrorString*, bool enabled);
     virtual void addInspectedNode(ErrorString*, int nodeId) = 0;
index 9a65de2..2f4e473 100644 (file)
@@ -73,11 +73,11 @@ inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSou
 #endif
 }
 
-inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, ScriptState* state, unsigned long requestIdentifier)
+inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* state, unsigned long requestIdentifier)
 {
 #if ENABLE(INSPECTOR)
     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
-        addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, scriptId, lineNumber, state, requestIdentifier);
+        addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, scriptId, lineNumber, columnNumber, state, requestIdentifier);
 #else
     UNUSED_PARAM(page);
     UNUSED_PARAM(source);
@@ -108,11 +108,11 @@ inline void InspectorInstrumentation::addMessageToConsole(WorkerContext* workerC
 #endif
 }
 
-inline void InspectorInstrumentation::addMessageToConsole(WorkerContext* workerContext, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, ScriptState* state, unsigned long requestIdentifier)
+inline void InspectorInstrumentation::addMessageToConsole(WorkerContext* workerContext, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* state, unsigned long requestIdentifier)
 {
 #if ENABLE(INSPECTOR)
     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForWorkerContext(workerContext))
-        addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, scriptId, lineNumber, state, requestIdentifier);
+        addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, scriptId, lineNumber, columnNumber, state, requestIdentifier);
 #else
     UNUSED_PARAM(workerContext);
     UNUSED_PARAM(source);
@@ -121,6 +121,7 @@ inline void InspectorInstrumentation::addMessageToConsole(WorkerContext* workerC
     UNUSED_PARAM(message);
     UNUSED_PARAM(scriptId);
     UNUSED_PARAM(lineNumber);
+    UNUSED_PARAM(columnNumber);
     UNUSED_PARAM(state);
     UNUSED_PARAM(requestIdentifier);
 #endif
@@ -175,15 +176,16 @@ inline void InspectorInstrumentation::consoleTimeStamp(Frame* frame, PassRefPtr<
 }
 
 #if ENABLE(JAVASCRIPT_DEBUGGER)
-inline void InspectorInstrumentation::addStartProfilingMessageToConsole(Page* page, const String& title, unsigned lineNumber, const String& sourceURL)
+inline void InspectorInstrumentation::addStartProfilingMessageToConsole(Page* page, const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL)
 {
 #if ENABLE(INSPECTOR)
     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
-        addStartProfilingMessageToConsoleImpl(instrumentingAgents, title, lineNumber, sourceURL);
+        addStartProfilingMessageToConsoleImpl(instrumentingAgents, title, lineNumber, columnNumber, sourceURL);
 #else
     UNUSED_PARAM(page);
     UNUSED_PARAM(title);
     UNUSED_PARAM(lineNumber);
+    UNUSED_PARAM(columnNumber);
     UNUSED_PARAM(sourceURL);
 #endif
 }
index b49444a..0ada773 100644 (file)
@@ -1030,10 +1030,10 @@ void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* inst
 #endif
 }
 
-void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, ScriptState* state, unsigned long requestIdentifier)
+void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* state, unsigned long requestIdentifier)
 {
     if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
-        consoleAgent->addMessageToConsole(source, type, level, message, scriptId, lineNumber, state, requestIdentifier);
+        consoleAgent->addMessageToConsole(source, type, level, message, scriptId, lineNumber, columnNumber, state, requestIdentifier);
 }
 
 void InspectorInstrumentation::consoleCountImpl(InstrumentingAgents* instrumentingAgents, ScriptState* state, PassRefPtr<ScriptArguments> arguments)
@@ -1068,17 +1068,17 @@ void InspectorInstrumentation::consoleTimeStampImpl(InstrumentingAgents* instrum
 }
 
 #if ENABLE(JAVASCRIPT_DEBUGGER)
-void InspectorInstrumentation::addStartProfilingMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, const String& title, unsigned lineNumber, const String& sourceURL)
+void InspectorInstrumentation::addStartProfilingMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL)
 {
     if (InspectorProfilerAgent* profilerAgent = instrumentingAgents->inspectorProfilerAgent())
-        profilerAgent->addStartProfilingMessageToConsole(title, lineNumber, sourceURL);
+        profilerAgent->addStartProfilingMessageToConsole(title, lineNumber, columnNumber, sourceURL);
 }
 
 void InspectorInstrumentation::addProfileImpl(InstrumentingAgents* instrumentingAgents, RefPtr<ScriptProfile> profile, PassRefPtr<ScriptCallStack> callStack)
 {
     if (InspectorProfilerAgent* profilerAgent = instrumentingAgents->inspectorProfilerAgent()) {
         const ScriptCallFrame& lastCaller = callStack->at(0);
-        profilerAgent->addProfile(profile, lastCaller.lineNumber(), lastCaller.sourceURL());
+        profilerAgent->addProfile(profile, lastCaller.lineNumber(), lastCaller.columnNumber(), lastCaller.sourceURL());
     }
 }
 
index 22dd573..9492d4b 100644 (file)
@@ -233,11 +233,11 @@ public:
     // FIXME: Remove once we no longer generate stacks outside of Inspector.
     static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0);
     static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, ScriptState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier = 0);
-    static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, const String&, unsigned lineNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
+    static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
 #if ENABLE(WORKERS)
     // FIXME: Convert to ScriptArguments to match non-worker context.
     static void addMessageToConsole(WorkerContext*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0);
-    static void addMessageToConsole(WorkerContext*, MessageSource, MessageType, MessageLevel, const String& message, const String&, unsigned lineNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
+    static void addMessageToConsole(WorkerContext*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
 #endif
     static void consoleCount(Page*, ScriptState*, PassRefPtr<ScriptArguments>);
     static void startConsoleTiming(Frame*, const String& title);
@@ -250,7 +250,7 @@ public:
     static void didFireAnimationFrame(const InspectorInstrumentationCookie&);
 
 #if ENABLE(JAVASCRIPT_DEBUGGER)
-    static void addStartProfilingMessageToConsole(Page*, const String& title, unsigned lineNumber, const String& sourceURL);
+    static void addStartProfilingMessageToConsole(Page*, const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL);
     static void addProfile(Page*, RefPtr<ScriptProfile>, PassRefPtr<ScriptCallStack>);
     static String getCurrentUserInitiatedProfileName(Page*, bool incrementProfileNumber);
     static bool profilerEnabled(Page*);
@@ -434,7 +434,7 @@ private:
     static void didWriteHTMLImpl(const InspectorInstrumentationCookie&, unsigned endLine);
 
     static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, ScriptState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier);
-    static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, ScriptState*, unsigned long requestIdentifier);
+    static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState*, unsigned long requestIdentifier);
 
     // FIXME: Remove once we no longer generate stacks outside of Inspector.
     static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier);
@@ -450,7 +450,7 @@ private:
     static void didFireAnimationFrameImpl(const InspectorInstrumentationCookie&);
 
 #if ENABLE(JAVASCRIPT_DEBUGGER)
-    static void addStartProfilingMessageToConsoleImpl(InstrumentingAgents*, const String& title, unsigned lineNumber, const String& sourceURL);
+    static void addStartProfilingMessageToConsoleImpl(InstrumentingAgents*, const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL);
     static void addProfileImpl(InstrumentingAgents*, RefPtr<ScriptProfile>, PassRefPtr<ScriptCallStack>);
     static String getCurrentUserInitiatedProfileNameImpl(InstrumentingAgents*, bool incrementProfileNumber);
     static bool profilerEnabledImpl(InstrumentingAgents*);
index 7d0c8fc..e2b3140 100644 (file)
@@ -148,29 +148,29 @@ InspectorProfilerAgent::~InspectorProfilerAgent()
     m_instrumentingAgents->setInspectorProfilerAgent(0);
 }
 
-void InspectorProfilerAgent::addProfile(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, const String& sourceURL)
+void InspectorProfilerAgent::addProfile(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, unsigned columnNumber, const String& sourceURL)
 {
     RefPtr<ScriptProfile> profile = prpProfile;
     m_profiles.add(profile->uid(), profile);
     if (m_frontend && m_state->getBoolean(ProfilerAgentState::profileHeadersRequested))
         m_frontend->addProfileHeader(createProfileHeader(*profile));
-    addProfileFinishedMessageToConsole(profile, lineNumber, sourceURL);
+    addProfileFinishedMessageToConsole(profile, lineNumber, columnNumber, sourceURL);
 }
 
-void InspectorProfilerAgent::addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, const String& sourceURL)
+void InspectorProfilerAgent::addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, unsigned columnNumber, const String& sourceURL)
 {
     if (!m_frontend)
         return;
     RefPtr<ScriptProfile> profile = prpProfile;
     String message = makeString(profile->title(), '#', String::number(profile->uid()));
-    m_consoleAgent->addMessageToConsole(ConsoleAPIMessageSource, ProfileEndMessageType, DebugMessageLevel, message, sourceURL, lineNumber);
+    m_consoleAgent->addMessageToConsole(ConsoleAPIMessageSource, ProfileEndMessageType, DebugMessageLevel, message, sourceURL, lineNumber, columnNumber);
 }
 
-void InspectorProfilerAgent::addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL)
+void InspectorProfilerAgent::addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL)
 {
     if (!m_frontend)
         return;
-    m_consoleAgent->addMessageToConsole(ConsoleAPIMessageSource, ProfileMessageType, DebugMessageLevel, title, sourceURL, lineNumber);
+    m_consoleAgent->addMessageToConsole(ConsoleAPIMessageSource, ProfileMessageType, DebugMessageLevel, title, sourceURL, lineNumber, columnNumber);
 }
 
 void InspectorProfilerAgent::collectGarbage(WebCore::ErrorString*)
@@ -383,7 +383,7 @@ void InspectorProfilerAgent::start(ErrorString*)
     m_recordingCPUProfile = true;
     String title = getCurrentUserInitiatedProfileName(true);
     startProfiling(title);
-    addStartProfilingMessageToConsole(title, 0, String());
+    addStartProfilingMessageToConsole(title, 0, 0, String());
     toggleRecordButton(true);
     m_state->setBoolean(ProfilerAgentState::userInitiatedProfiling, true);
 }
@@ -396,7 +396,7 @@ void InspectorProfilerAgent::stop(ErrorString*)
     String title = getCurrentUserInitiatedProfileName();
     RefPtr<ScriptProfile> profile = stopProfiling(title);
     if (profile)
-        addProfile(profile, 0, String());
+        addProfile(profile, 0, 0, String());
     toggleRecordButton(false);
     m_state->setBoolean(ProfilerAgentState::userInitiatedProfiling, false);
 }
index fc99b12..92a2587 100644 (file)
@@ -65,9 +65,9 @@ public:
 #endif
     virtual ~InspectorProfilerAgent();
 
-    void addProfile(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, const String& sourceURL);
-    void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL);
-    void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL);
+    void addProfile(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, unsigned columnNumber, const String& sourceURL);
+    void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, unsigned columnNumber, const String& sourceURL);
+    void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL);
     virtual void collectGarbage(ErrorString*);
     virtual void clearProfiles(ErrorString*) { resetState(); }
     void resetState();
index 2357697..d8fbb6b 100644 (file)
@@ -101,7 +101,7 @@ public:
 
     virtual void setResizable(bool) { }
 
-    virtual void addMessageToConsole(MessageSource, MessageLevel, const String&, unsigned, const String&) { }
+    virtual void addMessageToConsole(MessageSource, MessageLevel, const String&, unsigned, unsigned, const String&) { }
 
     virtual bool canRunBeforeUnloadConfirmPanel() { return false; }
     virtual bool runBeforeUnloadConfirmPanel(const String&, Frame*) { return true; }
index 2739bbb..c6c1e7d 100644 (file)
@@ -129,11 +129,11 @@ public:
 
     virtual void setResizable(bool) = 0;
 
-    virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& sourceID) = 0;
+    virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID) = 0;
     // FIXME: Remove this MessageType variant once all the clients are updated.
-    virtual void addMessageToConsole(MessageSource source, MessageType, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceID)
+    virtual void addMessageToConsole(MessageSource source, MessageType, MessageLevel level, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID)
     {
-        addMessageToConsole(source, level, message, lineNumber, sourceID);
+        addMessageToConsole(source, level, message, lineNumber, columnNumber, sourceID);
     }
 
     virtual bool canRunBeforeUnloadConfirmPanel() = 0;
index 226e2eb..5b4917d 100644 (file)
@@ -89,7 +89,7 @@ static void internalAddMessage(Page* page, MessageType type, MessageLevel level,
         return;
 
     if (gotMessage)
-        page->chrome()->client()->addMessageToConsole(ConsoleAPIMessageSource, type, level, message, lastCaller.lineNumber(), lastCaller.sourceURL());
+        page->chrome()->client()->addMessageToConsole(ConsoleAPIMessageSource, type, level, message, lastCaller.lineNumber(), lastCaller.columnNumber(), lastCaller.sourceURL());
 
     if (!page->settings()->logsPageMessagesToSystemConsoleEnabled() && !PageConsole::shouldPrintExceptions())
         return;
@@ -201,7 +201,7 @@ void Console::profile(const String& title, ScriptState* state)
 
     RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, 1));
     const ScriptCallFrame& lastCaller = callStack->at(0);
-    InspectorInstrumentation::addStartProfilingMessageToConsole(page, resolvedTitle, lastCaller.lineNumber(), lastCaller.sourceURL());
+    InspectorInstrumentation::addStartProfilingMessageToConsole(page, resolvedTitle, lastCaller.lineNumber(), lastCaller.columnNumber(), lastCaller.sourceURL());
 }
 
 void Console::profileEnd(const String& title, ScriptState* state)
@@ -252,7 +252,7 @@ void Console::groupCollapsed(ScriptState* state, PassRefPtr<ScriptArguments> arg
 
 void Console::groupEnd()
 {
-    InspectorInstrumentation::addMessageToConsole(page(), ConsoleAPIMessageSource, EndGroupMessageType, LogMessageLevel, String(), String(), 0);
+    InspectorInstrumentation::addMessageToConsole(page(), ConsoleAPIMessageSource, EndGroupMessageType, LogMessageLevel, String(), String(), 0, 0);
 }
 
 PassRefPtr<MemoryInfo> Console::memory() const
index 68e1243..8f3f3a5 100644 (file)
@@ -1893,7 +1893,8 @@ void ContentSecurityPolicy::reportMissingReportURI(const String& policy) const
 
 void ContentSecurityPolicy::logToConsole(const String& message, const String& contextURL, const WTF::OrdinalNumber& contextLine, ScriptState* state) const
 {
-    m_scriptExecutionContext->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message, contextURL, contextLine.oneBasedInt(), state);
+    // FIXME: <http://webkit.org/b/114317> ContentSecurityPolicy::logToConsole should include a column number
+    m_scriptExecutionContext->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message, contextURL, contextLine.oneBasedInt(), 0, state);
 }
 
 void ContentSecurityPolicy::reportBlockedScriptExecutionToInspector(const String& directiveText) const
index e772764..67436b3 100644 (file)
@@ -137,21 +137,22 @@ void PageConsole::addMessage(MessageSource source, MessageLevel level, const Str
     String url;
     if (document)
         url = document->url().string();
+    // FIXME: <http://webkit.org/b/114319> PageConsole::addMessage should automatically determine column number alongside line number
     unsigned line = 0;
     if (document && document->parsing() && !document->isInDocumentWrite() && document->scriptableDocumentParser()) {
         ScriptableDocumentParser* parser = document->scriptableDocumentParser();
         if (!parser->isWaitingForScripts() && !parser->isExecutingScript())
             line = parser->lineNumber().oneBasedInt();
     }
-    addMessage(source, level, message, url, line, 0, 0, requestIdentifier);
+    addMessage(source, level, message, url, line, 0, 0, 0, requestIdentifier);
 }
 
 void PageConsole::addMessage(MessageSource source, MessageLevel level, const String& message, PassRefPtr<ScriptCallStack> callStack)
 {
-    addMessage(source, level, message, String(), 0, callStack, 0);
+    addMessage(source, level, message, String(), 0, 0, callStack, 0);
 }
 
-void PageConsole::addMessage(MessageSource source, MessageLevel level, const String& message, const String& url, unsigned lineNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
+void PageConsole::addMessage(MessageSource source, MessageLevel level, const String& message, const String& url, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
 {
     if (muteCount && source != ConsoleAPIMessageSource)
         return;
@@ -163,7 +164,7 @@ void PageConsole::addMessage(MessageSource source, MessageLevel level, const Str
     if (callStack)
         InspectorInstrumentation::addMessageToConsole(page, source, LogMessageType, level, message, callStack, requestIdentifier);
     else
-        InspectorInstrumentation::addMessageToConsole(page, source, LogMessageType, level, message, url, lineNumber, state, requestIdentifier);
+        InspectorInstrumentation::addMessageToConsole(page, source, LogMessageType, level, message, url, lineNumber, columnNumber, state, requestIdentifier);
 
     if (source == CSSMessageSource)
         return;
@@ -171,7 +172,7 @@ void PageConsole::addMessage(MessageSource source, MessageLevel level, const Str
     if (page->settings()->privateBrowsingEnabled())
         return;
 
-    page->chrome()->client()->addMessageToConsole(source, level, message, lineNumber, url);
+    page->chrome()->client()->addMessageToConsole(source, level, message, lineNumber, columnNumber, url);
 
     if (!page->settings()->logsPageMessagesToSystemConsoleEnabled() && !shouldPrintExceptions())
         return;
index 68c0892..cf99746 100644 (file)
@@ -48,7 +48,7 @@ public:
     static void printSourceURLAndLine(const String& sourceURL, unsigned lineNumber);
     static void printMessageSourceAndLevelPrefix(MessageSource, MessageLevel);
 
-    void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack> = 0, ScriptState* = 0, unsigned long requestIdentifier = 0);
+    void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> = 0, ScriptState* = 0, unsigned long requestIdentifier = 0);
     void addMessage(MessageSource, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>);
     void addMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0, Document* = 0);
 
index d6866a5..01d193a 100644 (file)
@@ -81,8 +81,8 @@ public:
     virtual bool postTaskForModeToWorkerContext(PassOwnPtr<ScriptExecutionContext::Task>, const String&);
 
     // WorkerReportingProxy
-    virtual void postExceptionToWorkerObject(const String& errorMessage, int lineNumber, const String& sourceURL);
-    virtual void postConsoleMessageToWorkerObject(MessageSource, MessageLevel, const String& message, int lineNumber, const String& sourceURL);
+    virtual void postExceptionToWorkerObject(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL);
+    virtual void postConsoleMessageToWorkerObject(MessageSource, MessageLevel, const String& message, int lineNumber, int columnNumber, const String& sourceURL);
 #if ENABLE(INSPECTOR)
     virtual void postMessageToPageInspector(const String&);
     virtual void updateInspectorStateCookie(const String&);
@@ -176,28 +176,29 @@ GroupSettings* SharedWorkerProxy::groupSettings() const
     return 0;
 }
 
-static void postExceptionTask(ScriptExecutionContext* context, const String& errorMessage, int lineNumber, const String& sourceURL)
+static void postExceptionTask(ScriptExecutionContext* context, const String& errorMessage, int lineNumber, int /*columnNumber*/, const String& sourceURL)
 {
+    // FIXME: <http://webkit.org/b/114315> ScriptExecutionContext log exception should include a column number
     context->reportException(errorMessage, lineNumber, sourceURL, 0);
 }
 
-void SharedWorkerProxy::postExceptionToWorkerObject(const String& errorMessage, int lineNumber, const String& sourceURL)
+void SharedWorkerProxy::postExceptionToWorkerObject(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL)
 {
     MutexLocker lock(m_workerDocumentsLock);
     for (HashSet<Document*>::iterator iter = m_workerDocuments.begin(); iter != m_workerDocuments.end(); ++iter)
-        (*iter)->postTask(createCallbackTask(&postExceptionTask, errorMessage, lineNumber, sourceURL));
+        (*iter)->postTask(createCallbackTask(&postExceptionTask, errorMessage, lineNumber, columnNumber, sourceURL));
 }
 
-static void postConsoleMessageTask(ScriptExecutionContext* document, MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber)
+static void postConsoleMessageTask(ScriptExecutionContext* document, MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber)
 {
-    document->addConsoleMessage(source, level, message, sourceURL, lineNumber);
+    document->addConsoleMessage(source, level, message, sourceURL, lineNumber, columnNumber);
 }
 
-void SharedWorkerProxy::postConsoleMessageToWorkerObject(MessageSource source, MessageLevel level, const String& message, int lineNumber, const String& sourceURL)
+void SharedWorkerProxy::postConsoleMessageToWorkerObject(MessageSource source, MessageLevel level, const String& message, int lineNumber, int columnNumber, const String& sourceURL)
 {
     MutexLocker lock(m_workerDocumentsLock);
     for (HashSet<Document*>::iterator iter = m_workerDocuments.begin(); iter != m_workerDocuments.end(); ++iter)
-        (*iter)->postTask(createCallbackTask(&postConsoleMessageTask, source, level, message, sourceURL, lineNumber));
+        (*iter)->postTask(createCallbackTask(&postConsoleMessageTask, source, level, message, sourceURL, lineNumber, columnNumber));
 }
 
 #if ENABLE(INSPECTOR)
index d2cdb37..82ac7e4 100644 (file)
@@ -80,8 +80,9 @@ SharedWorkerThread* SharedWorkerContext::thread()
 
 void SharedWorkerContext::logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack> callStack)
 {
+    // FIXME: <http://webkit.org/b/114315> ScriptExecutionContext log exception should include a column number
     WorkerContext::logExceptionToConsole(errorMessage, sourceURL, lineNumber, callStack);
-    addMessageToWorkerConsole(JSMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber, callStack);
+    addMessageToWorkerConsole(JSMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber, 0, callStack);
 }
 
 } // namespace WebCore
index 4fb3a99..f0f26f8 100644 (file)
@@ -275,7 +275,8 @@ EventTarget* WorkerContext::errorEventTarget()
 
 void WorkerContext::logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>)
 {
-    thread()->workerReportingProxy().postExceptionToWorkerObject(errorMessage, lineNumber, sourceURL);
+    // FIXME: <http://webkit.org/b/114315> ScriptExecutionContext log exception should include a column number
+    thread()->workerReportingProxy().postExceptionToWorkerObject(errorMessage, lineNumber, 0, sourceURL);
 }
 
 void WorkerContext::addConsoleMessage(MessageSource source, MessageLevel level, const String& message, unsigned long requestIdentifier)
@@ -284,28 +285,29 @@ void WorkerContext::addConsoleMessage(MessageSource source, MessageLevel level,
         postTask(AddConsoleMessageTask::create(source, level, message));
         return;
     }
-    thread()->workerReportingProxy().postConsoleMessageToWorkerObject(source, level, message, 0, String());
 
-    addMessageToWorkerConsole(source, level, message, String(), 0, 0, 0, requestIdentifier);
+    thread()->workerReportingProxy().postConsoleMessageToWorkerObject(source, level, message, 0, 0, String());
+    addMessageToWorkerConsole(source, level, message, String(), 0, 0, 0, 0, requestIdentifier);
 }
 
-void WorkerContext::addMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
+void WorkerContext::addMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
 {
     if (!isContextThread()) {
         postTask(AddConsoleMessageTask::create(source, level, message));
         return;
     }
-    thread()->workerReportingProxy().postConsoleMessageToWorkerObject(source, level, message, lineNumber, sourceURL);
-    addMessageToWorkerConsole(source, level, message, sourceURL, lineNumber, callStack, state, requestIdentifier);
+
+    thread()->workerReportingProxy().postConsoleMessageToWorkerObject(source, level, message, lineNumber, columnNumber, sourceURL);
+    addMessageToWorkerConsole(source, level, message, sourceURL, lineNumber, columnNumber, callStack, state, requestIdentifier);
 }
 
-void WorkerContext::addMessageToWorkerConsole(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
+void WorkerContext::addMessageToWorkerConsole(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
 {
     ASSERT(isContextThread());
     if (callStack)
         InspectorInstrumentation::addMessageToConsole(this, source, LogMessageType, level, message, callStack, requestIdentifier);
     else
-        InspectorInstrumentation::addMessageToConsole(this, source, LogMessageType, level, message, sourceURL, lineNumber, state, requestIdentifier);
+        InspectorInstrumentation::addMessageToConsole(this, source, LogMessageType, level, message, sourceURL, lineNumber, columnNumber, state, requestIdentifier);
 }
 
 bool WorkerContext::isContextThread() const
index 5e175b8..3e93215 100644 (file)
@@ -145,7 +145,7 @@ namespace WebCore {
         void applyContentSecurityPolicyFromString(const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
 
         virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>) OVERRIDE;
-        void addMessageToWorkerConsole(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0);
+        void addMessageToWorkerConsole(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0);
 
     private:
         virtual void refScriptExecutionContext() OVERRIDE { ref(); }
@@ -159,7 +159,7 @@ namespace WebCore {
         virtual const KURL& virtualURL() const OVERRIDE;
         virtual KURL virtualCompleteURL(const String&) const;
 
-        virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0) OVERRIDE;
+        virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0) OVERRIDE;
         virtual void addConsoleMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0) OVERRIDE;
 
         virtual EventTarget* errorEventTarget() OVERRIDE;
index f01b2ab..b075570 100644 (file)
@@ -113,15 +113,16 @@ private:
 
 class WorkerExceptionTask : public ScriptExecutionContext::Task {
 public:
-    static PassOwnPtr<WorkerExceptionTask> create(const String& errorMessage, int lineNumber, const String& sourceURL, WorkerMessagingProxy* messagingProxy)
+    static PassOwnPtr<WorkerExceptionTask> create(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL, WorkerMessagingProxy* messagingProxy)
     {
-        return adoptPtr(new WorkerExceptionTask(errorMessage, lineNumber, sourceURL, messagingProxy));
+        return adoptPtr(new WorkerExceptionTask(errorMessage, lineNumber, columnNumber, sourceURL, messagingProxy));
     }
 
 private:
-    WorkerExceptionTask(const String& errorMessage, int lineNumber, const String& sourceURL, WorkerMessagingProxy* messagingProxy)
+    WorkerExceptionTask(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL, WorkerMessagingProxy* messagingProxy)
         : m_errorMessage(errorMessage.isolatedCopy())
         , m_lineNumber(lineNumber)
+        , m_columnNumber(columnNumber)
         , m_sourceURL(sourceURL.isolatedCopy())
         , m_messagingProxy(messagingProxy)
     {
@@ -137,12 +138,15 @@ private:
         // This is intentionally different than the behavior in MessageWorkerTask, because terminated workers no longer deliver messages (section 4.6 of the WebWorker spec), but they do report exceptions.
 
         bool errorHandled = !workerObject->dispatchEvent(ErrorEvent::create(m_errorMessage, m_sourceURL, m_lineNumber));
-        if (!errorHandled)
+        if (!errorHandled) {
+            // FIXME: <http://webkit.org/b/114315> ScriptExecutionContext log exception should include a column number
             context->reportException(m_errorMessage, m_lineNumber, m_sourceURL, 0);
+        }
     }
 
     String m_errorMessage;
     int m_lineNumber;
+    int m_columnNumber;
     String m_sourceURL;
     WorkerMessagingProxy* m_messagingProxy;
 };
@@ -317,21 +321,21 @@ void WorkerMessagingProxy::postTaskToLoader(PassOwnPtr<ScriptExecutionContext::T
     m_scriptExecutionContext->postTask(task);
 }
 
-void WorkerMessagingProxy::postExceptionToWorkerObject(const String& errorMessage, int lineNumber, const String& sourceURL)
+void WorkerMessagingProxy::postExceptionToWorkerObject(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL)
 {
-    m_scriptExecutionContext->postTask(WorkerExceptionTask::create(errorMessage, lineNumber, sourceURL, this));
+    m_scriptExecutionContext->postTask(WorkerExceptionTask::create(errorMessage, lineNumber, columnNumber, sourceURL, this));
 }
 
-static void postConsoleMessageTask(ScriptExecutionContext* context, WorkerMessagingProxy* messagingProxy, MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceURL)
+static void postConsoleMessageTask(ScriptExecutionContext* context, WorkerMessagingProxy* messagingProxy, MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceURL)
 {
     if (messagingProxy->askedToTerminate())
         return;
-    context->addConsoleMessage(source, level, message, sourceURL, lineNumber);
+    context->addConsoleMessage(source, level, message, sourceURL, lineNumber, columnNumber);
 }
 
-void WorkerMessagingProxy::postConsoleMessageToWorkerObject(MessageSource source, MessageLevel level, const String& message, int lineNumber, const String& sourceURL)
+void WorkerMessagingProxy::postConsoleMessageToWorkerObject(MessageSource source, MessageLevel level, const String& message, int lineNumber, int columnNumber, const String& sourceURL)
 {
-    m_scriptExecutionContext->postTask(createCallbackTask(&postConsoleMessageTask, AllowCrossThreadAccess(this), source, level, message, lineNumber, sourceURL));
+    m_scriptExecutionContext->postTask(createCallbackTask(&postConsoleMessageTask, AllowCrossThreadAccess(this), source, level, message, lineNumber, columnNumber, sourceURL));
 }
 
 void WorkerMessagingProxy::workerThreadCreated(PassRefPtr<DedicatedWorkerThread> workerThread)
index 0461b69..b25ef77 100644 (file)
@@ -67,8 +67,8 @@ namespace WebCore {
         // Implementations of WorkerObjectProxy.
         // (Only use these methods in the worker context thread.)
         virtual void postMessageToWorkerObject(PassRefPtr<SerializedScriptValue>, PassOwnPtr<MessagePortChannelArray>) OVERRIDE;
-        virtual void postExceptionToWorkerObject(const String& errorMessage, int lineNumber, const String& sourceURL) OVERRIDE;
-        virtual void postConsoleMessageToWorkerObject(MessageSource, MessageLevel, const String& message, int lineNumber, const String& sourceURL) OVERRIDE;
+        virtual void postExceptionToWorkerObject(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL) OVERRIDE;
+        virtual void postConsoleMessageToWorkerObject(MessageSource, MessageLevel, const String& message, int lineNumber, int columnNumber, const String& sourceURL) OVERRIDE;
 #if ENABLE(INSPECTOR)
         virtual void postMessageToPageInspector(const String&) OVERRIDE;
         virtual void updateInspectorStateCookie(const String&) OVERRIDE;
index be19350..c44698d 100644 (file)
@@ -43,9 +43,9 @@ namespace WebCore {
     public:
         virtual ~WorkerReportingProxy() {}
 
-        virtual void postExceptionToWorkerObject(const String& errorMessage, int lineNumber, const String& sourceURL) = 0;
+        virtual void postExceptionToWorkerObject(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL) = 0;
 
-        virtual void postConsoleMessageToWorkerObject(MessageSource, MessageLevel, const String& message, int lineNumber, const String& sourceURL) = 0;
+        virtual void postConsoleMessageToWorkerObject(MessageSource, MessageLevel, const String& message, int lineNumber, int columnNumber, const String& sourceURL) = 0;
 #if ENABLE(INSPECTOR)
         virtual void postMessageToPageInspector(const String&) = 0;
         virtual void updateInspectorStateCookie(const String&) = 0;
index 44d081a..633716c 100644 (file)
@@ -100,7 +100,8 @@ void XSLTProcessor::parseErrorFunc(void* userData, xmlError* error)
         break;
     }
 
-    console->addMessage(XMLMessageSource, level, error->message, error->file, error->line);
+    // xmlError->int2 is the column number of the error or 0 if N/A.
+    console->addMessage(XMLMessageSource, level, error->message, error->file, error->line, error->int2);
 }
 
 // FIXME: There seems to be no way to control the ctxt pointer for loading here, thus we have globals.
index 70ad752..e8b2427 100644 (file)
@@ -84,7 +84,7 @@ void XSLTMessageHandler::handleMessage(QtMsgType type, const QString& descriptio
     }
 
     Console* console = m_document->domWindow()->console();
-    console->addMessage(XMLMessageSource, level, description, sourceLocation.uri().toString(), sourceLocation.line());
+    console->addMessage(XMLMessageSource, level, description, sourceLocation.uri().toString(), sourceLocation.line(), sourceLocation.column());
 }
 
 class XSLTUriResolver : public QAbstractUriResolver {
index e9741c0..e0385d1 100644 (file)
@@ -61,7 +61,7 @@ public:
     virtual void didHandleOnloadEventsForFrame(WebCore::Frame*) = 0;
 
     // ChromeClient delegates
-    virtual void addMessageToConsole(const String& message, unsigned lineNumber, const String& sourceID) = 0;
+    virtual void addMessageToConsole(const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID) = 0;
     virtual void runJavaScriptAlert(const String& message) = 0;
     virtual bool runJavaScriptConfirm(const String& message) = 0;
     virtual String runJavaScriptPrompt(const String& message, const String& defaultValue) = 0;
index b5b9c18..85f6ba8 100644 (file)
@@ -109,7 +109,7 @@ public:
 
     virtual void notifyWindowObjectCleared() = 0;
 
-    virtual void addMessageToConsole(const unsigned short* message, unsigned messageLength, const unsigned short* source, unsigned sourceLength, unsigned lineNumber) = 0;
+    virtual void addMessageToConsole(const unsigned short* message, unsigned messageLength, const unsigned short* source, unsigned sourceLength, unsigned lineNumber, unsigned columnNumber) = 0;
     virtual int showAlertDialog(AlertType) = 0;
 
     virtual BlackBerry::Platform::String serializePageCacheState() const = 0;
index 9b50ede..81d6fc5 100644 (file)
@@ -1,3 +1,17 @@
+2013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: ConsoleMessage should include line and column number where possible
+        https://bugs.webkit.org/show_bug.cgi?id=114929
+
+        Reviewed by Timothy Hatcher.
+
+        * Api/DumpRenderTreeClient.h:
+        * Api/WebPageClient.h:
+        * WebCoreSupport/ChromeClientBlackBerry.cpp:
+        (WebCore::ChromeClientBlackBerry::addMessageToConsole):
+        * WebCoreSupport/ChromeClientBlackBerry.h:
+        (ChromeClientBlackBerry):
+
 2013-04-25  Konrad Piascik  <kpiascik@blackberry.com>
 
         [BlackBerry] Get rid of return in void method
index 51f2a66..04855d9 100644 (file)
@@ -91,16 +91,16 @@ ChromeClientBlackBerry::ChromeClientBlackBerry(WebPagePrivate* pagePrivate)
 {
 }
 
-void ChromeClientBlackBerry::addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& sourceID)
+void ChromeClientBlackBerry::addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID)
 {
 #if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
     if (m_webPagePrivate->m_dumpRenderTree) {
-        m_webPagePrivate->m_dumpRenderTree->addMessageToConsole(message, lineNumber, sourceID);
+        m_webPagePrivate->m_dumpRenderTree->addMessageToConsole(message, lineNumber, columnNumber, sourceID);
         return;
     }
 #endif
 
-    m_webPagePrivate->m_client->addMessageToConsole(message.characters(), message.length(), sourceID.characters(), sourceID.length(), lineNumber);
+    m_webPagePrivate->m_client->addMessageToConsole(message.characters(), message.length(), sourceID.characters(), sourceID.length(), lineNumber, columnNumber);
 }
 
 void ChromeClientBlackBerry::runJavaScriptAlert(Frame* frame, const String& message)
index 496e4e9..e36a9eb 100644 (file)
@@ -61,7 +61,7 @@ public:
     virtual void setMenubarVisible(bool);
     virtual bool menubarVisible();
     virtual void setResizable(bool);
-    virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& sourceID);
+    virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID);
     virtual bool canRunBeforeUnloadConfirmPanel();
     virtual bool runBeforeUnloadConfirmPanel(const String&, Frame*);
     virtual void closeWindowSoon();
index 31d3f6e..aaf68d0 100644 (file)
@@ -1,3 +1,15 @@
+2013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: ConsoleMessage should include line and column number where possible
+        https://bugs.webkit.org/show_bug.cgi?id=114929
+
+        Reviewed by Timothy Hatcher.
+
+        * WebCoreSupport/ChromeClientEfl.cpp:
+        (WebCore::ChromeClientEfl::addMessageToConsole):
+        * WebCoreSupport/ChromeClientEfl.h:
+        (ChromeClientEfl):
+
 2013-04-25  Commit Queue  <rniwa@webkit.org>
 
         Unreviewed, rolling out r149032.
index 598ef99..ebeb5a0 100644 (file)
@@ -274,8 +274,9 @@ bool ChromeClientEfl::runBeforeUnloadConfirmPanel(const String& message, Frame*
 }
 
 void ChromeClientEfl::addMessageToConsole(MessageSource, MessageLevel, const String& message,
-                                          unsigned int lineNumber, const String& sourceID)
+                                          unsigned lineNumber, unsigned columnNumber, const String& sourceID)
 {
+    UNUSED_PARAM(columnNumber);
     ewk_view_add_console_message(m_view, message.utf8().data(), lineNumber, sourceID.utf8().data());
 }
 
index fb649c3..c575189 100644 (file)
@@ -84,7 +84,7 @@ public:
     virtual void setResizable(bool);
 
     virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message,
-                                     unsigned int lineNumber, const String& sourceID);
+                                     unsigned lineNumber, unsigned columnNumber, const String& sourceID);
 
     virtual bool canRunBeforeUnloadConfirmPanel();
     virtual bool runBeforeUnloadConfirmPanel(const String& message, Frame*);
index 786b102..e7ebab5 100644 (file)
@@ -1,3 +1,15 @@
+2013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: ConsoleMessage should include line and column number where possible
+        https://bugs.webkit.org/show_bug.cgi?id=114929
+
+        Reviewed by Timothy Hatcher.
+
+        * WebCoreSupport/ChromeClientGtk.cpp:
+        (WebKit::ChromeClient::addMessageToConsole):
+        * WebCoreSupport/ChromeClientGtk.h:
+        (ChromeClient):
+
 2013-04-22  Martin Robinson  <mrobinson@igalia.com>
 
         Try to fix the build after enabling gobject-introspection
index 66401b9..1a7a7dc 100644 (file)
@@ -334,7 +334,7 @@ bool ChromeClient::runBeforeUnloadConfirmPanel(const WTF::String& message, WebCo
     return runJavaScriptConfirm(frame, message);
 }
 
-void ChromeClient::addMessageToConsole(WebCore::MessageSource source, WebCore::MessageLevel level, const WTF::String& message, unsigned lineNumber, const WTF::String& sourceId)
+void ChromeClient::addMessageToConsole(WebCore::MessageSource source, WebCore::MessageLevel level, const WTF::String& message, unsigned lineNumber, unsigned columnNumber, const WTF::String& sourceId)
 {
     gboolean retval;
     g_signal_emit_by_name(m_webView, "console-message", message.utf8().data(), lineNumber, sourceId.utf8().data(), &retval);
index dc2d952..a27f46e 100644 (file)
@@ -82,7 +82,7 @@ namespace WebKit {
 
         virtual void setResizable(bool);
 
-        virtual void addMessageToConsole(MessageSource, MessageLevel, const WTF::String& message, unsigned lineNumber, const WTF::String& sourceID);
+        virtual void addMessageToConsole(MessageSource, MessageLevel, const WTF::String& message, unsigned lineNumber, unsigned columnNumber, const WTF::String& sourceID);
 
         virtual bool canRunBeforeUnloadConfirmPanel();
         virtual bool runBeforeUnloadConfirmPanel(const WTF::String& message, Frame* frame);
index f2c841b..5b8b37e 100644 (file)
@@ -1,3 +1,14 @@
+2013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: ConsoleMessage should include line and column number where possible
+        https://bugs.webkit.org/show_bug.cgi?id=114929
+
+        Reviewed by Timothy Hatcher.
+
+        * WebCoreSupport/WebChromeClient.h:
+        * WebCoreSupport/WebChromeClient.mm:
+        (WebChromeClient::addMessageToConsole):
+
 2013-04-24  Jessie Berlin  <jberlin@apple.com>
 
         Assertion failure (crash in release) attempting to delete database storage in WK1 without
index c2e29f9..fbecdae 100644 (file)
@@ -74,7 +74,7 @@ public:
     
     virtual void setResizable(bool) OVERRIDE;
     
-    virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageLevel, const WTF::String& message, unsigned lineNumber, const WTF::String& sourceURL) OVERRIDE;
+    virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageLevel, const WTF::String& message, unsigned lineNumber, unsigned columnNumber, const WTF::String& sourceURL) OVERRIDE;
 
     virtual bool canRunBeforeUnloadConfirmPanel() OVERRIDE;
     virtual bool runBeforeUnloadConfirmPanel(const WTF::String& message, WebCore::Frame*) OVERRIDE;
index 3fb05d8..db03f72 100644 (file)
@@ -385,7 +385,7 @@ inline static NSString *stringForMessageLevel(MessageLevel level)
     return @"";
 }
 
-void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel level, const String& message, unsigned int lineNumber, const String& sourceURL)
+void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel level, const String& message, unsigned int lineNumber, unsigned columnNumber, const String& sourceURL)
 {
     id delegate = [m_webView UIDelegate];
     BOOL respondsToNewSelector = NO;
@@ -406,6 +406,7 @@ void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel lev
     NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys:
         (NSString *)message, @"message",
         [NSNumber numberWithUnsignedInt:lineNumber], @"lineNumber",
+        [NSNumber numberWithUnsignedInt:columnNumber], @"columnNumber",
         (NSString *)sourceURL, @"sourceURL",
         messageSource, @"MessageSource",
         stringForMessageLevel(level), @"MessageLevel",
index eeeffb6..c32bd0c 100644 (file)
@@ -1,3 +1,14 @@
+2013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: ConsoleMessage should include line and column number where possible
+        https://bugs.webkit.org/show_bug.cgi?id=114929
+
+        Reviewed by Timothy Hatcher.
+
+        * WebCoreSupport/ChromeClientQt.cpp:
+        (WebCore::ChromeClientQt::addMessageToConsole):
+        * WebCoreSupport/ChromeClientQt.h:
+
 2013-04-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
 
         [Qt] Animated opacity does not trigger accelerated compositing
index e59449c..a61fa27 100644 (file)
@@ -308,10 +308,11 @@ void ChromeClientQt::setResizable(bool)
     notImplemented();
 }
 
-void ChromeClientQt::addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& sourceID)
+void ChromeClientQt::addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID)
 {
     QString x = message;
     QString y = sourceID;
+    UNUSED_PARAM(columnNumber);
     m_webPage->javaScriptConsoleMessage(x, lineNumber, y);
 }
 
index cee9e01..8f97dc7 100644 (file)
@@ -101,7 +101,7 @@ public:
 
     virtual void setResizable(bool);
 
-    virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& sourceID);
+    virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID);
 
     virtual bool canRunBeforeUnloadConfirmPanel();
     virtual bool runBeforeUnloadConfirmPanel(const String& message, Frame*);
index 0c09e0a..7663ef2 100644 (file)
@@ -1,3 +1,14 @@
+2013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: ConsoleMessage should include line and column number where possible
+        https://bugs.webkit.org/show_bug.cgi?id=114929
+
+        Reviewed by Timothy Hatcher.
+
+        * WebCoreSupport/WebChromeClient.cpp:
+        (WebChromeClient::addMessageToConsole):
+        * WebCoreSupport/WebChromeClient.h:
+
 2013-04-24  Andreas Kling  <akling@apple.com>
 
         Wild build fix attempt.
index ac642d4..5c6f1af 100644 (file)
@@ -334,13 +334,15 @@ void WebChromeClient::setResizable(bool resizable)
     }
 }
 
-void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel level, const String& message, unsigned line, const String& url)
+void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, unsigned columnNumber, const String& url)
 {
+    UNUSED_PARAM(columnNumber);
+
     COMPtr<IWebUIDelegate> uiDelegate;
     if (SUCCEEDED(m_webView->uiDelegate(&uiDelegate))) {
         COMPtr<IWebUIDelegatePrivate> uiPrivate;
         if (SUCCEEDED(uiDelegate->QueryInterface(IID_IWebUIDelegatePrivate, (void**)&uiPrivate)))
-            uiPrivate->webViewAddMessageToConsole(m_webView, BString(message), line, BString(url), true);
+            uiPrivate->webViewAddMessageToConsole(m_webView, BString(message), lineNumber, BString(url), true);
     }
 }
 
index 3301960..ca29daf 100644 (file)
@@ -79,7 +79,7 @@ public:
 
     virtual void setResizable(bool);
 
-    virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageLevel, const WTF::String& message, unsigned line, const WTF::String& url);
+    virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageLevel, const WTF::String& message, unsigned lineNumber, unsigned columnNumber, const WTF::String& url);
 
     virtual bool canRunBeforeUnloadConfirmPanel();
     virtual bool runBeforeUnloadConfirmPanel(const WTF::String& message, WebCore::Frame* frame);
index a148530..d01243a 100644 (file)
@@ -1,3 +1,14 @@
+2013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: ConsoleMessage should include line and column number where possible
+        https://bugs.webkit.org/show_bug.cgi?id=114929
+
+        Reviewed by Timothy Hatcher.
+
+        * WebCoreSupport/ChromeClientWinCE.cpp:
+        (WebKit::ChromeClientWinCE::addMessageToConsole):
+        * WebCoreSupport/ChromeClientWinCE.h:
+
 2013-04-18  Patrick Gansterer  <paroga@webkit.org>
 
         Unreviewed WinCE build fix after r148545.
index 21425f2..6a23ac9 100644 (file)
@@ -184,7 +184,7 @@ bool ChromeClientWinCE::runBeforeUnloadConfirmPanel(const String& message, Frame
     return runJavaScriptConfirm(frame, message);
 }
 
-void ChromeClientWinCE::addMessageToConsole(MessageSource, MessageLevel, const String&, unsigned, const String&)
+void ChromeClientWinCE::addMessageToConsole(MessageSource, MessageLevel, const String&, unsigned, unsigned, const String&)
 {
     notImplemented();
 }
index 32ddc61..6aa56d9 100644 (file)
@@ -76,7 +76,7 @@ public:
 
     virtual void setResizable(bool);
 
-    virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageLevel, const WTF::String& message, unsigned lineNumber, const WTF::String& sourceID);
+    virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageLevel, const WTF::String& message, unsigned lineNumber, unsigned columnNumber, const WTF::String& sourceID);
 
     virtual bool canRunBeforeUnloadConfirmPanel();
     virtual bool runBeforeUnloadConfirmPanel(const WTF::String& message, WebCore::Frame* frame);
index 9c68cd3..dfd4554 100644 (file)
@@ -1,3 +1,14 @@
+2013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: ConsoleMessage should include line and column number where possible
+        https://bugs.webkit.org/show_bug.cgi?id=114929
+
+        Reviewed by Timothy Hatcher.
+
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::addMessageToConsole):
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+
 2013-04-25  Brady Eidson  <beidson@apple.com>
 
         Thread safety issues in WKCustomProtocol.
index fad3a16..2d821dd 100644 (file)
@@ -282,7 +282,7 @@ void WebChromeClient::setResizable(bool resizable)
     m_page->send(Messages::WebPageProxy::SetIsResizable(resizable));
 }
 
-void WebChromeClient::addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& /*sourceID*/)
+void WebChromeClient::addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, unsigned /*columnNumber*/, const String& /*sourceID*/)
 {
     // Notify the bundle client.
     m_page->injectedBundleUIClient().willAddMessageToConsole(m_page, message, lineNumber);
index 27294b2..d45f182 100644 (file)
@@ -90,7 +90,7 @@ private:
     
     virtual void setResizable(bool) OVERRIDE;
     
-    virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageLevel, const String& message, unsigned lineNumber, const String& sourceID) OVERRIDE;
+    virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageLevel, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID) OVERRIDE;
     
     virtual bool canRunBeforeUnloadConfirmPanel() OVERRIDE;
     virtual bool runBeforeUnloadConfirmPanel(const String& message, WebCore::Frame*) OVERRIDE;