2010-06-22 Tony Gentilcore <tonyg@chromium.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Jun 2010 23:56:22 +0000 (23:56 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Jun 2010 23:56:22 +0000 (23:56 +0000)
commit5c35a9de3e9cdcb230e015253ef8b5dc0bb98d0b
treeaff58e6cb92bee068eb9d58603281a50a425ee5a
parent983a9dde7e263f1a7044e69c14ddc27da2273d60
2010-06-22  Tony Gentilcore  <tonyg@chromium.org>

        Reviewed by Eric Seidel.

        Add layout tests which test line numbers for both inline and event handler
        scripts in HTML documents.
        https://bugs.webkit.org/show_bug.cgi?id=40649

        * fast/js/resources/script-line-number.js: Added.
        (getLineFromError):
        (assertErrorOnLine):
        * fast/js/script-line-number-expected.txt: Added.
        * fast/js/script-line-number.html: Added.
2010-06-22  Tony Gentilcore  <tonyg@chromium.org>

        Reviewed by Eric Seidel.

        Pull script line number from DocumentParser instead of pushing it to ScriptController
        https://bugs.webkit.org/show_bug.cgi?id=40649

        This approach is cleaner and improves WebCore/benchmarks/parser/html-parser.html by ~2%.

        Tests: fast/js/script-line-number.html

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::ScriptController):
        (WebCore::ScriptController::eventHandlerLineNumber):
        * bindings/js/ScriptController.h:
        * bindings/v8/ScriptController.cpp:
        (WebCore::ScriptController::eventHandlerLineNumber):
        (WebCore::ScriptController::eventHandlerColumnNumber):
        * bindings/v8/ScriptController.h:
        * bindings/v8/ScriptEventListener.cpp:
        (WebCore::createAttributeEventListener):
        * bindings/v8/V8Proxy.h:
        * dom/XMLDocumentParserLibxml2.cpp:
        (WebCore::XMLDocumentParser::startElementNs):
        * html/HTML5DocumentParser.cpp:
        (WebCore::HTML5DocumentParser::pumpLexer):
        * html/HTMLDocumentParser.cpp:
        (WebCore::HTMLDocumentParser::processToken):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@61640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/js/resources/script-line-number.js [new file with mode: 0644]
LayoutTests/fast/js/script-line-number-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/script-line-number.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/ScriptController.cpp
WebCore/bindings/js/ScriptController.h
WebCore/bindings/v8/ScriptController.cpp
WebCore/bindings/v8/ScriptController.h
WebCore/bindings/v8/ScriptEventListener.cpp
WebCore/bindings/v8/V8Proxy.h
WebCore/dom/XMLDocumentParserLibxml2.cpp
WebCore/html/HTML5DocumentParser.cpp
WebCore/html/HTML5ScriptRunner.h
WebCore/html/HTMLDocumentParser.cpp