Steps: 1. Traverse to a web page in a WebKit nightly 2. Open Web Inspector 3. Open the console. 4. Enter the text 'console.log("message")' and press Enter. Expected: to see the unadorned message in the console. Actual: message with a colored prefix of "2" indicating the message has been logged twice. 5. Enter the text 'console.log("message");console.log("message")' and press Enter. Expected: to see the message with a colored prefix of "2" indicating the message has been logged twice. Actual: message with a colored prefix of "4".
WebInspector.addMessageToConsole gets called twice, which makes me think that this is coming from the C++ side of things, not JavaScript. Nothing jumped out at me in the last few Console.cpp changes. Also, CC'ing some people on this, you can always use: http://bugs.webkit.decenturl.com/new-web-inspector-bug
I was poking around ConsoleMessage.cpp and friends and noticed a "sameness" check for the messages in InspectorController::addConsoleMessage(), so I naively just commented out the line: m_previousMessage->incrementCount(); result is never seeing a repeat count in the console. So at this point, I'm guessing that this repeatCount calculation is required, and the one in addMessage() in ConsoleView.js needs tweaking.
Created attachment 38864 [details] fix merge (too much fuzz)
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/inspector/front-end/InjectedScript.js Committed r47933