Closed
Bug 155334
Opened 23 years ago
Closed 23 years ago
Unable to save page as plain text format
Categories
(Camino Graveyard :: General, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: chrispetersen, Assigned: sfraser_bugs)
Details
(Keywords: regression)
Build: 2002-07-01-05
Platform: OS X 10.1.5
Expected Results: A new text file containing the page's content should be
created on my local drive
What I got: Save File dialog opens and progress indicator will endlessly cycle.
Basically, no file is actually created on drive.
Steps to reproduce:
1) Go to any site
2) Choose Save As from File menu
3) Specify name of file and locate to save it.Click Save.
4) Saving File dialog opens and progress indicator to cycle. Status area in
dialog remains: 0.0 bytes of ??? total (at 0.0 bytes/sec)
5) No text file is ever saved to drive.
Comment 1•23 years ago
|
||
07-02 build.
The key here is saving the file as plain text format. The other two options,
HTML complete and HTML source only, work.
Reporter | ||
Comment 3•23 years ago
|
||
Though this bug still remains in the latest build, I can no longer cancel or
close the Save as dialog when attempting to save as plain text. I was able
complete this task on the July 2nd build but can't now on the 3rd build. Wonder
if this is somewhat related to the check in for
http://bugzilla.mozilla.org/show_bug.cgi?id=154913.
Assignee | ||
Comment 5•23 years ago
|
||
For me the page does get saved, but the progress dialog problems remain.
Assignee | ||
Comment 6•23 years ago
|
||
Regression from the fix for bug 154277, I think.
Assignee | ||
Comment 7•23 years ago
|
||
So when saving in plain text format, the onStateChange just gets two notifications:
STATE_START
STATE_STOP
When saving a single HTML page, we get:
STATE_IS_NETWORK + STATE_IS_REQUEST + STATE_START
STATE_IS_NETWORK + STATE_IS_REQUEST + STATE_STOP
When saving HTML complete, we get:
STATE_IS_NETWORK + STATE_IS_REQUEST + STATE_START
STATE_IS_REQUEST + STATE_STOP
STATE_IS_REQUEST + STATE_START
STATE_IS_NETWORK + STATE_IS_REQUEST + STATE_STOP
(assuming 1 image).
So how are we supposed to know when the download is really finished?
Assignee | ||
Comment 8•23 years ago
|
||
For now I'm fixing it so that we look for the STATE_NETWORK bit on the first
notification, then match that up with the last one, so:
nsDownloadListener::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest
*aRequest, PRUint32 aStateFlags,
PRUint32 aStatus)
{
+ if (!mGotFirstStateChange)
+ {
+ mNetworkTransfer = ((aStateFlags & STATE_IS_NETWORK) != 0);
+ mGotFirstStateChange = PR_TRUE;
+ }
+
// when the entire download finishes, stop the progress timer and clean up
// the window and controller. We will get this even in the event of a cancel,
// so this is the only place in the listener where we should kill the download.
- if ((aStateFlags & STATE_STOP) && (aStateFlags & STATE_IS_NETWORK)) {
+ if ((aStateFlags & STATE_STOP) && (!mNetworkTransfer || (aStateFlags &
STATE_IS_NETWORK))) {
[mController killDownloadTimer];
[mController setDownloadProgress:nil];
}
Taking bug.
Assignee: sdagley → sfraser
Assignee | ||
Comment 9•23 years ago
|
||
Checked in the above patch (and detabbed the file).
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 10•23 years ago
|
||
Thanks, Simon.. Verified on the 2002-07-22-05 NB.
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 11•23 years ago
|
||
Regressed in the 7/24 NB (2002-07-24-05)
Comment 12•23 years ago
|
||
chris, could you be seeing bug 159170? for me the progress meter just keeps
animating when the d/l window remains open. the file, however, is still saved.
Assignee | ||
Comment 13•23 years ago
|
||
This is actually a slightly different issue, which is covered by bug 159170, so
re-resolving this one.
Status: REOPENED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 14•23 years ago
|
||
Yes, the document is getting saved but progress indicator continues to animate.
This bug is actually fixed. Marking verified.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•