view-source from html form submit not responding

RESOLVED FIXED in Future

Status

()

Core
Document Navigation
P3
normal
RESOLVED FIXED
18 years ago
18 years ago

People

(Reporter: Tom Everingham, Assigned: Adam Lock)

Tracking

({embed})

Trunk
Future
x86
Windows NT
embed
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

18 years ago
Overview Description:  The following line of html does not work with 5.0 - it 
sets up a button for calling view-source. 

<form><INPUT type=button value='Show page source' onclick= 'window.location = 
"view-source:" + window.location.href'>
         </form>

Steps to Reproduce:
1.)  Go to above site for test case

Actual Results:  nothing happens

Expected Results:  source should be displayed

Build Date & Platform Bug Found:
NT 2000060108
sounds like a dup.

*** This bug has been marked as a duplicate of 41090 ***
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → DUPLICATE
(Reporter)

Comment 2

18 years ago
There is a slight difference here in that clicking the button results in 
nothing, not even a blank page.   Talked over with R Ginda who suggests 
assigning to DOM and that this could be a problem with window.location.href not 
working in above example.  re-opening  
Status: RESOLVED → REOPENED
Component: XPApps → DOM Level 2
Resolution: DUPLICATE → ---
(Reporter)

Comment 3

18 years ago
re-assigning to jst
Assignee: law → jst
Status: REOPENED → NEW
The DOM is not responcible for this, mozilla doesn't AFAIK even know what
view-source: means yet, should be quite easy to implement in the
docshell/uriloader tho, just pass on the view-source command to the
document/parser...
Assignee: jst → adamlock
Component: DOM Level 2 → Embedding: Docshell
QA Contact: sairuh → adamlock

Comment 5

18 years ago
Docshell can be modified to check if the protocol of the URI it has been passed 
was of type view-source: and then set the content viewer appropriately. It does 
rely on the nsURI parser being able to cope with URLS in this form 
view-source:http://www.blah.com/foo#bar 

A problem for someone else. The chrome also needs updating so that if someone 
types view-source: into the address bar, that a new window is created to show 
the source code in, rather than replacing the existing content.
Status: NEW → ASSIGNED

Comment 6

18 years ago
CC'ing Rick & Jud

Comment 7

18 years ago
Created attachment 9833 [details] [diff] [review]
Patch that shows the quick and dirty way to fix the bug

Comment 8

18 years ago
Created attachment 10512 [details] [diff] [review]
Please review - Slightly revised hack to enable support for view-source: pseudo-protocol

Updated

18 years ago
Keywords: embed

Updated

18 years ago
Target Milestone: --- → Future
(Assignee)

Comment 9

18 years ago
Committed as part of yesterday's general API cleanup
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.