Bug 8808 - WebCore should handle text files
Summary: WebCore should handle text files
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 420+
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-09 11:03 PDT by Anders Carlsson
Modified: 2006-05-09 12:01 PDT (History)
0 users

See Also:


Attachments
Patch (49.50 KB, patch)
2006-05-09 11:29 PDT, Anders Carlsson
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2006-05-09 11:03:29 PDT
Currently, the code that handles showing text files is in WebKit and uses an NSTextView. This should be in WebCore instead
Comment 1 Anders Carlsson 2006-05-09 11:29:43 PDT
Created attachment 8186 [details]
Patch

I'm not sure about whether unsupportedTextMIMETypes should be moved to WebCore...
Comment 2 Darin Adler 2006-05-09 11:35:47 PDT
Comment on attachment 8186 [details]
Patch

+    PassRefPtr<TextDocument> createTextDocument(FrameView* v = 0);

No need for the "v" there.

Why create separate text nodes for each piece of data written? Maybe instead we should create just one large text node.

Why create a "pre" element? Couldn't we just put the text into the body and use CSS to style as we like?

+TextDocument::TextDocument(DOMImplementation *_implementation, FrameView *v)

Please put * next to the type name. Please don't use an underscore prefix in new code.

I do think the list of unsupported text MIME types should go into WebCore.

This looks ready to go to me. r=me
Comment 3 Eric Seidel (no email) 2006-05-09 11:43:00 PDT
We also should have some test cases of text handling.  These shoudl be possible with the httpd testing mechanisms.
Comment 4 Anders Carlsson 2006-05-09 12:01:16 PDT
I went ahead and committed this. I'm looking at adding test cases now.