Should be able to d&d files into View Source window to load source

VERIFIED FIXED

Status

P3
enhancement
VERIFIED FIXED
18 years ago
14 years ago

People

(Reporter: bugzilla, Assigned: bugzilla)

Tracking

Trunk
x86
Windows 98

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

18 years ago
When right clicking on a link, there should be a "View Link Source" item.  When 
clicked, a new source window with the source of the linked page would open. 
This would go right along with currently implemented items like "Save Link As" 
and "Bookmark Link"
(Assignee)

Comment 1

18 years ago
-> me
Assignee: don → blakeross
(Assignee)

Comment 2

18 years ago
Created attachment 17735 [details] [diff] [review]
suggested implementation
(Assignee)

Comment 3

18 years ago
Law, please review...thanks!
Status: NEW → ASSIGNED
(Assignee)

Comment 4

18 years ago
Bill?

Comment 5

18 years ago
Damn Mozilla.  I responded to this yesterday but it never got through, apparently.

1. The code looks OK.
2. But, I'm not sure this is a good idea.  view-source only works on text/html
(and text/plain, probably).  I'm not sure what viewsource.xul/.js (and the
underlying docshell when in "view source" mode) will do when confronted with
arbitrary linked-to data.  At a minimum, you need to test this with links to
application/octet-stream, application/x-msword (or whatever it is), image/jpeg,
an ftp:// url to a ftp-directory-listing, a mailto: url, and make sure that
things don't blow up.

Even then, I'm skeptical.  I think it reasonable to limit "view source" to
working only on things you can actually view in Navigator.  The only way to know
that you can view it is to, well, view it.  Only then should a "view page
source" option become available, perhaps.
(Assignee)

Comment 6

18 years ago
Well...

Many people have expressed a desire to be able to view the source of pages 
without having to visit them first (one benefit of this could be 
security..what's this page that I'm going to gonna do?).  Some even suggested 
a "View Source Of..." command.  This is why the view-source protocol was 
implemented (well, maybe one reason anyways).  Right now the view-source 
protocol just attempts to download any file that it can't view the source of 
(e.g. a javascript file). This seems like an acceptable solution to me...
(Assignee)

Comment 7

18 years ago
having second thoughts myself...
No. Of the ~12 things which you are most likely to do with a link (that being the 
approximate upper limit for the number of items in a usable context menu), 
viewing the source is not one of them. So it shouldn't be in the context menu.

Instead, I suggest an invisible UI, one that does not clutter the context menu: 
dragging a link into a View Source window should display the source of the linked 
file.

Comment 9

18 years ago
Sounds good to me.  Hey, Blake, how about hooking up the navigatorDD.js code to
viewsource.xul/.js?
(Assignee)

Comment 10

18 years ago
Sure, sounds good to me...
Summary: [RFE] View Link Source context menu item → Should be able to d&d files into View Source window to load source
(Assignee)

Comment 11

18 years ago
OK, the fix for this is included in the revised part 1 patch for bug 48876.  
It's very cool, thanks Matt for the good idea.
(Assignee)

Comment 12

18 years ago
Fix checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
how cool! vrfy fixed on winnt/linux [2000.11.21.08] and mac [2000.11.21.13].

cc'ing terri since she deals with d'n'd for qa.
Status: RESOLVED → VERIFIED
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.