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.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149125 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HTMLOptionsCollection's namedItem and name getter should return the first item
https://bugs.webkit.org/show_bug.cgi?id=115150

Reviewed by Andreas Kling.

Source/WebCore:

Following the resolution in http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-December/038355.html,
the spefication has been updated to only return the first item when there are multiple items of the same name
in HTMLOptionsCollection; this new behavior matches that of Firefox and Opera (Presto).

Implement this new behavior to remove the custom binding code and use the fast path in namedItem and name
getter of HTMLOptionsCollection. (Obtaining all items for a given name is expensive!).

Tests: fast/dom/HTMLSelectElement/named-options.html
       fast/dom/html-collections-named-getter.html

* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore): Removed the custom bindings for name getter and namedItem.
* html/HTMLOptionsCollection.idl:

LayoutTests:

Changed the expectations of the tests.

* fast/dom/HTMLSelectElement/named-options-expected.txt:
* fast/dom/HTMLSelectElement/script-tests/named-options.js:
* fast/dom/html-collections-named-getter-expected.txt:
* fast/dom/html-collections-named-getter.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
cloneChildNodes looks for deleteButtonController in each level of recursion
https://bugs.webkit.org/show_bug.cgi?id=115146

Reviewed by Andreas Kling.

Obtain the delete button controller upfront, and shallow copy descendents of each child
so that we don't look for the delete button controller inside cloneNode called on each child.

Performance Tests: DOM/CloneNodes.html

* dom/ContainerNode.cpp:
(WebCore::cloneChildNodesAvoidingDeleteButon): Extracted.
(WebCore::ContainerNode::cloneChildNodes):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32 Bit: Crash due to RegExpTest nodes not setting result type to Boolean
https://bugs.webkit.org/show_bug.cgi?id=115188

Reviewed by Geoffrey Garen.

Changed the RegExpTest node to set the AbstractValue to boolean, since that
what it is.

* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::executeEffects):


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