Open Bug 78619 Opened 23 years ago Updated 15 years ago

View-source: pages have a view source option if opened by hyperlink


(SeaMonkey :: UI Design, defect)

Not set


(Not tracked)


(Reporter: SkewerMZ, Assigned: jag+mozilla)




(Keywords: testcase)


(1 file)

Procedure: Load this page:


Expected: The source code for the website is displayed in the same manner as if
the view source option had been selected.

Actual: The context menu includes an option to view source on a view-source:
URL. Of course, this does not work.
OK.  The "problem" here is that the view-source: URL is loaded in the normal
navigator window with all its menus and context menus and whatnot, right?

The options I see are:
1)  Kick off the viewsource window for view-source: urls in navigator (using JS)
2)  Disable the C-u shortcut, View Source context menu option, and View Source
    menuitem when the url is a view-source: one

Neither of these is parser.  Over to XP Apps.

#1 is probably simpler to do, but #2 is the one that seems like the more correct
Assignee: harishd → pchen
Component: Parser → XP Apps
Ever confirmed: true
OS: Windows 98 → All
QA Contact: bsharma → sairuh
Hardware: PC → All
Interesting, this is a teaser for bug 74862 :o)
I thought that bug was the same as this one, but when I looked at it, it's
completely different.
I'm for opening view-source: URLs in a new window, which would be the same
behavior NS4 and IE users expect. Anyone care to accept this bug?
mpt, this is the bug I was sort of referring to earlier.  Which would be the
more correct UI here?
If you are directing us to information from another bug, you might want to
provide the bug number...

I think the first behavior you described is the more correct choice, since
that's the way Communicator and IE (well, sort of) does it. The only kind of
browser that should display the view-source: in the same window is a
single-document interface browser, which Mozilla isn't.

Main reason for this behavior? People want to flip between source code and the
HTML page to see what tag creates what effect.

Also, as bug 39389 suggests, we should have a separate context menu for the
source code window. I'll just mention that so we don't start talking about it
here, since that is important enough to have its own bug.
I am not directing anyone anywhere.  I am asking mpt's opinion on the UI we
should have here, seeing as he _is_ the UI design feedback component owner...

I can think of plenty of reasons the NS 4.x behavior is wrong.  eg:  I type
"view-source:" in the URL bar and hit enter.  A view-source
window pops up and nothing changes in the original window.  This is a little
weird, to me.  I am personally inclined toward option #1 myself, but I would
still like mpt to check it out before we start coding.
OK.  I talked to mpt and he says that we should go ahead and do #1.  Patch
coming up.  Reviews?
Assignee: pchen → bzbarsky
Keywords: patch, review
Priority: -- → P1
Target Milestone: --- → mozilla0.9.1
r=timeless, please file or find a bug to reenable this feature when we actually support view-source:view-source:url
Keywords: reviewapproval
Alec, would you sr?
good code factoring
Fix checked in by timeless.  Thanks for your time all.  Move along, nothing else
to see here.
Closed: 23 years ago
Keywords: approval
Resolution: --- → FIXED
I really like the way the patch works with view-source: type-in URLs, but I
still experience this bug when clicking on a link to a view-source: URL.
Reopening and narrowing scope of title.

Title was: View-source: pages have a view source option
Resolution: FIXED → ---
Summary: View-source: pages have a view source option → View-source: pages have a view source option if opened by hyperlink
OK.  I don't have the time to do this at the moment.  It's likely to require
some very odd protocol handler hacking....

I will also be gone for about a month starting next week.  So, reassigning to
component owner for further triage.
Assignee: bzbarsky → pchen
Keywords: patchmozilla1.0
Priority: P1 → --
Target Milestone: mozilla0.9.1 → ---
Something that was forgotten in attachment 33451 [details] [diff] [review] was to reset the 
urlbar -- otherwise it still shows the typed-in "view-source:..." which 
isn't really what is being displayed in the main window.
Updated URL. This will create a link to a view-source: page.

data:text/html,<A HREF="view-source:">Yahoo source</A>
Message upon trying to view source of linked view-source:

Downloading null

You have chosen to download a file of type: text-html; x-view-type=view-source;
x-view-type=view-source from

Still not assigned? ¡Que lastima!
I don't know if this requires another bug to be filed, but when I click on the
Yahoo source link from the page created by the URL field, the window title shows
"" not "Source of http://www.y..." as a regular view-source
window shows. Perhaps this could be addressed while waiting for the patch to
open hyperlinked view-source in a new window?
-> doron, Mr View Source (but reassign if needed :)
Assignee: pchen → doronr
mass moving open bugs pertaining to view source to as qa contact.

to find all bugspam pertaining to this, set your search string to
QA Contact: sairuh → pmac
*** Bug 122778 has been marked as a duplicate of this bug. ***
Product: Core → Mozilla Application Suite
Just as a note, while this isn't an extremely important bug, it's still present
in Mozilla Application Suite 1.7.8.
works for me

(firefox 2.0 nightly build 2006061003)
Testing with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4) Gecko/2008030714 Firefox/3.0b4

...Still happens.
Yup, still happens in Firefox 3.0 final., though clicking on the "View Page Source" menu item opens up an unhighlighted copy of the same source. I don't know if that was present in the issue as originally reported.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0
Assignee: doronr → jag
QA Contact: pmac
You need to log in before you can comment on or make changes to this bug.