Changeset 149125 in webkit


Ignore:
Timestamp:
Apr 25, 2013 11:31:05 AM (11 years ago)
Author:
Joseph Pecoraro
Message:

Web Inspector: ConsoleMessage should include line and column number where possible
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.
Location:
trunk
Files:
3 added
1 deleted
59 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r149120 r149125  
     12013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: ConsoleMessage should include line and column number where possible
     4        https://bugs.webkit.org/show_bug.cgi?id=114929
     5
     6        Update a test that was outputting the url and line number of console
     7        method calls, to output the column number as well. Added a test that
     8        verifies that console API messages have stack traces if appropriate.
     9
     10        Reviewed by Timothy Hatcher.
     11
     12        * inspector/console/console-url-and-line-expected.txt: Removed.
     13        * inspector/console/console-url-line-column-expected.txt: Added.
     14        * inspector/console/console-url-line-column.html: Renamed from LayoutTests/inspector/console/console-url-and-line.html.
     15        * inspector/console/console-messages-stack-traces-expected.txt: Added.
     16        * inspector/console/console-messages-stack-traces.html: Added.
     17
    1182013-04-25  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
    219
  • trunk/LayoutTests/inspector/console/console-url-line-column.html

    r149124 r149125  
    1010    console.log("two");
    1111    console.log("three");
     12
     13    // Different types and different columns.
     14    console.error("error"); console.log("log");
     15    console.info("info"); console.warn("warn");
     16    console.assert(false, "assert");
    1217}
    1318
     
    2126        var lastSlashIndex = url.lastIndexOf("/");
    2227        url = url.substring(lastSlashIndex + 1);
    23         InspectorTest.addResult("Message at location: " + url + ":" + payload.line);
    24         if (payload.line === 10)
     28        InspectorTest.addResult("Message at location: " + url + ":" + payload.line + ":" + payload.column);
     29        if (payload.line === 16)
    2530            InspectorTest.completeTest();
    2631    }
     
    3439<body onload="runTest()">
    3540<p>
    36 Tests that console's url and line properties are defiend for console.log entries. Bug 72256.
     41Tests that url, line, and column properties are defined for console functions.
    3742</p>
    3843
  • trunk/Source/WebCore/ChangeLog

    r149123 r149125  
     12013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: ConsoleMessage should include line and column number where possible
     4        https://bugs.webkit.org/show_bug.cgi?id=114929
     5
     6          - adds "m_column" to WebCore::ConsoleMessage
     7          - adds "column" to Console.ConsoleMessage in the inspector protocol
     8          - set the column number for console.* functions (Console.cpp)
     9          - set the column number for XSLT errors (XSLTProcessor)
     10          - plumb columnNumber everywhere else it is needed, set it to 0 and file
     11            bugs for all cases missing columnNumber that could provide it.
     12
     13        Reviewed by Timothy Hatcher.
     14
     15        Test: inspector/console/console-url-line-column.html
     16              inspector/console/console-messages-stack-traces.html
     17
     18        * inspector/ConsoleMessage.h:
     19        * inspector/ConsoleMessage.cpp:
     20        (WebCore::ConsoleMessage::ConsoleMessage):
     21        (WebCore::ConsoleMessage::autogenerateMetadata):
     22        (WebCore::ConsoleMessage::addToFrontend):
     23        (WebCore::ConsoleMessage::isEqual):
     24        Add m_column and set it where appropriate.
     25
     26        * inspector/Inspector.json:
     27        Add column property to Console.ConsoleMessage.
     28
     29        * page/Console.cpp:
     30        (WebCore::internalAddMessage):
     31        (WebCore::Console::profile):
     32        Set columnNumber like lineNumber from the last stack frame.
     33        (WebCore::Console::groupEnd):
     34        Line and column are unused in this message type, set both to 0.
     35
     36        * xml/XSLTProcessorLibxslt.cpp:
     37        (WebCore::XSLTProcessor::parseErrorFunc):
     38        * xml/XSLTProcessorQt.cpp:
     39        (WebCore::XSLTMessageHandler::handleMessage):
     40        Add real column numbers, the XSLT handlers already had it available.
     41
     42        * bindings/js/JSCustomXPathNSResolver.cpp:
     43        (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
     44        * css/CSSParser.cpp:
     45        (WebCore::CSSParser::logError):
     46        * dom/ScriptExecutionContext.h:
     47        * dom/ScriptExecutionContext.cpp:
     48        (WebCore::ScriptExecutionContext::addConsoleMessage):
     49        * dom/Document.cpp:
     50        (WebCore::Document::logExceptionToConsole):
     51        (WebCore::Document::addMessage):
     52        * dom/Document.h:
     53        * inspector/InspectorConsoleAgent.cpp:
     54        (WebCore::InspectorConsoleAgent::addMessageToConsole):
     55        (WebCore::InspectorConsoleAgent::stopTiming):
     56        (WebCore::InspectorConsoleAgent::didFinishXHRLoading):
     57        (WebCore::InspectorConsoleAgent::didReceiveResponse):
     58        (WebCore::InspectorConsoleAgent::didFailLoading):
     59        * inspector/InspectorConsoleAgent.h:
     60        * inspector/InspectorConsoleInstrumentation.h:
     61        (WebCore::InspectorInstrumentation::addMessageToConsole):
     62        (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole):
     63        * inspector/InspectorInstrumentation.cpp:
     64        (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
     65        (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
     66        (WebCore::InspectorInstrumentation::addProfileImpl):
     67        * inspector/InspectorInstrumentation.h:
     68        (InspectorInstrumentation):
     69        * inspector/InspectorProfilerAgent.cpp:
     70        (WebCore::InspectorProfilerAgent::addProfile):
     71        (WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
     72        (WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
     73        (WebCore::InspectorProfilerAgent::start):
     74        (WebCore::InspectorProfilerAgent::stop):
     75        * inspector/InspectorProfilerAgent.h:
     76        (InspectorProfilerAgent):
     77        * loader/EmptyClients.h:
     78        (WebCore::EmptyChromeClient::addMessageToConsole):
     79        * page/ChromeClient.h:
     80        (WebCore::ChromeClient::addMessageToConsole):
     81        * page/ContentSecurityPolicy.cpp:
     82        (WebCore::ContentSecurityPolicy::logToConsole):
     83        * page/PageConsole.cpp:
     84        (WebCore::PageConsole::addMessage):
     85        * page/PageConsole.h:
     86        * workers/DefaultSharedWorkerRepository.cpp:
     87        (SharedWorkerProxy):
     88        (WebCore::postExceptionTask):
     89        (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
     90        (WebCore::postConsoleMessageTask):
     91        (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
     92        * workers/SharedWorkerContext.cpp:
     93        (WebCore::SharedWorkerContext::logExceptionToConsole):
     94        * workers/WorkerContext.cpp:
     95        (WebCore::WorkerContext::logExceptionToConsole):
     96        (WebCore::WorkerContext::addConsoleMessage):
     97        (WebCore::WorkerContext::addMessage):
     98        (WebCore::WorkerContext::addMessageToWorkerConsole):
     99        * workers/WorkerContext.h:
     100        * workers/WorkerMessagingProxy.cpp:
     101        (WebCore::WorkerExceptionTask::create):
     102        (WebCore::WorkerExceptionTask::WorkerExceptionTask):
     103        (WebCore::WorkerExceptionTask::performTask):
     104        (WorkerExceptionTask):
     105        (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
     106        (WebCore::postConsoleMessageTask):
     107        (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
     108        * workers/WorkerMessagingProxy.h:
     109        (WorkerMessagingProxy):
     110        * workers/WorkerReportingProxy.h:
     111        (WorkerReportingProxy):
     112        Plumb columnNumber through where appropriate. File bugs where missing.
     113
    11142013-04-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
    2115
  • trunk/Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp

    r148696 r149125  
    7979        callType = m_customResolver->methodTable()->getCallData(m_customResolver.get(), callData);
    8080        if (callType == CallTypeNone) {
    81             // FIXME: Pass actual line number and source URL.
     81            // FIXME: <http://webkit.org/b/114312> JSCustomXPathNSResolver::lookupNamespaceURI Console Message should include Line, Column, and SourceURL
    8282            if (PageConsole* console = m_globalObject->impl()->pageConsole())
    8383                console->addMessage(JSMessageSource, ErrorMessageLevel, "XPathNSResolver does not have a lookupNamespaceURI method.");
  • trunk/Source/WebCore/css/CSSParser.cpp

    r149106 r149125  
    1151111511void CSSParser::logError(const String& message, int lineNumber)
    1151211512{
     11513    // FIXME: <http://webkit.org/b/114313> CSS Parser ConsoleMessage errors should include column numbers
    1151311514    PageConsole* console = m_styleSheet->singleOwnerDocument()->page()->console();
    11514     console->addMessage(CSSMessageSource, WarningMessageLevel, message, m_styleSheet->baseURL().string(), lineNumber + 1);
     11515    console->addMessage(CSSMessageSource, WarningMessageLevel, message, m_styleSheet->baseURL().string(), lineNumber + 1, 0);
    1151511516}
    1151611517
  • trunk/Source/WebCore/dom/Document.cpp

    r149101 r149125  
    26582658void Document::logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack> callStack)
    26592659{
    2660     addMessage(JSMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber, callStack);
     2660    addMessage(JSMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber, 0, callStack);
    26612661}
    26622662
     
    48444844}
    48454845
    4846 void Document::addMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
     4846void Document::addMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
    48474847{
    48484848    if (!isContextThread()) {
     
    48524852
    48534853    if (Page* page = this->page())
    4854         page->console()->addMessage(source, level, message, sourceURL, lineNumber, callStack, state, requestIdentifier);
     4854        page->console()->addMessage(source, level, message, sourceURL, lineNumber, columnNumber, callStack, state, requestIdentifier);
    48554855}
    48564856
  • trunk/Source/WebCore/dom/Document.h

    r148921 r149125  
    12491249    virtual KURL virtualCompleteURL(const String&) const; // Same as completeURL() for the same reason as above.
    12501250
    1251     virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0);
     1251    virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0);
    12521252
    12531253    virtual double minimumTimerInterval() const;
  • trunk/Source/WebCore/dom/ScriptExecutionContext.cpp

    r148921 r149125  
    303303}
    304304
    305 void ScriptExecutionContext::addConsoleMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, ScriptState* state, unsigned long requestIdentifier)
    306 {
    307     addMessage(source, level, message, sourceURL, lineNumber, 0, state, requestIdentifier);
     305void ScriptExecutionContext::addConsoleMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, ScriptState* state, unsigned long requestIdentifier)
     306{
     307    addMessage(source, level, message, sourceURL, lineNumber, columnNumber, 0, state, requestIdentifier);
    308308}
    309309
  • trunk/Source/WebCore/dom/ScriptExecutionContext.h

    r148921 r149125  
    7777
    7878    bool sanitizeScriptError(String& errorMessage, int& lineNumber, String& sourceURL, CachedScript* = 0);
     79    // FIXME: <http://webkit.org/b/114315> ScriptExecutionContext log exception should include a column number
    7980    void reportException(const String& errorMessage, int lineNumber, const String& sourceURL, PassRefPtr<ScriptCallStack>, CachedScript* = 0);
    8081
    81     void addConsoleMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
     82    void addConsoleMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
    8283    virtual void addConsoleMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0) = 0;
    8384
     
    183184    virtual KURL virtualCompleteURL(const String&) const = 0;
    184185
    185     virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0) = 0;
     186    virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0) = 0;
    186187    virtual EventTarget* errorEventTarget() = 0;
     188    // FIXME: <http://webkit.org/b/114315> ScriptExecutionContext log exception should include a column number
    187189    virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>) = 0;
    188190    bool dispatchErrorEvent(const String& errorMessage, int lineNumber, const String& sourceURL, CachedScript*);
  • trunk/Source/WebCore/inspector/ConsoleMessage.cpp

    r144949 r149125  
    5757    , m_url()
    5858    , m_line(0)
     59    , m_column(0)
    5960    , m_repeatCount(1)
    6061    , m_requestId(IdentifiersFactory::requestId(requestIdentifier))
     
    6364}
    6465
    65 ConsoleMessage::ConsoleMessage(bool canGenerateCallStack, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& url, unsigned line, ScriptState* state, unsigned long requestIdentifier)
     66ConsoleMessage::ConsoleMessage(bool canGenerateCallStack, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& url, unsigned line, unsigned column, ScriptState* state, unsigned long requestIdentifier)
    6667    : m_source(source)
    6768    , m_type(type)
     
    7071    , m_url(url)
    7172    , m_line(line)
     73    , m_column(column)
    7274    , m_repeatCount(1)
    7375    , m_requestId(IdentifiersFactory::requestId(requestIdentifier))
     
    8385    , m_arguments(0)
    8486    , m_line(0)
     87    , m_column(0)
    8588    , m_repeatCount(1)
    8689    , m_requestId(IdentifiersFactory::requestId(requestIdentifier))
     
    9093        m_url = frame.sourceURL();
    9194        m_line = frame.lineNumber();
     95        m_column = frame.columnNumber();
    9296    }
    9397    m_callStack = callStack;
     
    102106    , m_url()
    103107    , m_line(0)
     108    , m_column(0)
    104109    , m_repeatCount(1)
    105110    , m_requestId(IdentifiersFactory::requestId(requestIdentifier))
     
    128133        m_url = frame.sourceURL();
    129134        m_line = frame.lineNumber();
     135        m_column = frame.columnNumber();
    130136        return;
    131137    }
     
    192198    jsonObj->setType(messageTypeValue(m_type));
    193199    jsonObj->setLine(static_cast<int>(m_line));
     200    jsonObj->setColumn(static_cast<int>(m_column));
    194201    jsonObj->setUrl(m_url);
    195202    jsonObj->setRepeatCount(static_cast<int>(m_repeatCount));
     
    256263        && msg->m_message == m_message
    257264        && msg->m_line == m_line
     265        && msg->m_column == m_column
    258266        && msg->m_url == m_url
    259267        && msg->m_requestId == m_requestId;
  • trunk/Source/WebCore/inspector/ConsoleMessage.h

    r137318 r149125  
    5454public:
    5555    ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, unsigned long requestIdentifier = 0);
    56     ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, const String& url, unsigned line, ScriptState* = 0, unsigned long requestIdentifier = 0);
     56    ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, const String& url, unsigned line, unsigned column, ScriptState* = 0, unsigned long requestIdentifier = 0);
    5757    ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0);
    5858    ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptArguments>, ScriptState*, unsigned long requestIdentifier = 0);
     
    8383    String m_url;
    8484    unsigned m_line;
     85    unsigned m_column;
    8586    unsigned m_repeatCount;
    8687    String m_requestId;
  • trunk/Source/WebCore/inspector/Inspector.json

    r148921 r149125  
    767767                    { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." },
    768768                    { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message." },
     769                    { "name": "column", "type": "integer", "optional": true, "description": "Column number on the line in the resource that generated this message." },
    769770                    { "name": "repeatCount", "type": "integer", "optional": true, "description": "Repeat count for repeated messages." },
    770771                    { "name": "parameters", "type": "array", "items": { "$ref": "Runtime.RemoteObject" }, "optional": true, "description": "Message parameters in case of the formatted message." },
  • trunk/Source/WebCore/inspector/InspectorConsoleAgent.cpp

    r146781 r149125  
    179179}
    180180
    181 void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, ScriptState* state, unsigned long requestIdentifier)
     181void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* state, unsigned long requestIdentifier)
    182182{
    183183    if (!developerExtrasEnabled())
     
    194194
    195195    bool canGenerateCallStack = !isWorkerAgent() && m_frontend;
    196     addConsoleMessage(adoptPtr(new ConsoleMessage(canGenerateCallStack, source, type, level, message, scriptId, lineNumber, state, requestIdentifier)));
     196    addConsoleMessage(adoptPtr(new ConsoleMessage(canGenerateCallStack, source, type, level, message, scriptId, lineNumber, columnNumber, state, requestIdentifier)));
    197197}
    198198
     
    231231    double elapsed = monotonicallyIncreasingTime() - startTime;
    232232    String message = title + String::format(": %.3fms", elapsed * 1000);
    233     const ScriptCallFrame& lastCaller = callStack->at(0);
    234     addMessageToConsole(ConsoleAPIMessageSource, TimingMessageType, DebugMessageLevel, message, lastCaller.sourceURL(), lastCaller.lineNumber());
     233    addMessageToConsole(ConsoleAPIMessageSource, TimingMessageType, DebugMessageLevel, message, callStack);
    235234}
    236235
     
    274273    if (m_frontend && m_state->getBoolean(ConsoleAgentState::monitoringXHR)) {
    275274        String message = "XHR finished loading: \"" + url + "\".";
    276         addMessageToConsole(NetworkMessageSource, LogMessageType, DebugMessageLevel, message, sendURL, sendLineNumber, 0, requestIdentifier);
    277     }
    278 
    279 
     275        // FIXME: <http://webkit.org/b/114316> InspectorConsoleAgent::didFinishXHRLoading ConsoleMessage should include a column number
     276        addMessageToConsole(NetworkMessageSource, LogMessageType, DebugMessageLevel, message, sendURL, sendLineNumber, 0, 0, requestIdentifier);
     277    }
    280278}
    281279
     
    287285    if (response.httpStatusCode() >= 400) {
    288286        String message = "Failed to load resource: the server responded with a status of " + String::number(response.httpStatusCode()) + " (" + response.httpStatusText() + ')';
    289         addMessageToConsole(NetworkMessageSource, LogMessageType, ErrorMessageLevel, message, response.url().string(), 0, 0, requestIdentifier);
     287        addMessageToConsole(NetworkMessageSource, LogMessageType, ErrorMessageLevel, message, response.url().string(), 0, 0, 0, requestIdentifier);
    290288    }
    291289}
     
    303301        message.append(error.localizedDescription());
    304302    }
    305     addMessageToConsole(NetworkMessageSource, LogMessageType, ErrorMessageLevel, message.toString(), error.failingURL(), 0, 0, requestIdentifier);
     303    addMessageToConsole(NetworkMessageSource, LogMessageType, ErrorMessageLevel, message.toString(), error.failingURL(), 0, 0, 0, requestIdentifier);
    306304}
    307305
  • trunk/Source/WebCore/inspector/InspectorConsoleAgent.h

    r138457 r149125  
    7272
    7373    void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, ScriptState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier = 0);
    74     void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
     74    void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
    7575
    7676    // FIXME: Remove once we no longer generate stacks outside of Inspector.
     
    8989    void didFailLoading(unsigned long requestIdentifier, const ResourceError&);
    9090#if ENABLE(JAVASCRIPT_DEBUGGER)
    91     void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL);
    92     void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL);
     91    void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, unsigned columnNumber, const String& sourceURL);
     92    void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL);
    9393#endif
    9494    virtual void setMonitoringXHREnabled(ErrorString*, bool enabled);
  • trunk/Source/WebCore/inspector/InspectorConsoleInstrumentation.h

    r137534 r149125  
    7474}
    7575
    76 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)
    77 {
    78 #if ENABLE(INSPECTOR)
    79     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
    80         addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, scriptId, lineNumber, state, requestIdentifier);
     76inline 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)
     77{
     78#if ENABLE(INSPECTOR)
     79    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
     80        addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, scriptId, lineNumber, columnNumber, state, requestIdentifier);
    8181#else
    8282    UNUSED_PARAM(page);
     
    109109}
    110110
    111 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)
     111inline 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)
    112112{
    113113#if ENABLE(INSPECTOR)
    114114    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForWorkerContext(workerContext))
    115         addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, scriptId, lineNumber, state, requestIdentifier);
     115        addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, scriptId, lineNumber, columnNumber, state, requestIdentifier);
    116116#else
    117117    UNUSED_PARAM(workerContext);
     
    122122    UNUSED_PARAM(scriptId);
    123123    UNUSED_PARAM(lineNumber);
     124    UNUSED_PARAM(columnNumber);
    124125    UNUSED_PARAM(state);
    125126    UNUSED_PARAM(requestIdentifier);
     
    176177
    177178#if ENABLE(JAVASCRIPT_DEBUGGER)
    178 inline void InspectorInstrumentation::addStartProfilingMessageToConsole(Page* page, const String& title, unsigned lineNumber, const String& sourceURL)
    179 {
    180 #if ENABLE(INSPECTOR)
    181     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
    182         addStartProfilingMessageToConsoleImpl(instrumentingAgents, title, lineNumber, sourceURL);
     179inline void InspectorInstrumentation::addStartProfilingMessageToConsole(Page* page, const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL)
     180{
     181#if ENABLE(INSPECTOR)
     182    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
     183        addStartProfilingMessageToConsoleImpl(instrumentingAgents, title, lineNumber, columnNumber, sourceURL);
    183184#else
    184185    UNUSED_PARAM(page);
    185186    UNUSED_PARAM(title);
    186187    UNUSED_PARAM(lineNumber);
     188    UNUSED_PARAM(columnNumber);
    187189    UNUSED_PARAM(sourceURL);
    188190#endif
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp

    r148373 r149125  
    10311031}
    10321032
    1033 void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, ScriptState* state, unsigned long requestIdentifier)
     1033void 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)
    10341034{
    10351035    if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
    1036         consoleAgent->addMessageToConsole(source, type, level, message, scriptId, lineNumber, state, requestIdentifier);
     1036        consoleAgent->addMessageToConsole(source, type, level, message, scriptId, lineNumber, columnNumber, state, requestIdentifier);
    10371037}
    10381038
     
    10691069
    10701070#if ENABLE(JAVASCRIPT_DEBUGGER)
    1071 void InspectorInstrumentation::addStartProfilingMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, const String& title, unsigned lineNumber, const String& sourceURL)
     1071void InspectorInstrumentation::addStartProfilingMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL)
    10721072{
    10731073    if (InspectorProfilerAgent* profilerAgent = instrumentingAgents->inspectorProfilerAgent())
    1074         profilerAgent->addStartProfilingMessageToConsole(title, lineNumber, sourceURL);
     1074        profilerAgent->addStartProfilingMessageToConsole(title, lineNumber, columnNumber, sourceURL);
    10751075}
    10761076
     
    10791079    if (InspectorProfilerAgent* profilerAgent = instrumentingAgents->inspectorProfilerAgent()) {
    10801080        const ScriptCallFrame& lastCaller = callStack->at(0);
    1081         profilerAgent->addProfile(profile, lastCaller.lineNumber(), lastCaller.sourceURL());
     1081        profilerAgent->addProfile(profile, lastCaller.lineNumber(), lastCaller.columnNumber(), lastCaller.sourceURL());
    10821082    }
    10831083}
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.h

    r148133 r149125  
    234234    static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0);
    235235    static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, ScriptState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier = 0);
    236     static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, const String&, unsigned lineNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
     236    static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
    237237#if ENABLE(WORKERS)
    238238    // FIXME: Convert to ScriptArguments to match non-worker context.
    239239    static void addMessageToConsole(WorkerContext*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0);
    240     static void addMessageToConsole(WorkerContext*, MessageSource, MessageType, MessageLevel, const String& message, const String&, unsigned lineNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
     240    static void addMessageToConsole(WorkerContext*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
    241241#endif
    242242    static void consoleCount(Page*, ScriptState*, PassRefPtr<ScriptArguments>);
     
    251251
    252252#if ENABLE(JAVASCRIPT_DEBUGGER)
    253     static void addStartProfilingMessageToConsole(Page*, const String& title, unsigned lineNumber, const String& sourceURL);
     253    static void addStartProfilingMessageToConsole(Page*, const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL);
    254254    static void addProfile(Page*, RefPtr<ScriptProfile>, PassRefPtr<ScriptCallStack>);
    255255    static String getCurrentUserInitiatedProfileName(Page*, bool incrementProfileNumber);
     
    435435
    436436    static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, ScriptState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier);
    437     static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, ScriptState*, unsigned long requestIdentifier);
     437    static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState*, unsigned long requestIdentifier);
    438438
    439439    // FIXME: Remove once we no longer generate stacks outside of Inspector.
     
    451451
    452452#if ENABLE(JAVASCRIPT_DEBUGGER)
    453     static void addStartProfilingMessageToConsoleImpl(InstrumentingAgents*, const String& title, unsigned lineNumber, const String& sourceURL);
     453    static void addStartProfilingMessageToConsoleImpl(InstrumentingAgents*, const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL);
    454454    static void addProfileImpl(InstrumentingAgents*, RefPtr<ScriptProfile>, PassRefPtr<ScriptCallStack>);
    455455    static String getCurrentUserInitiatedProfileNameImpl(InstrumentingAgents*, bool incrementProfileNumber);
  • trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp

    r148921 r149125  
    149149}
    150150
    151 void InspectorProfilerAgent::addProfile(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, const String& sourceURL)
     151void InspectorProfilerAgent::addProfile(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, unsigned columnNumber, const String& sourceURL)
    152152{
    153153    RefPtr<ScriptProfile> profile = prpProfile;
     
    155155    if (m_frontend && m_state->getBoolean(ProfilerAgentState::profileHeadersRequested))
    156156        m_frontend->addProfileHeader(createProfileHeader(*profile));
    157     addProfileFinishedMessageToConsole(profile, lineNumber, sourceURL);
    158 }
    159 
    160 void InspectorProfilerAgent::addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, const String& sourceURL)
     157    addProfileFinishedMessageToConsole(profile, lineNumber, columnNumber, sourceURL);
     158}
     159
     160void InspectorProfilerAgent::addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, unsigned columnNumber, const String& sourceURL)
    161161{
    162162    if (!m_frontend)
     
    164164    RefPtr<ScriptProfile> profile = prpProfile;
    165165    String message = makeString(profile->title(), '#', String::number(profile->uid()));
    166     m_consoleAgent->addMessageToConsole(ConsoleAPIMessageSource, ProfileEndMessageType, DebugMessageLevel, message, sourceURL, lineNumber);
    167 }
    168 
    169 void InspectorProfilerAgent::addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL)
     166    m_consoleAgent->addMessageToConsole(ConsoleAPIMessageSource, ProfileEndMessageType, DebugMessageLevel, message, sourceURL, lineNumber, columnNumber);
     167}
     168
     169void InspectorProfilerAgent::addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL)
    170170{
    171171    if (!m_frontend)
    172172        return;
    173     m_consoleAgent->addMessageToConsole(ConsoleAPIMessageSource, ProfileMessageType, DebugMessageLevel, title, sourceURL, lineNumber);
     173    m_consoleAgent->addMessageToConsole(ConsoleAPIMessageSource, ProfileMessageType, DebugMessageLevel, title, sourceURL, lineNumber, columnNumber);
    174174}
    175175
     
    384384    String title = getCurrentUserInitiatedProfileName(true);
    385385    startProfiling(title);
    386     addStartProfilingMessageToConsole(title, 0, String());
     386    addStartProfilingMessageToConsole(title, 0, 0, String());
    387387    toggleRecordButton(true);
    388388    m_state->setBoolean(ProfilerAgentState::userInitiatedProfiling, true);
     
    397397    RefPtr<ScriptProfile> profile = stopProfiling(title);
    398398    if (profile)
    399         addProfile(profile, 0, String());
     399        addProfile(profile, 0, 0, String());
    400400    toggleRecordButton(false);
    401401    m_state->setBoolean(ProfilerAgentState::userInitiatedProfiling, false);
  • trunk/Source/WebCore/inspector/InspectorProfilerAgent.h

    r148921 r149125  
    6666    virtual ~InspectorProfilerAgent();
    6767
    68     void addProfile(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, const String& sourceURL);
    69     void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL);
    70     void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL);
     68    void addProfile(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, unsigned columnNumber, const String& sourceURL);
     69    void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, unsigned columnNumber, const String& sourceURL);
     70    void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL);
    7171    virtual void collectGarbage(ErrorString*);
    7272    virtual void clearProfiles(ErrorString*) { resetState(); }
  • trunk/Source/WebCore/loader/EmptyClients.h

    r148731 r149125  
    102102    virtual void setResizable(bool) { }
    103103
    104     virtual void addMessageToConsole(MessageSource, MessageLevel, const String&, unsigned, const String&) { }
     104    virtual void addMessageToConsole(MessageSource, MessageLevel, const String&, unsigned, unsigned, const String&) { }
    105105
    106106    virtual bool canRunBeforeUnloadConfirmPanel() { return false; }
  • trunk/Source/WebCore/page/ChromeClient.h

    r149123 r149125  
    130130    virtual void setResizable(bool) = 0;
    131131
    132     virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& sourceID) = 0;
     132    virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID) = 0;
    133133    // FIXME: Remove this MessageType variant once all the clients are updated.
    134     virtual void addMessageToConsole(MessageSource source, MessageType, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceID)
     134    virtual void addMessageToConsole(MessageSource source, MessageType, MessageLevel level, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID)
    135135    {
    136         addMessageToConsole(source, level, message, lineNumber, sourceID);
     136        addMessageToConsole(source, level, message, lineNumber, columnNumber, sourceID);
    137137    }
    138138
  • trunk/Source/WebCore/page/Console.cpp

    r147749 r149125  
    9090
    9191    if (gotMessage)
    92         page->chrome()->client()->addMessageToConsole(ConsoleAPIMessageSource, type, level, message, lastCaller.lineNumber(), lastCaller.sourceURL());
     92        page->chrome()->client()->addMessageToConsole(ConsoleAPIMessageSource, type, level, message, lastCaller.lineNumber(), lastCaller.columnNumber(), lastCaller.sourceURL());
    9393
    9494    if (!page->settings()->logsPageMessagesToSystemConsoleEnabled() && !PageConsole::shouldPrintExceptions())
     
    202202    RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, 1));
    203203    const ScriptCallFrame& lastCaller = callStack->at(0);
    204     InspectorInstrumentation::addStartProfilingMessageToConsole(page, resolvedTitle, lastCaller.lineNumber(), lastCaller.sourceURL());
     204    InspectorInstrumentation::addStartProfilingMessageToConsole(page, resolvedTitle, lastCaller.lineNumber(), lastCaller.columnNumber(), lastCaller.sourceURL());
    205205}
    206206
     
    253253void Console::groupEnd()
    254254{
    255     InspectorInstrumentation::addMessageToConsole(page(), ConsoleAPIMessageSource, EndGroupMessageType, LogMessageLevel, String(), String(), 0);
     255    InspectorInstrumentation::addMessageToConsole(page(), ConsoleAPIMessageSource, EndGroupMessageType, LogMessageLevel, String(), String(), 0, 0);
    256256}
    257257
  • trunk/Source/WebCore/page/ContentSecurityPolicy.cpp

    r147346 r149125  
    18941894void ContentSecurityPolicy::logToConsole(const String& message, const String& contextURL, const WTF::OrdinalNumber& contextLine, ScriptState* state) const
    18951895{
    1896     m_scriptExecutionContext->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message, contextURL, contextLine.oneBasedInt(), state);
     1896    // FIXME: <http://webkit.org/b/114317> ContentSecurityPolicy::logToConsole should include a column number
     1897    m_scriptExecutionContext->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message, contextURL, contextLine.oneBasedInt(), 0, state);
    18971898}
    18981899
  • trunk/Source/WebCore/page/PageConsole.cpp

    r147749 r149125  
    138138    if (document)
    139139        url = document->url().string();
     140    // FIXME: <http://webkit.org/b/114319> PageConsole::addMessage should automatically determine column number alongside line number
    140141    unsigned line = 0;
    141142    if (document && document->parsing() && !document->isInDocumentWrite() && document->scriptableDocumentParser()) {
     
    144145            line = parser->lineNumber().oneBasedInt();
    145146    }
    146     addMessage(source, level, message, url, line, 0, 0, requestIdentifier);
     147    addMessage(source, level, message, url, line, 0, 0, 0, requestIdentifier);
    147148}
    148149
    149150void PageConsole::addMessage(MessageSource source, MessageLevel level, const String& message, PassRefPtr<ScriptCallStack> callStack)
    150151{
    151     addMessage(source, level, message, String(), 0, callStack, 0);
    152 }
    153 
    154 void PageConsole::addMessage(MessageSource source, MessageLevel level, const String& message, const String& url, unsigned lineNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
     152    addMessage(source, level, message, String(), 0, 0, callStack, 0);
     153}
     154
     155void PageConsole::addMessage(MessageSource source, MessageLevel level, const String& message, const String& url, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
    155156{
    156157    if (muteCount && source != ConsoleAPIMessageSource)
     
    164165        InspectorInstrumentation::addMessageToConsole(page, source, LogMessageType, level, message, callStack, requestIdentifier);
    165166    else
    166         InspectorInstrumentation::addMessageToConsole(page, source, LogMessageType, level, message, url, lineNumber, state, requestIdentifier);
     167        InspectorInstrumentation::addMessageToConsole(page, source, LogMessageType, level, message, url, lineNumber, columnNumber, state, requestIdentifier);
    167168
    168169    if (source == CSSMessageSource)
     
    172173        return;
    173174
    174     page->chrome()->client()->addMessageToConsole(source, level, message, lineNumber, url);
     175    page->chrome()->client()->addMessageToConsole(source, level, message, lineNumber, columnNumber, url);
    175176
    176177    if (!page->settings()->logsPageMessagesToSystemConsoleEnabled() && !shouldPrintExceptions())
  • trunk/Source/WebCore/page/PageConsole.h

    r146208 r149125  
    4949    static void printMessageSourceAndLevelPrefix(MessageSource, MessageLevel);
    5050
    51     void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack> = 0, ScriptState* = 0, unsigned long requestIdentifier = 0);
     51    void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> = 0, ScriptState* = 0, unsigned long requestIdentifier = 0);
    5252    void addMessage(MessageSource, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>);
    5353    void addMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0, Document* = 0);
  • trunk/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp

    r145466 r149125  
    8282
    8383    // WorkerReportingProxy
    84     virtual void postExceptionToWorkerObject(const String& errorMessage, int lineNumber, const String& sourceURL);
    85     virtual void postConsoleMessageToWorkerObject(MessageSource, MessageLevel, const String& message, int lineNumber, const String& sourceURL);
     84    virtual void postExceptionToWorkerObject(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL);
     85    virtual void postConsoleMessageToWorkerObject(MessageSource, MessageLevel, const String& message, int lineNumber, int columnNumber, const String& sourceURL);
    8686#if ENABLE(INSPECTOR)
    8787    virtual void postMessageToPageInspector(const String&);
     
    177177}
    178178
    179 static void postExceptionTask(ScriptExecutionContext* context, const String& errorMessage, int lineNumber, const String& sourceURL)
    180 {
     179static void postExceptionTask(ScriptExecutionContext* context, const String& errorMessage, int lineNumber, int /*columnNumber*/, const String& sourceURL)
     180{
     181    // FIXME: <http://webkit.org/b/114315> ScriptExecutionContext log exception should include a column number
    181182    context->reportException(errorMessage, lineNumber, sourceURL, 0);
    182183}
    183184
    184 void SharedWorkerProxy::postExceptionToWorkerObject(const String& errorMessage, int lineNumber, const String& sourceURL)
     185void SharedWorkerProxy::postExceptionToWorkerObject(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL)
    185186{
    186187    MutexLocker lock(m_workerDocumentsLock);
    187188    for (HashSet<Document*>::iterator iter = m_workerDocuments.begin(); iter != m_workerDocuments.end(); ++iter)
    188         (*iter)->postTask(createCallbackTask(&postExceptionTask, errorMessage, lineNumber, sourceURL));
    189 }
    190 
    191 static void postConsoleMessageTask(ScriptExecutionContext* document, MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber)
    192 {
    193     document->addConsoleMessage(source, level, message, sourceURL, lineNumber);
    194 }
    195 
    196 void SharedWorkerProxy::postConsoleMessageToWorkerObject(MessageSource source, MessageLevel level, const String& message, int lineNumber, const String& sourceURL)
     189        (*iter)->postTask(createCallbackTask(&postExceptionTask, errorMessage, lineNumber, columnNumber, sourceURL));
     190}
     191
     192static void postConsoleMessageTask(ScriptExecutionContext* document, MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber)
     193{
     194    document->addConsoleMessage(source, level, message, sourceURL, lineNumber, columnNumber);
     195}
     196
     197void SharedWorkerProxy::postConsoleMessageToWorkerObject(MessageSource source, MessageLevel level, const String& message, int lineNumber, int columnNumber, const String& sourceURL)
    197198{
    198199    MutexLocker lock(m_workerDocumentsLock);
    199200    for (HashSet<Document*>::iterator iter = m_workerDocuments.begin(); iter != m_workerDocuments.end(); ++iter)
    200         (*iter)->postTask(createCallbackTask(&postConsoleMessageTask, source, level, message, sourceURL, lineNumber));
     201        (*iter)->postTask(createCallbackTask(&postConsoleMessageTask, source, level, message, sourceURL, lineNumber, columnNumber));
    201202}
    202203
  • trunk/Source/WebCore/workers/SharedWorkerContext.cpp

    r137318 r149125  
    8181void SharedWorkerContext::logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack> callStack)
    8282{
     83    // FIXME: <http://webkit.org/b/114315> ScriptExecutionContext log exception should include a column number
    8384    WorkerContext::logExceptionToConsole(errorMessage, sourceURL, lineNumber, callStack);
    84     addMessageToWorkerConsole(JSMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber, callStack);
     85    addMessageToWorkerConsole(JSMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber, 0, callStack);
    8586}
    8687
  • trunk/Source/WebCore/workers/WorkerContext.cpp

    r147761 r149125  
    276276void WorkerContext::logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>)
    277277{
    278     thread()->workerReportingProxy().postExceptionToWorkerObject(errorMessage, lineNumber, sourceURL);
     278    // FIXME: <http://webkit.org/b/114315> ScriptExecutionContext log exception should include a column number
     279    thread()->workerReportingProxy().postExceptionToWorkerObject(errorMessage, lineNumber, 0, sourceURL);
    279280}
    280281
     
    285286        return;
    286287    }
    287     thread()->workerReportingProxy().postConsoleMessageToWorkerObject(source, level, message, 0, String());
    288 
    289     addMessageToWorkerConsole(source, level, message, String(), 0, 0, 0, requestIdentifier);
    290 }
    291 
    292 void WorkerContext::addMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
     288
     289    thread()->workerReportingProxy().postConsoleMessageToWorkerObject(source, level, message, 0, 0, String());
     290    addMessageToWorkerConsole(source, level, message, String(), 0, 0, 0, 0, requestIdentifier);
     291}
     292
     293void WorkerContext::addMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
    293294{
    294295    if (!isContextThread()) {
     
    296297        return;
    297298    }
    298     thread()->workerReportingProxy().postConsoleMessageToWorkerObject(source, level, message, lineNumber, sourceURL);
    299     addMessageToWorkerConsole(source, level, message, sourceURL, lineNumber, callStack, state, requestIdentifier);
    300 }
    301 
    302 void WorkerContext::addMessageToWorkerConsole(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
     299
     300    thread()->workerReportingProxy().postConsoleMessageToWorkerObject(source, level, message, lineNumber, columnNumber, sourceURL);
     301    addMessageToWorkerConsole(source, level, message, sourceURL, lineNumber, columnNumber, callStack, state, requestIdentifier);
     302}
     303
     304void WorkerContext::addMessageToWorkerConsole(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
    303305{
    304306    ASSERT(isContextThread());
     
    306308        InspectorInstrumentation::addMessageToConsole(this, source, LogMessageType, level, message, callStack, requestIdentifier);
    307309    else
    308         InspectorInstrumentation::addMessageToConsole(this, source, LogMessageType, level, message, sourceURL, lineNumber, state, requestIdentifier);
     310        InspectorInstrumentation::addMessageToConsole(this, source, LogMessageType, level, message, sourceURL, lineNumber, columnNumber, state, requestIdentifier);
    309311}
    310312
  • trunk/Source/WebCore/workers/WorkerContext.h

    r145930 r149125  
    146146
    147147        virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>) OVERRIDE;
    148         void addMessageToWorkerConsole(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0);
     148        void addMessageToWorkerConsole(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0);
    149149
    150150    private:
     
    160160        virtual KURL virtualCompleteURL(const String&) const;
    161161
    162         virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0) OVERRIDE;
     162        virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0) OVERRIDE;
    163163        virtual void addConsoleMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0) OVERRIDE;
    164164
  • trunk/Source/WebCore/workers/WorkerMessagingProxy.cpp

    r147761 r149125  
    114114class WorkerExceptionTask : public ScriptExecutionContext::Task {
    115115public:
    116     static PassOwnPtr<WorkerExceptionTask> create(const String& errorMessage, int lineNumber, const String& sourceURL, WorkerMessagingProxy* messagingProxy)
    117     {
    118         return adoptPtr(new WorkerExceptionTask(errorMessage, lineNumber, sourceURL, messagingProxy));
    119     }
    120 
    121 private:
    122     WorkerExceptionTask(const String& errorMessage, int lineNumber, const String& sourceURL, WorkerMessagingProxy* messagingProxy)
     116    static PassOwnPtr<WorkerExceptionTask> create(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL, WorkerMessagingProxy* messagingProxy)
     117    {
     118        return adoptPtr(new WorkerExceptionTask(errorMessage, lineNumber, columnNumber, sourceURL, messagingProxy));
     119    }
     120
     121private:
     122    WorkerExceptionTask(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL, WorkerMessagingProxy* messagingProxy)
    123123        : m_errorMessage(errorMessage.isolatedCopy())
    124124        , m_lineNumber(lineNumber)
     125        , m_columnNumber(columnNumber)
    125126        , m_sourceURL(sourceURL.isolatedCopy())
    126127        , m_messagingProxy(messagingProxy)
     
    138139
    139140        bool errorHandled = !workerObject->dispatchEvent(ErrorEvent::create(m_errorMessage, m_sourceURL, m_lineNumber));
    140         if (!errorHandled)
     141        if (!errorHandled) {
     142            // FIXME: <http://webkit.org/b/114315> ScriptExecutionContext log exception should include a column number
    141143            context->reportException(m_errorMessage, m_lineNumber, m_sourceURL, 0);
     144        }
    142145    }
    143146
    144147    String m_errorMessage;
    145148    int m_lineNumber;
     149    int m_columnNumber;
    146150    String m_sourceURL;
    147151    WorkerMessagingProxy* m_messagingProxy;
     
    318322}
    319323
    320 void WorkerMessagingProxy::postExceptionToWorkerObject(const String& errorMessage, int lineNumber, const String& sourceURL)
    321 {
    322     m_scriptExecutionContext->postTask(WorkerExceptionTask::create(errorMessage, lineNumber, sourceURL, this));
    323 }
    324 
    325 static void postConsoleMessageTask(ScriptExecutionContext* context, WorkerMessagingProxy* messagingProxy, MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceURL)
     324void WorkerMessagingProxy::postExceptionToWorkerObject(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL)
     325{
     326    m_scriptExecutionContext->postTask(WorkerExceptionTask::create(errorMessage, lineNumber, columnNumber, sourceURL, this));
     327}
     328
     329static void postConsoleMessageTask(ScriptExecutionContext* context, WorkerMessagingProxy* messagingProxy, MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceURL)
    326330{
    327331    if (messagingProxy->askedToTerminate())
    328332        return;
    329     context->addConsoleMessage(source, level, message, sourceURL, lineNumber);
    330 }
    331 
    332 void WorkerMessagingProxy::postConsoleMessageToWorkerObject(MessageSource source, MessageLevel level, const String& message, int lineNumber, const String& sourceURL)
    333 {
    334     m_scriptExecutionContext->postTask(createCallbackTask(&postConsoleMessageTask, AllowCrossThreadAccess(this), source, level, message, lineNumber, sourceURL));
     333    context->addConsoleMessage(source, level, message, sourceURL, lineNumber, columnNumber);
     334}
     335
     336void WorkerMessagingProxy::postConsoleMessageToWorkerObject(MessageSource source, MessageLevel level, const String& message, int lineNumber, int columnNumber, const String& sourceURL)
     337{
     338    m_scriptExecutionContext->postTask(createCallbackTask(&postConsoleMessageTask, AllowCrossThreadAccess(this), source, level, message, lineNumber, columnNumber, sourceURL));
    335339}
    336340
  • trunk/Source/WebCore/workers/WorkerMessagingProxy.h

    r145930 r149125  
    6868        // (Only use these methods in the worker context thread.)
    6969        virtual void postMessageToWorkerObject(PassRefPtr<SerializedScriptValue>, PassOwnPtr<MessagePortChannelArray>) OVERRIDE;
    70         virtual void postExceptionToWorkerObject(const String& errorMessage, int lineNumber, const String& sourceURL) OVERRIDE;
    71         virtual void postConsoleMessageToWorkerObject(MessageSource, MessageLevel, const String& message, int lineNumber, const String& sourceURL) OVERRIDE;
     70        virtual void postExceptionToWorkerObject(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL) OVERRIDE;
     71        virtual void postConsoleMessageToWorkerObject(MessageSource, MessageLevel, const String& message, int lineNumber, int columnNumber, const String& sourceURL) OVERRIDE;
    7272#if ENABLE(INSPECTOR)
    7373        virtual void postMessageToPageInspector(const String&) OVERRIDE;
  • trunk/Source/WebCore/workers/WorkerReportingProxy.h

    r137318 r149125  
    4444        virtual ~WorkerReportingProxy() {}
    4545
    46         virtual void postExceptionToWorkerObject(const String& errorMessage, int lineNumber, const String& sourceURL) = 0;
     46        virtual void postExceptionToWorkerObject(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL) = 0;
    4747
    48         virtual void postConsoleMessageToWorkerObject(MessageSource, MessageLevel, const String& message, int lineNumber, const String& sourceURL) = 0;
     48        virtual void postConsoleMessageToWorkerObject(MessageSource, MessageLevel, const String& message, int lineNumber, int columnNumber, const String& sourceURL) = 0;
    4949#if ENABLE(INSPECTOR)
    5050        virtual void postMessageToPageInspector(const String&) = 0;
  • trunk/Source/WebCore/xml/XSLTProcessorLibxslt.cpp

    r148209 r149125  
    101101    }
    102102
    103     console->addMessage(XMLMessageSource, level, error->message, error->file, error->line);
     103    // xmlError->int2 is the column number of the error or 0 if N/A.
     104    console->addMessage(XMLMessageSource, level, error->message, error->file, error->line, error->int2);
    104105}
    105106
  • trunk/Source/WebCore/xml/XSLTProcessorQt.cpp

    r144064 r149125  
    8585
    8686    Console* console = m_document->domWindow()->console();
    87     console->addMessage(XMLMessageSource, level, description, sourceLocation.uri().toString(), sourceLocation.line());
     87    console->addMessage(XMLMessageSource, level, description, sourceLocation.uri().toString(), sourceLocation.line(), sourceLocation.column());
    8888}
    8989
  • trunk/Source/WebKit/blackberry/Api/DumpRenderTreeClient.h

    r145849 r149125  
    6262
    6363    // ChromeClient delegates
    64     virtual void addMessageToConsole(const String& message, unsigned lineNumber, const String& sourceID) = 0;
     64    virtual void addMessageToConsole(const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID) = 0;
    6565    virtual void runJavaScriptAlert(const String& message) = 0;
    6666    virtual bool runJavaScriptConfirm(const String& message) = 0;
  • trunk/Source/WebKit/blackberry/Api/WebPageClient.h

    r148451 r149125  
    110110    virtual void notifyWindowObjectCleared() = 0;
    111111
    112     virtual void addMessageToConsole(const unsigned short* message, unsigned messageLength, const unsigned short* source, unsigned sourceLength, unsigned lineNumber) = 0;
     112    virtual void addMessageToConsole(const unsigned short* message, unsigned messageLength, const unsigned short* source, unsigned sourceLength, unsigned lineNumber, unsigned columnNumber) = 0;
    113113    virtual int showAlertDialog(AlertType) = 0;
    114114
  • trunk/Source/WebKit/blackberry/ChangeLog

    r149124 r149125  
     12013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: ConsoleMessage should include line and column number where possible
     4        https://bugs.webkit.org/show_bug.cgi?id=114929
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * Api/DumpRenderTreeClient.h:
     9        * Api/WebPageClient.h:
     10        * WebCoreSupport/ChromeClientBlackBerry.cpp:
     11        (WebCore::ChromeClientBlackBerry::addMessageToConsole):
     12        * WebCoreSupport/ChromeClientBlackBerry.h:
     13        (ChromeClientBlackBerry):
     14
    1152013-04-25  Konrad Piascik  <kpiascik@blackberry.com>
    216
  • trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp

    r148667 r149125  
    9292}
    9393
    94 void ChromeClientBlackBerry::addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& sourceID)
     94void ChromeClientBlackBerry::addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID)
    9595{
    9696#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
    9797    if (m_webPagePrivate->m_dumpRenderTree) {
    98         m_webPagePrivate->m_dumpRenderTree->addMessageToConsole(message, lineNumber, sourceID);
    99         return;
    100     }
    101 #endif
    102 
    103     m_webPagePrivate->m_client->addMessageToConsole(message.characters(), message.length(), sourceID.characters(), sourceID.length(), lineNumber);
     98        m_webPagePrivate->m_dumpRenderTree->addMessageToConsole(message, lineNumber, columnNumber, sourceID);
     99        return;
     100    }
     101#endif
     102
     103    m_webPagePrivate->m_client->addMessageToConsole(message.characters(), message.length(), sourceID.characters(), sourceID.length(), lineNumber, columnNumber);
    104104}
    105105
  • trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.h

    r147960 r149125  
    6262    virtual bool menubarVisible();
    6363    virtual void setResizable(bool);
    64     virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& sourceID);
     64    virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID);
    6565    virtual bool canRunBeforeUnloadConfirmPanel();
    6666    virtual bool runBeforeUnloadConfirmPanel(const String&, Frame*);
  • trunk/Source/WebKit/efl/ChangeLog

    r149094 r149125  
     12013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: ConsoleMessage should include line and column number where possible
     4        https://bugs.webkit.org/show_bug.cgi?id=114929
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * WebCoreSupport/ChromeClientEfl.cpp:
     9        (WebCore::ChromeClientEfl::addMessageToConsole):
     10        * WebCoreSupport/ChromeClientEfl.h:
     11        (ChromeClientEfl):
     12
    1132013-04-25  Commit Queue  <rniwa@webkit.org>
    214
  • trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp

    r146320 r149125  
    275275
    276276void ChromeClientEfl::addMessageToConsole(MessageSource, MessageLevel, const String& message,
    277                                           unsigned int lineNumber, const String& sourceID)
    278 {
     277                                          unsigned lineNumber, unsigned columnNumber, const String& sourceID)
     278{
     279    UNUSED_PARAM(columnNumber);
    279280    ewk_view_add_console_message(m_view, message.utf8().data(), lineNumber, sourceID.utf8().data());
    280281}
  • trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h

    r146320 r149125  
    8585
    8686    virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message,
    87                                      unsigned int lineNumber, const String& sourceID);
     87                                     unsigned lineNumber, unsigned columnNumber, const String& sourceID);
    8888
    8989    virtual bool canRunBeforeUnloadConfirmPanel();
  • trunk/Source/WebKit/gtk/ChangeLog

    r148935 r149125  
     12013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: ConsoleMessage should include line and column number where possible
     4        https://bugs.webkit.org/show_bug.cgi?id=114929
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * WebCoreSupport/ChromeClientGtk.cpp:
     9        (WebKit::ChromeClient::addMessageToConsole):
     10        * WebCoreSupport/ChromeClientGtk.h:
     11        (ChromeClient):
     12
    1132013-04-22  Martin Robinson  <mrobinson@igalia.com>
    214
  • trunk/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp

    r148545 r149125  
    335335}
    336336
    337 void ChromeClient::addMessageToConsole(WebCore::MessageSource source, WebCore::MessageLevel level, const WTF::String& message, unsigned lineNumber, const WTF::String& sourceId)
     337void ChromeClient::addMessageToConsole(WebCore::MessageSource source, WebCore::MessageLevel level, const WTF::String& message, unsigned lineNumber, unsigned columnNumber, const WTF::String& sourceId)
    338338{
    339339    gboolean retval;
  • trunk/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h

    r141566 r149125  
    8383        virtual void setResizable(bool);
    8484
    85         virtual void addMessageToConsole(MessageSource, MessageLevel, const WTF::String& message, unsigned lineNumber, const WTF::String& sourceID);
     85        virtual void addMessageToConsole(MessageSource, MessageLevel, const WTF::String& message, unsigned lineNumber, unsigned columnNumber, const WTF::String& sourceID);
    8686
    8787        virtual bool canRunBeforeUnloadConfirmPanel();
  • trunk/Source/WebKit/mac/ChangeLog

    r149035 r149125  
     12013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: ConsoleMessage should include line and column number where possible
     4        https://bugs.webkit.org/show_bug.cgi?id=114929
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * WebCoreSupport/WebChromeClient.h:
     9        * WebCoreSupport/WebChromeClient.mm:
     10        (WebChromeClient::addMessageToConsole):
     11
    1122013-04-24  Jessie Berlin  <jberlin@apple.com>
    213
  • trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h

    r144795 r149125  
    7575    virtual void setResizable(bool) OVERRIDE;
    7676   
    77     virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageLevel, const WTF::String& message, unsigned lineNumber, const WTF::String& sourceURL) OVERRIDE;
     77    virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageLevel, const WTF::String& message, unsigned lineNumber, unsigned columnNumber, const WTF::String& sourceURL) OVERRIDE;
    7878
    7979    virtual bool canRunBeforeUnloadConfirmPanel() OVERRIDE;
  • trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm

    r147447 r149125  
    386386}
    387387
    388 void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel level, const String& message, unsigned int lineNumber, const String& sourceURL)
     388void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel level, const String& message, unsigned int lineNumber, unsigned columnNumber, const String& sourceURL)
    389389{
    390390    id delegate = [m_webView UIDelegate];
     
    407407        (NSString *)message, @"message",
    408408        [NSNumber numberWithUnsignedInt:lineNumber], @"lineNumber",
     409        [NSNumber numberWithUnsignedInt:columnNumber], @"columnNumber",
    409410        (NSString *)sourceURL, @"sourceURL",
    410411        messageSource, @"MessageSource",
  • trunk/Source/WebKit/qt/ChangeLog

    r149123 r149125  
     12013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: ConsoleMessage should include line and column number where possible
     4        https://bugs.webkit.org/show_bug.cgi?id=114929
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * WebCoreSupport/ChromeClientQt.cpp:
     9        (WebCore::ChromeClientQt::addMessageToConsole):
     10        * WebCoreSupport/ChromeClientQt.h:
     11
    1122013-04-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
    213
  • trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp

    r149123 r149125  
    309309}
    310310
    311 void ChromeClientQt::addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& sourceID)
     311void ChromeClientQt::addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID)
    312312{
    313313    QString x = message;
    314314    QString y = sourceID;
     315    UNUSED_PARAM(columnNumber);
    315316    m_webPage->javaScriptConsoleMessage(x, lineNumber, y);
    316317}
  • trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h

    r141265 r149125  
    102102    virtual void setResizable(bool);
    103103
    104     virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& sourceID);
     104    virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID);
    105105
    106106    virtual bool canRunBeforeUnloadConfirmPanel();
  • trunk/Source/WebKit/win/ChangeLog

    r149037 r149125  
     12013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: ConsoleMessage should include line and column number where possible
     4        https://bugs.webkit.org/show_bug.cgi?id=114929
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * WebCoreSupport/WebChromeClient.cpp:
     9        (WebChromeClient::addMessageToConsole):
     10        * WebCoreSupport/WebChromeClient.h:
     11
    1122013-04-24  Andreas Kling  <akling@apple.com>
    213
  • trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp

    r139078 r149125  
    335335}
    336336
    337 void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel level, const String& message, unsigned line, const String& url)
    338 {
     337void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, unsigned columnNumber, const String& url)
     338{
     339    UNUSED_PARAM(columnNumber);
     340
    339341    COMPtr<IWebUIDelegate> uiDelegate;
    340342    if (SUCCEEDED(m_webView->uiDelegate(&uiDelegate))) {
    341343        COMPtr<IWebUIDelegatePrivate> uiPrivate;
    342344        if (SUCCEEDED(uiDelegate->QueryInterface(IID_IWebUIDelegatePrivate, (void**)&uiPrivate)))
    343             uiPrivate->webViewAddMessageToConsole(m_webView, BString(message), line, BString(url), true);
     345            uiPrivate->webViewAddMessageToConsole(m_webView, BString(message), lineNumber, BString(url), true);
    344346    }
    345347}
  • trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.h

    r149037 r149125  
    8080    virtual void setResizable(bool);
    8181
    82     virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageLevel, const WTF::String& message, unsigned line, const WTF::String& url);
     82    virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageLevel, const WTF::String& message, unsigned lineNumber, unsigned columnNumber, const WTF::String& url);
    8383
    8484    virtual bool canRunBeforeUnloadConfirmPanel();
  • trunk/Source/WebKit/wince/ChangeLog

    r148702 r149125  
     12013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: ConsoleMessage should include line and column number where possible
     4        https://bugs.webkit.org/show_bug.cgi?id=114929
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * WebCoreSupport/ChromeClientWinCE.cpp:
     9        (WebKit::ChromeClientWinCE::addMessageToConsole):
     10        * WebCoreSupport/ChromeClientWinCE.h:
     11
    1122013-04-18  Patrick Gansterer  <paroga@webkit.org>
    213
  • trunk/Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp

    r139078 r149125  
    185185}
    186186
    187 void ChromeClientWinCE::addMessageToConsole(MessageSource, MessageLevel, const String&, unsigned, const String&)
     187void ChromeClientWinCE::addMessageToConsole(MessageSource, MessageLevel, const String&, unsigned, unsigned, const String&)
    188188{
    189189    notImplemented();
  • trunk/Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h

    r140909 r149125  
    7777    virtual void setResizable(bool);
    7878
    79     virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageLevel, const WTF::String& message, unsigned lineNumber, const WTF::String& sourceID);
     79    virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageLevel, const WTF::String& message, unsigned lineNumber, unsigned columnNumber, const WTF::String& sourceID);
    8080
    8181    virtual bool canRunBeforeUnloadConfirmPanel();
  • trunk/Source/WebKit2/ChangeLog

    r149121 r149125  
     12013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: ConsoleMessage should include line and column number where possible
     4        https://bugs.webkit.org/show_bug.cgi?id=114929
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
     9        (WebKit::WebChromeClient::addMessageToConsole):
     10        * WebProcess/WebCoreSupport/WebChromeClient.h:
     11
    1122013-04-25  Brady Eidson  <beidson@apple.com>
    213
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp

    r148278 r149125  
    283283}
    284284
    285 void WebChromeClient::addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& /*sourceID*/)
     285void WebChromeClient::addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, unsigned /*columnNumber*/, const String& /*sourceID*/)
    286286{
    287287    // Notify the bundle client.
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h

    r144397 r149125  
    9191    virtual void setResizable(bool) OVERRIDE;
    9292   
    93     virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageLevel, const String& message, unsigned lineNumber, const String& sourceID) OVERRIDE;
     93    virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageLevel, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID) OVERRIDE;
    9494   
    9595    virtual bool canRunBeforeUnloadConfirmPanel() OVERRIDE;
Note: See TracChangeset for help on using the changeset viewer.