Reviewed by John.
* kjs/lexer.cpp:
(Lexer::setCode):
- fixed <rdar://problem/
3682398>: (error console line numbers are offset by 1)
* kjs/lexer.h:
(KJS::Lexer::lineNo):
- fixed <rdar://problem/
3682398>: (error console line numbers are offset by 1)
WebKit:
Reviewed by John.
* WebView.subproj/WebResource.m:
(-[WebResource description]):
-added per request of cblu
(-[WebResource _response]):
-added this method to the header
(-[WebResource _stringValue]):
- gives the string value of the NSData representation
* WebView.subproj/WebResourcePrivate.h:
WebBrowser:
Reviewed by John.
* BrowserDocumentController.h:
* BrowserDocumentController.m:
-added support to open an HTMLSourceDocument powered by a WebResource
(-[BrowserDocumentController openHTMLSourceDocumentWithResource:]):
* Debug/DebugUtilities.m:
(-[BrowserDocument showJavaScriptConsole:]):
* Debug/ErrorCell.m:
- doesn't display "Line:" if a line number is not present
- magic numbers are now #define'd
(-[ErrorCell drawInteriorWithFrame:inView:]):
* Debug/ErrorConsoleController.h:
* Debug/ErrorConsoleController.m:
(-[ErrorConsoleController init]):
(-[ErrorConsoleController awakeFromNib]):
- properly set the model's table view here, instead of init
(-[ErrorConsoleController clear:]):
- removes errors from the model
(-[ErrorConsoleController findResourceInWebFrame:forURL:]):
- fixes <rdar://problem/
3682337>: (safari error console does not open the correct source document when an error is double-clicked)
(-[ErrorConsoleController findResourceInDocument:forURL:]):
- fixes <rdar://problem/
3682337>: (safari error console does not open the correct source document when an error is double-clicked)
(-[ErrorConsoleController findResourceInURL:]):
- fixes <rdar://problem/
3682337>: (safari error console does not open the correct source document when an error is double-clicked)
(-[ErrorConsoleController showPageSourceWindow:]):
- fixes <rdar://problem/
3682337>: (safari error console does not open the correct source document when an error is double-clicked)
* Debug/ErrorConsoleModel.h:
* Debug/ErrorConsoleModel.m:
(-[ErrorConsoleModel setTable:]):
(-[ErrorConsoleModel selectedURL]):
(-[ErrorConsoleModel selectedLineNumber]):
* HTMLSourceController.h:
* HTMLSourceController.m:
(-[HTMLSourceController selectLineAtIndex:]):
(-[HTMLSourceController textView]):
(-[HTMLSourceController rangeForLine:]):
- fixes rdr://problem/
3682360 (error console should highlight/select offending code when viewing error source)
* HTMLSourceDocument.h:
* HTMLSourceDocument.m:
(-[HTMLSourceDocument initWithResource:]):
(-[HTMLSourceDocument makeWindowControllers]):
(-[HTMLSourceDocument displayName]):
- now WebResource aware
(-[HTMLSourceDocument resource]):
(-[HTMLSourceDocument setResource:]):
* WebBrowser.pbproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6810
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2004-06-10 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by John.
+
+ * kjs/lexer.cpp:
+ (Lexer::setCode):
+ - fixed <rdar://problem/3682398>: (error console line numbers are offset by 1)
+ * kjs/lexer.h:
+ (KJS::Lexer::lineNo):
+ - fixed <rdar://problem/3682398>: (error console line numbers are offset by 1)
+
=== JavaScriptCore-143.2 ===
2004-06-07 Darin Adler <darin@apple.com>
void Lexer::setCode(const UString &sourceURL, int startingLineNumber, const UChar *c, unsigned int len)
{
- yylineno = 1;
+ yylineno = 1 + startingLineNumber;
m_sourceURL = sourceURL;
restrKeyword = false;
delimited = false;
void setCode(const UString &sourceURL, int startingLineNumber, const UChar *c, unsigned int len);
int lex();
- int lineNo() const { return yylineno + 1; }
+ int lineNo() const { return yylineno; }
UString sourceURL() const { return m_sourceURL; }
bool prevTerminator() const { return terminator; }
+2004-06-10 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by John.
+
+ * WebView.subproj/WebResource.m:
+ (-[WebResource description]):
+ -added per request of cblu
+ (-[WebResource _response]):
+ -added this method to the header
+ (-[WebResource _stringValue]):
+ - gives the string value of the NSData representation
+ * WebView.subproj/WebResourcePrivate.h:
+
2004-06-10 Darin Adler <darin@apple.com>
Reviewed by Ken.
WebResource.m
Copyright (C) 2004 Apple Computer, Inc. All rights reserved.
*/
-
+#import <WebKit/WebBridge.h>
#import <WebKit/WebResourcePrivate.h>
#import <WebKit/WebNSURLExtras.h>
return _private->frameName;
}
+- (id)description
+{
+ return [NSString stringWithFormat:@"<%@ %@>", [self className], [self URL]];
+}
+
@end
@implementation WebResource (WebResourcePrivate)
textEncodingName:_private->textEncodingName] autorelease];
}
+- (NSString *)_stringValue
+{
+ NSString *textEncodingName = [self textEncodingName];
+
+ if(textEncodingName){
+ return [WebBridge stringWithData:_private->data textEncodingName:textEncodingName];
+ }else{
+ return [WebBridge stringWithData:_private->data textEncoding:kCFStringEncodingISOLatin1];
+ }
+}
+
@end
- (NSFileWrapper *)_fileWrapperRepresentation;
- (id)_propertyListRepresentation;
- (NSURLResponse *)_response;
+- (NSString *)_stringValue;
@end
\ No newline at end of file