[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
cblu
cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:37:36 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit da9d66bf2c7282ab11db5a11f4732a397be3a969
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Apr 16 20:38:01 2003 +0000
- Progressively load plain text in our text view.
- Fixed: 3177603 - vCards appear in browser, not downloaded
Reviewed by darin.
* WebView.subproj/WebTextRepresentation.m:
(-[WebTextRepresentation setDataSource:]): added FIXME about document source of RTF not working
(-[WebTextRepresentation receivedData:withDataSource:]): feed data to the text view, progressively for plain text
* WebView.subproj/WebTextView.m:
(+[WebTextView unsupportedTextMIMETypes]): include text/directory, another vcard MIME type
(-[WebTextView setDataSource:]): do 1-time attribute settings
(-[WebTextView dataSourceUpdated:]): do nothing
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index e894ff9..d97e87e 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,18 @@
+2003-04-16 Chris Blumenberg <cblu at apple.com>
+
+ - Progressively load plain text in our text view.
+ - Fixed: 3177603 - vCards appear in browser, not downloaded
+
+ Reviewed by darin.
+
+ * WebView.subproj/WebTextRepresentation.m:
+ (-[WebTextRepresentation setDataSource:]): added FIXME about document source of RTF not working
+ (-[WebTextRepresentation receivedData:withDataSource:]): feed data to the text view, progressively for plain text
+ * WebView.subproj/WebTextView.m:
+ (+[WebTextView unsupportedTextMIMETypes]): include text/directory, another vcard MIME type
+ (-[WebTextView setDataSource:]): do 1-time attribute settings
+ (-[WebTextView dataSourceUpdated:]): do nothing
+
2003-04-16 Ken Kocienda <kocienda at apple.com>
Reviewed by David
diff --git a/WebKit/WebView.subproj/WebTextRepresentation.m b/WebKit/WebView.subproj/WebTextRepresentation.m
index bf60a22..f045bbc 100644
--- a/WebKit/WebView.subproj/WebTextRepresentation.m
+++ b/WebKit/WebView.subproj/WebTextRepresentation.m
@@ -6,7 +6,12 @@
#import "WebTextRepresentation.h"
#import <WebKit/WebDataSourcePrivate.h>
+#import <WebKit/WebFrame.h>
+#import <WebKit/WebFrameView.h>
+#import <WebKit/WebTextView.h>
+
#import <WebFoundation/NSURLResponse.h>
+#import <WebFoundation/WebAssertions.h>
@implementation WebTextRepresentation
@@ -18,6 +23,7 @@
- (void)setDataSource:(WebDataSource *)dataSource
{
+ // FIXME: This is broken. [dataSource data] is incomplete at this point.
hasRTFSource = [[[dataSource response] MIMEType] isEqualToString:@"text/rtf"];
if (hasRTFSource){
RTFSource = [[dataSource _stringWithData: [dataSource data]] retain];
@@ -26,7 +32,17 @@
- (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)dataSource
{
-
+ WebTextView *view = (WebTextView *)[[[dataSource webFrame] frameView] documentView];
+ ASSERT([view isKindOfClass:[WebTextView class]]);
+
+ if ([view isRichText]) {
+ // FIXME: We should try to progressively load RTF.
+ [view replaceCharactersInRange:NSMakeRange(0, [[view string] length])
+ withRTF:[dataSource data]];
+ } else {
+ [view replaceCharactersInRange:NSMakeRange([[view string] length], 0)
+ withString:[dataSource _stringWithData:data]];
+ }
}
- (void)receivedError:(WebError *)error withDataSource:(WebDataSource *)dataSource
diff --git a/WebKit/WebView.subproj/WebTextView.m b/WebKit/WebView.subproj/WebTextView.m
index 5c969c4..45a4d76 100644
--- a/WebKit/WebView.subproj/WebTextView.m
+++ b/WebKit/WebView.subproj/WebTextView.m
@@ -24,6 +24,7 @@
@"text/x-calendar",
@"text/vcard", // vCard
@"text/x-vcard",
+ @"text/directory",
@"text/qif", // Quicken
@"text/x-qif",
nil];
@@ -59,22 +60,16 @@
- (void)setDataSource:(WebDataSource *)dataSource
{
-}
-
-- (void)dataSourceUpdated:(WebDataSource *)dataSource
-{
- // FIXME: This needs to be more efficient for progressively loading documents.
-
if ([[[dataSource response] MIMEType] isEqualToString:@"text/rtf"]) {
[self setRichText:YES];
- [self replaceCharactersInRange:NSMakeRange(0, [[self string] length]) withRTF:[dataSource data]];
} else {
[self setRichText:NO];
[self setFixedWidthFont];
- [self setString:[dataSource _stringWithData:[dataSource data]]];
}
-
-
+}
+
+- (void)dataSourceUpdated:(WebDataSource *)dataSource
+{
}
- (void)viewDidMoveToSuperview
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list