Open
Bug 84542
Opened 24 years ago
Updated 4 years ago
This Frame > View Page Source shows binary data if frame src is an image
Categories
(SeaMonkey :: UI Design, defect)
SeaMonkey
UI Design
Tracking
(Not tracked)
NEW
People
(Reporter: bugzilla, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Keywords: helpwanted, Whiteboard: [ToDo: port bug 384854])
Attachments
(3 files)
793 bytes,
patch
|
timeless
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
905 bytes,
patch
|
doronr
:
review+
bzbarsky
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
154 bytes,
text/html
|
Details |
not sure if this should be in xp apps, the parser or even imagelib. punt where
appropriate, thx!
spun off of bug 25497. reminiscent of bug 77337, except that one only seems to
deal with text files.
to repro:
1. go to a page with images, eg, http://bugzilla.mozilla.org/
2. over the ant image bring up the context menu and select View Image. the
browser should then load only that image.
3. from the main menu, select View > Page Source.
results: a blank source window appears...as well as the download/helper-app
dialog. the dialog reads,
You have chose to download a file of type: "JPEG Image" [image/jpeg]
from http://bugzilla.mozilla.org/
expected: shouldn't get the download dialog [not sure about the source window,
but i don't *think* it's should be there]. shouldn't this menu item be disabled
[greyed-out]?
Reporter | ||
Updated•24 years ago
|
Keywords: mozilla0.9.2
Should Moz act like NS 4.x to display all the binary crap of the image?
Comment 2•24 years ago
|
||
in IE the view source is greyed out. I think showing the binary info is useless.
If you want it, save the image to disk and play with it locally.
Comment 3•24 years ago
|
||
The way to fix this is for View | Page Source to get the MIME type of the
current content (however Page Info does it) and have a list of MIME types it can
view the source of. Either that, or have the View Source window do something
more intelligent when passed a MIME type it doesn't understand.
Gerv
viewing source of images is sometimes useful when you want to check the image
header eg, I can't use nc4's page info to determine that the
mozilla-banner is a GIF89a although it gives me lots of other pieces of
information.
I'd like view-source to just display the source for all mime types it doesn't
recognize.
![]() |
||
Comment 5•24 years ago
|
||
What we need to do then, is the following:
The view source handler should map the mime type to text/plain unless
the type is a known type we can usefully highlight view source of. That
way things would work pretty.
This would also fix bug 77237.
Is this a decent approach? ccing chak who implemented the protocol
handler.
Comment 6•24 years ago
|
||
Not critical for this release, moving to Future.
Keywords: nsbeta1-
Target Milestone: --- → Future
Reporter | ||
Updated•24 years ago
|
Keywords: helpwanted
Comment 9•23 years ago
|
||
My two cents is this: When a web server claims a non-text or non-html type (EG
image) view-source should still be an option because I have run across many
borken servers where I want to 'view source' because the file turns out to
actually be text. I guess this is a broader UI issue? (cross posting to bug 92901)
Reporter | ||
Comment 10•23 years ago
|
||
mass moving open bugs pertaining to view source to pmac@netscape.com as qa contact.
to find all bugspam pertaining to this, set your search string to
"ItsSharkeysNight".
QA Contact: sairuh → pmac
Comment 11•23 years ago
|
||
Comment 12•23 years ago
|
||
*** Bug 92901 has been marked as a duplicate of this bug. ***
Comment 13•23 years ago
|
||
as a temporary measure, we could just disable view source for images, which
does not work anyway. comments?
![]() |
||
Comment 15•23 years ago
|
||
will that disable it for image/svg+xml too? That would be poor, if so. For one
thing, we have no trouble viewing source of such images....
I agree with the overall approach, though. Viewing source of binary images is
not useful, imo. That's what a hex editor is for.
Comment 16•23 years ago
|
||
> I agree with the overall approach, though. Viewing source of binary images is
> not useful, imo. That's what a hex editor is for.
I've seen servers misconfigured so badly that they send some text or HTML
content with an image mime type. View source would be useful in that case.
What you suggested in comment 5 sounds like the best approach to me.
Maybe we should open a new bug about making view-source treat unknown types as
text/plain and make this bug and bug 77337 depend on it (or perhaps even dupe
them on it)?
Comment 17•23 years ago
|
||
bz, see nsBrowserStatusHandler.js lines 170ff:
this is the condition when view source (et al) are enabled:
return /^text\/|\+xml$/.test(contentType) ||
contentType == "application/x-javascript" ||
contentType == "application/xml" ||
contentType == "mozilla.application/cached-xul";
so anything ending in +xml should work fine.
jonasj, I did intent to make this only a temporary patch and leave the bug open
for the real patch (to make view source show the source).
Attachment #95293 -
Flags: review+
![]() |
||
Comment 18•23 years ago
|
||
Comment on attachment 95293 [details] [diff] [review]
disable view source for images
[Checkin: Comment 19]
sounds good. sr=bzbarsky
Attachment #95293 -
Flags: superreview+
Comment 19•23 years ago
|
||
Comment on attachment 95293 [details] [diff] [review]
disable view source for images
[Checkin: Comment 19]
checked in
Attachment #95293 -
Attachment is obsolete: true
Comment 20•23 years ago
|
||
With 2002081521 on Linux, I can't 'View -> Page Source' from the menu, but if I
right click the background, there's another 'View Page Source' option that still
works.
Comment 21•23 years ago
|
||
Comment 22•22 years ago
|
||
This bug is now resolved. Should anyone change its status to RESOLVED?
Comment 23•22 years ago
|
||
Marking FIXED. Reopen if this is wrong...
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
![]() |
||
Comment 24•22 years ago
|
||
It's only resolved if you think the source of images should be viewable...
I don't care much one way or the other, myself.
Comment 25•22 years ago
|
||
Mmmm.. I'm a bit confused....
I prefer not to view the source for images. Anyway, with Linux 2002100604,
the option from the menu bar can't be clicked, but the popup that appears by
rightclicking the background has an option that works (it shows the image file
as plain text).
Should we correct this and make that both behave equally?
PS: Ctrl+U also doesn't work
![]() |
||
Comment 26•22 years ago
|
||
Yes, I think both should behave equally.
Ctrl-u just triggers the main menu item, which is disabled. So it can't work. ;)
Comment 27•22 years ago
|
||
my last attachment here, created aug. 16, should do it... I'll leave it as an
exercise to the reader to chase review and super-review for it.
![]() |
||
Comment 28•22 years ago
|
||
Comment on attachment 95549 [details] [diff] [review]
oops, indeed. additional patch
[Checkin: Comment 39]
sr=bzbarsky if you also do frame source like that... ;)
Attachment #95549 -
Flags: superreview+
Comment 29•22 years ago
|
||
Well, and then, as the bug is now RESOLVED/FIXED, it will be verified by a QA
member, marked as VERIFIED/FIXED, and the patch will be checked in into the
trunk so that nightly builds would be corrected, isn't it?
I think I'm starting to learn the life of a bug... :)
Comment 31•22 years ago
|
||
Comment on attachment 95549 [details] [diff] [review]
oops, indeed. additional patch
[Checkin: Comment 39]
r=doron
Anyone else think that "BrowserViewSource" in a function name is stupid? I
want a view source manager!
Attachment #95549 -
Flags: review+
Comment 32•22 years ago
|
||
bz: for frame source, this will be considerably more difficult because the
isImage observer only affects the toplevel document...
![]() |
||
Comment 33•22 years ago
|
||
Yes, I realize that... ;)
Comment 34•22 years ago
|
||
very well then :)
can I check this in anyway?
if not, someone else will have to do the work... I no longer work on mozilla
frontend, as you know.
![]() |
||
Comment 35•22 years ago
|
||
Yeah, check that in anyway (sr=bzbarsky) and leave the bug open to handle the
context menu.
Comment 36•22 years ago
|
||
taking bug so I remember to check this in (tree closed atm)
also changing component to xp apps: gui features which is where the code lives.
Assignee: law → cbiesinger
Status: REOPENED → NEW
Component: File Handling → XP Apps: GUI Features
Comment 37•22 years ago
|
||
r=jag
Comment 38•22 years ago
|
||
Comment on attachment 95549 [details] [diff] [review]
oops, indeed. additional patch
[Checkin: Comment 39]
a=asa for checkin to 1.2beta (on behalf of drivers)
Attachment #95549 -
Flags: approval+
Comment 39•22 years ago
|
||
Comment on attachment 95549 [details] [diff] [review]
oops, indeed. additional patch
[Checkin: Comment 39]
checked in
leaving open for frame source.
Attachment #95549 -
Attachment is obsolete: true
Comment 41•22 years ago
|
||
Nav triage team: Need info. Cannot reproduce using ``View Frame Source'' from
the context menu when over an image. Please include steps to reproduce.
Whiteboard: [need info]
Comment 42•22 years ago
|
||
1. Open the attachment. A frame should open at the bottom, with an image on it.
2. Right click the background of the lower frame, select "This frame" -> "View
frame source"
![]() |
||
Comment 43•22 years ago
|
||
Just to be clear. The expected behavior is that the option is completely
disabled. Instead, it's enabled and shows some garbage binary data.
Comment 44•22 years ago
|
||
Nav triage team: nsbeta1-
Updated•20 years ago
|
Product: Core → Mozilla Application Suite
Comment 45•20 years ago
|
||
The testcase from comment 42 still works. Adjusting summary.
Assignee: firefox → guifeatures
Severity: normal → minor
QA Contact: pawyskoczka
Summary: View > Page Source for images brings up download dialog → This Frame > View Page Source shows binary data if frame src is an image
Comment 46•17 years ago
|
||
Filter "spam" on "guifeatures-nobody-20080610".
Assignee: guifeatures → nobody
QA Contact: guifeatures
Updated•17 years ago
|
Assignee: nobody → jag
QA Contact: guifeatures
Target Milestone: Future → ---
![]() |
||
Comment 47•16 years ago
|
||
Bug 384854 fixed the remaining issues here.
![]() |
||
Comment 48•16 years ago
|
||
Er, maybe not. That bug is Firefox, and this one is seamonkey.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•16 years ago
|
Attachment #95293 -
Attachment description: disable view source for images → disable view source for images
[Checkin: Comment 19]
Attachment #95293 -
Attachment is obsolete: false
Updated•16 years ago
|
Attachment #95549 -
Attachment description: oops, indeed. additional patch → oops, indeed. additional patch
[Checkin: Comment 39]
Attachment #95549 -
Attachment is obsolete: false
Comment 49•16 years ago
|
||
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090622 Minefield/3.6a1pre] (mozilla-central-win32-unittest/1245678366) (W2Ksp4)
No menu items.
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1pre) Gecko/20090619 SeaMonkey/2.0b1pre] (comm-1.9.1-win32-unittest/1245417812) (W2Ksp4)
Menu item, showing the source as the image, no its binary data.
Assignee: jag → nobody
Blocks: FF2SM
Status: REOPENED → NEW
QA Contact: ui-design
Whiteboard: [ToDo: port bug 384854]
Comment 50•4 years ago
|
||
Still reproducible for me with Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 SeaMonkey/2.53.5.1. Per Comment 49, This Frame -> View Page Source shows the image itself, when the expected behaviour is that the View Page Source menu item should be disabled.
You need to log in
before you can comment on or make changes to this bug.
Description
•