Fixes a bug where error bubbles in JavaScript resources would
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Aug 2008 16:53:30 +0000 (16:53 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Aug 2008 16:53:30 +0000 (16:53 +0000)
commit22b71e62d8ff5e1172e08dfd559687e9ed7cf7fb
treec1c4dd1d4b82b51c53ffca90eb875cc54892e57b
parentfac6da5dbbf4c7767b8f0b877c38f83c256c0e50
    Fixes a bug where error bubbles in JavaScript resources would
        be clobbered by the syntax highlighter.

        https://bugs.webkit.org/show_bug.cgi?id=20345

        Reviewed by Adam Roben.

        * manual-tests/inspector/resources/script-error.js: Added.
        * manual-tests/inspector/styled-error-bubbles-in-scripts.html: Added.
        * page/inspector/SourceFrame.js:
        (WebInspector.SourceFrame.prototype._addMessageToSource):
        Check the nodeType and not the nodeName, this is less fragile.
        (WebInspector.SourceFrame.prototype._syntaxHighlightJavascriptLine):
        Check if the lastChild is an error bubble, if so remove it before
        getting the line's textContent. Add the error bubble back at the end.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/manual-tests/inspector/resources/script-error.js [new file with mode: 0644]
WebCore/manual-tests/inspector/styled-error-bubbles-in-scripts.html [new file with mode: 0644]
WebCore/page/inspector/SourceFrame.js