Reviewed by Richard.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Aug 2004 01:19:30 +0000 (01:19 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Aug 2004 01:19:30 +0000 (01:19 +0000)
- a bit of code cleanup

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _stringWithData:]): Call textEncodingName instead of
copying it's code.
        (-[WebDataSource textEncodingName]): Tweak formatting.

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

WebKit/ChangeLog
WebKit/WebView.subproj/WebDataSource.m

index 39fa1990ac70a060fd113db3b6b18670799fd3e3..7bff3cea1e09d8304923279934a2b3f6691c1219 100644 (file)
@@ -1,3 +1,14 @@
+2004-08-23  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Richard.
+
+       - a bit of code cleanup
+
+        * WebView.subproj/WebDataSource.m:
+        (-[WebDataSource _stringWithData:]): Call textEncodingName instead of
+       copying it's code.
+        (-[WebDataSource textEncodingName]): Tweak formatting.
+
 2004-08-23  Chris Blumenberg  <cblu@apple.com>
 
        Fixed build.
index b27838c32d813e49dd481f3bb6513fcf21405802..f2e6c251d1c8863b0eca45db261b3417fb5d2dfd 100644 (file)
 
 - (NSString *)_stringWithData:(NSData *)data
 {
-    NSString *textEncodingName = [self _overrideEncoding];
-
-    if(!textEncodingName){
-        textEncodingName = [[self response] textEncodingName];
-    }
+    NSString *textEncodingName = [self textEncodingName];
 
-    if(textEncodingName){
+    if (textEncodingName) {
         return [WebBridge stringWithData:data textEncodingName:textEncodingName];
-    }else{
+    } else {
         return [WebBridge stringWithData:data textEncoding:kCFStringEncodingISOLatin1];
     }
 }
 {
     NSString *textEncodingName = [self _overrideEncoding];
 
-    if(!textEncodingName){
+    if (!textEncodingName) {
         textEncodingName = [[self response] textEncodingName];
     }
     return textEncodingName;