RESOLVED FIXED 26156
In view-source mode, always render the contents using HTMLViewSourceDocument
https://bugs.webkit.org/show_bug.cgi?id=26156
Summary In view-source mode, always render the contents using HTMLViewSourceDocument
Takeshi Yoshino
Reported 2009-06-03 00:27:33 PDT
When in view-source mode, render the contents using HTMLViewSourceDocument regardless it's applicable for any plugin or not. Chromium tells WebCore to render the contents of specified URL when view-source: prefix is added to the URL. But currently, DOMImplementation ignores inViewSourceMode() when the MIME type is indicating that the contents are neither texts nor HTML family documents. For example, we can check the contents of asf file without launching media player. Rendering contents for view-source:-specified input is not what user expects. http://code.google.com/p/chromium/issues/detail?id=10545 I want to fix this issue by this patch. IMHO, regardless of this Chromium specific issue, I think we should force use of HTMLViewSourceDocument when inViewSourceMode() is specified.
Attachments
Proposed fix for 26156 (3.92 KB, patch)
2009-06-03 00:29 PDT, Takeshi Yoshino
eric: review-
Layout tests for the proposed patch for 26156 (777 bytes, patch)
2009-06-04 19:02 PDT, Takeshi Yoshino
no flags
Proposed fix for 26156 (rev 2) (9.03 KB, patch)
2009-06-18 17:59 PDT, Takeshi Yoshino
hyatt: review+
Proposed fix for 26156 (rev 3) (8.94 KB, patch)
2009-06-25 23:00 PDT, Takeshi Yoshino
timothy: review+
Takeshi Yoshino
Comment 1 2009-06-03 00:29:48 PDT
Created attachment 30895 [details] Proposed fix for 26156
Takeshi Yoshino
Comment 2 2009-06-03 02:40:34 PDT
This might break Web Inspector. Now investigating...
Takeshi Yoshino
Comment 3 2009-06-03 07:25:40 PDT
I didn't see any difference in the Web Inspector, but the trunk HEAD seems to have some problem with the Web Inspector. After fix, I'll request review again
Takeshi Yoshino
Comment 4 2009-06-04 19:02:29 PDT
Created attachment 30979 [details] Layout tests for the proposed patch for 26156
Takeshi Yoshino
Comment 5 2009-06-04 19:03:09 PDT
Comment on attachment 30895 [details] Proposed fix for 26156 Resuming review.
Eric Seidel (no email)
Comment 6 2009-06-08 17:53:07 PDT
I'm not sure who is the right person to review this. Probably Tim?
Timothy Hatcher
Comment 7 2009-06-08 19:58:14 PDT
Dave Hyatt should review this, he created the view source mode.
Eric Seidel (no email)
Comment 8 2009-06-18 17:36:55 PDT
Comment on attachment 30895 [details] Proposed fix for 26156 Please provide a single patch including both the layout tests and the code change. Also please incldue the -expected results for the test so the reviewer can verify that they look correct.
Takeshi Yoshino
Comment 9 2009-06-18 17:59:31 PDT
Created attachment 31524 [details] Proposed fix for 26156 (rev 2)
Takeshi Yoshino
Comment 10 2009-06-18 18:02:52 PDT
(In reply to comment #8) > (From update of attachment 30895 [details] [review]) > Please provide a single patch including both the layout tests and the code > change. Also please incldue the -expected results for the test so the reviewer > can verify that they look correct. > All right. Done. Thanks,
Dave Hyatt
Comment 11 2009-06-19 00:55:21 PDT
Comment on attachment 31524 [details] Proposed fix for 26156 (rev 2) r=me
Takeshi Yoshino
Comment 12 2009-06-24 10:31:22 PDT
(In reply to comment #11) > (From update of attachment 31524 [details] [review]) > r=me > Thank you for review. Could someone land this for me? I'm not a committer.
David Levin
Comment 13 2009-06-25 10:30:50 PDT
Assign to levin for landing.
David Levin
Comment 14 2009-06-25 12:14:31 PDT
Actually, I'm not landing this one right now... It looks like it will need baselines for other platforms, so it needs a little more time to handle than I can devote at the moment.
Eric Seidel (no email)
Comment 15 2009-06-25 17:22:48 PDT
patching file WebCore/ChangeLog Hunk #1 FAILED at 1. 1 out of 1 hunk FAILED -- saving rejects to file WebCore/ChangeLog.rej I think something is wrong with svn-apply. I would have expected it to handle the ChangeLog fine.
Takeshi Yoshino
Comment 16 2009-06-25 23:00:12 PDT
Created attachment 31910 [details] Proposed fix for 26156 (rev 3) Resolved conflicts. Additionally, replaced trailing CR.
Takeshi Yoshino
Comment 17 2009-06-25 23:02:38 PDT
Please take a look again. No code change from revision 2. Just resolved conflicts.
Eric Seidel (no email)
Comment 18 2009-06-26 02:37:01 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ... M LayoutTests/ChangeLog A LayoutTests/fast/frames/resources/viewsource-fake-image-file.png A LayoutTests/fast/frames/viewsource-on-image-file.html A LayoutTests/platform/mac/fast/frames/viewsource-on-image-file-expected.txt M WebCore/ChangeLog M WebCore/dom/DOMImplementation.cpp M WebCore/html/HTMLViewSourceDocument.cpp M WebCore/html/HTMLViewSourceDocument.h Committed r45255 http://trac.webkit.org/changeset/45255
Note You need to log in before you can comment on or make changes to this bug.