Skip to content
  • thatcher's avatar
    JavaScriptCore: · 6458fe59
    thatcher authored
            Reviewed by Darin.
    
            Bug 9574: Drosera should show inline scripts within the original HTML
            http://bugzilla.opendarwin.org/show_bug.cgi?id=9574
    
            Pass the starting line number and error message to the debugger.
    
            * kjs/debugger.cpp:
            (Debugger::sourceParsed):
            * kjs/debugger.h:
            * kjs/function.cpp:
            (KJS::GlobalFuncImp::callAsFunction):
            * kjs/function_object.cpp:
            (FunctionObjectImp::construct):
            * kjs/interpreter.cpp:
            (KJS::Interpreter::evaluate):
    
    WebCore:
    
            Reviewed by Darin.
    
            Bug 9574: Drosera should show inline scripts within the original HTML
            http://bugzilla.opendarwin.org/show_bug.cgi?id=9574
    
            * Pass the starting line number and error message to the debugger.
            * Call parsedSource even if there was a script parse error so the
              debugger can show the parse error.
            * Pass NSURL objects to the ObjC delegate for the script URLs.
    
            * bridge/mac/WebCoreScriptDebugger.h:
            * bridge/mac/WebCoreScriptDebugger.mm:
            (toNSURL):
            (WebCoreScriptDebuggerImp::sourceParsed):
    
    WebKit:
    
            Reviewed by Darin.
    
            Bug 9574: Drosera should show inline scripts within the original HTML
            http://bugzilla.opendarwin.org/show_bug.cgi?id=9574
    
            * Adds a new version of the didParseSource delegate callback with base line number.
            * Adds a new delegate callback for when a script fails to parse.
            * These new callbacks use NSURLs for the url parameter.
            * Adds a new script listener callback to notify when the main resource loads.
            * Adds a WebScriptErrorDomian and other keys for use with NSError.
    
            * DefaultDelegates/WebDefaultScriptDebugDelegate.m:
            (-[WebDefaultScriptDebugDelegate webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]):
            (-[WebDefaultScriptDebugDelegate webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:]):
            * DefaultDelegates/WebScriptDebugServer.h:
            * DefaultDelegates/WebScriptDebugServer.m:
            (-[WebScriptDebugServer webView:didLoadMainResourceForDataSource:]):
            (-[WebScriptDebugServer webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]):
            (-[WebScriptDebugServer webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:]):
            * DefaultDelegates/WebScriptDebugServerPrivate.h:
            * WebKit.exp:
            * WebView/WebDataSource.m:
            (-[WebDataSource _setPrimaryLoadComplete:]):
            * WebView/WebScriptDebugDelegate.h:
            * WebView/WebScriptDebugDelegate.m:
            (-[WebScriptCallFrame parsedSource:fromURL:sourceId:startLine:errorLine:errorMessage:]):
    
    WebKitTools:
    
            Reviewed by Darin.
    
            Bug 9574: Drosera should show inline scripts within the original HTML
            http://bugzilla.opendarwin.org/show_bug.cgi?id=9574
    
            Refactor the JavaScript code to have a distinction between files
            and scripts. Show the script in the context of the HTML file if
            it's URL is the same as the frame's main resource. At the time of
            the disParseScript callback the main resource might not be completely
            loaded, but Drosera needs to show whatever we have at the time. Once
            the main resource is finished, update the file source and reload the file.
    
            * Drosera/DebuggerDocument.m:
            (-[DebuggerDocument pause]):
            (-[DebuggerDocument webView:didLoadMainResourceForDataSource:]):
            (-[DebuggerDocument webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]):
            (-[DebuggerDocument webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:]):
            * Drosera/debugger.css:
            * Drosera/debugger.js:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    6458fe59