Summary: | Web Inspector: Add OtherText resourceType and text/plain tokenizer | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Taiju Tsuiki <tzik> | ||||||
Component: | Web Inspector (Deprecated) | Assignee: | Taiju Tsuiki <tzik> | ||||||
Status: | RESOLVED INVALID | ||||||||
Severity: | Normal | CC: | apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 68203, 90529, 90592 | ||||||||
Attachments: |
|
Description
Taiju Tsuiki
2012-07-03 23:57:36 PDT
Created attachment 150721 [details]
Patch
Created attachment 150722 [details]
Patch
Comment on attachment 150722 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=150722&action=review > Source/WebCore/ChangeLog:3 > + Web Inspector: Add OtherText resource type and text/plain tokenizer I don't think we should add another resource type for this. Resource type are essentially duplicating CachedResource types and we don't want to extend this list. You should use Other instead. Backend could decide whether file has text content or not based on the mime type. Binary content should be served to frontend base64 encoded. (We already have some text detecting heuristics in NetworkResourcesData: http://code.google.com/p/chromium/source/search?q=file%3Ainspector+%22.mimetype+%3D+%22&origq=file%3Ainspector+%22.mimetype+%3D+%22&btnG=Search+Trunk ) Frontend can then show content as text if it is not base64 encoded. As per comment #3. Comment on attachment 150722 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=150722&action=review >> Source/WebCore/ChangeLog:3 >> + Web Inspector: Add OtherText resource type and text/plain tokenizer > > I don't think we should add another resource type for this. Resource type are essentially duplicating CachedResource types and we don't want to extend this list. > You should use Other instead. > Backend could decide whether file has text content or not based on the mime type. Binary content should be served to frontend base64 encoded. > (We already have some text detecting heuristics in NetworkResourcesData: http://code.google.com/p/chromium/source/search?q=file%3Ainspector+%22.mimetype+%3D+%22&origq=file%3Ainspector+%22.mimetype+%3D+%22&btnG=Search+Trunk ) > Frontend can then show content as text if it is not base64 encoded. I see. OK, I'll go other way than adding OtherText. As back-end side of NetworkResourcesData does, DOMImplementation::is{Text,XML}MIMEType seems to work for detecting text file. |