Closed
Bug 42001
Opened 25 years ago
Closed 25 years ago
[FEATURE]Clear History button in preferences doesn't work
Categories
(Core :: DOM: Navigation, defect, P2)
Core
DOM: Navigation
Tracking
()
VERIFIED
FIXED
mozilla1.0
People
(Reporter: phil, Assigned: waterson)
References
Details
(Keywords: helpwanted, Whiteboard: [nsbeta3-] [PDTP2] [rtm++] FIXED ON TRUNK r=bienvenu, sr=be)
Attachments
(2 files)
6.67 KB,
patch
|
Details | Diff | Splinter Review | |
1.04 KB,
patch
|
Details | Diff | Splinter Review |
Using 2000-06-08-08 on NT
1. Open Preferences dialog
2. Click Navigator item if necessary
3. Click on Clear History button and OK the dialog
4. Tasks | Tools | History
5. History window comes up, contents not cleared
I looked for a dup of this and amazingly couldn't find one.
Comment 1•25 years ago
|
||
Ben, Did you mention yesterday that you got a patch from someone for this?
Status: NEW → ASSIGNED
Summary: Clear History button in preferences doesn't work → [FEATURE]Clear History button in preferences doesn't work
Target Milestone: --- → M17
Comment 4•25 years ago
|
||
submitting for nsbeta3, we minused a related bug b/c this was supposed to be in and working. If it's not then it needs to. People
need to be able to clear their history.
Keywords: nsbeta3
nav triage team: congratulations, Steve, you are the owner of another bug. Enjoy.
Assignee: ben → slamm
Whiteboard: [nsbeta3+]
Updated•25 years ago
|
Priority: P3 → P2
Updated•25 years ago
|
Keywords: helpwanted
Whiteboard: [nsbeta3+] → [nsbeta3+] Haven't looked at this. Lower priority than my other bugs.
Comment 7•25 years ago
|
||
I talked to waterson about this. The global history datasource does not have a
"clear" method. First, we need to figure out how to clear the history items from
the mork database. Second, we need to have that reflected in the history
datasource. Finally, we need to make sure the history observers get notified of
the change (i.e. if the history window is open, you will see all the items
disappear).
Waterson also mentioned that the mork method, CompressCommit(), should be called
after deleting the history items.
Whiteboard: [nsbeta3+] Haven't looked at this. Lower priority than my other bugs. → [nsbeta3+] More than a simple UI hook-up. Need to implement nsIGlobalHistory::clear().
Comment 8•25 years ago
|
||
Slamm, can I take this off your hands?
Comment 9•25 years ago
|
||
Sure, that would be great. I have not had a chance to work on this any more.
Comment 10•25 years ago
|
||
Accepting bug. (unless anyone else has been working on it in the meantime).
Status: NEW → ASSIGNED
Reporter | ||
Comment 11•25 years ago
|
||
PDT agrees P2 since no workaround. You can't even delete from the History window
Whiteboard: [nsbeta3+] More than a simple UI hook-up. Need to implement nsIGlobalHistory::clear(). → [nsbeta3+] [PDTP2] More than a simple UI hook-up. Need to implement nsIGlobalHistory::clear().
Comment 12•25 years ago
|
||
jce2@po.cwru.edu, did you mean to reassign this bug to yourself (rather than
just accepting it for slamm)?
Comment 13•25 years ago
|
||
YES, I meant to reassign this bug to myself. Read the exchange above. :P
Assignee: slamm → jce2
Status: ASSIGNED → NEW
Comment 14•25 years ago
|
||
Are you actually doing work on this nsbeta3+ bug? If not, reassign it to
someone who is.
Comment 15•25 years ago
|
||
I'm doing work on this, but will happily hand the bug over to anyone who
understands the mork database api (which is what the clear history routine will
need to use). I took the bug from Steve because he couldn't do anything with it.
Comment 16•25 years ago
|
||
It would probably be easier to just delete the mork database file (after closing
it, of course) and create a new one. Chris, is there any information that is
stored here that we don't want cleared out?
I imagine the sequence of events would be:
1. Clear the datasource, which would get rid of any objects holding onto mork rows.
2. Close the history db
3. delete history.dat, or whatever it's called
4. Create a new, empty history db using the code that creates the initial
history db, and open it.
Comment 17•25 years ago
|
||
adding self to cc list.
Comment 18•25 years ago
|
||
Why does this bug keep getting set back to "new"? I keep accepting it. I'll
GLADLY hand it over to someone who understands mork so I don't have to
desperately take a look at mork in my spare free time in order to figure out how
this patch should work. But in the meantime, no one else is willing to do work
on this, so I am doing work on it. PLEASE stop resetting the bug to "new".
Status: NEW → ASSIGNED
Comment 19•25 years ago
|
||
Judging from the bug activity, it's been you that's been setting it back to
"New". Don't know why that would be. Maybe a browser bug.
Anyway, I don't believe you need to know anything about mork to fix this, as I
previously explained.
Comment 20•25 years ago
|
||
Would deleting the file really be anything more then an ugly hack? Would all of
the state be cleared properly?
Comment 21•25 years ago
|
||
It's not an ugly hack - it's a clever optimization! It's going to be faster than
deleting every mork row one by one. It's trivial to write code to delete every
row by hand and I can tell you how to do it if you want, but it would be faster
to close the file, delete it, and start over.
Here are the mork api's you would use to delete all the rows:
get the history table (of type nsIMdbTable)
Get a row cursor with GetTableRowCursor()
use NextRow to get each row.
Probably should call CutAllColumns on the row.
Then, use nsIMdbTable::CutRow to cut that row from the table.
Reporter | ||
Comment 22•25 years ago
|
||
I guess the question is what does the history window look like (and how does
autocomplete behave, etc.) after deleting the file? Do we have any stale history
state hanging around? Seems easy enough to try it out, but if it's enough to
delete the file, that seems pretty attractive.
Comment 23•25 years ago
|
||
Please don't misunderstand me - there's more involved than just deleting the
history database and creating a blank one. I'm sorry if I gave that impression.
I was just suggesting a way to deal with the mork part of this problem.
Obviously, the rdf state has to be cleaned up, the tree widget needs to be
notified that all the rows are gone, etc.
Another way of handling this would just be to "pretend" the user did a select
all followed by a delete - this would cause everything to get cleaned up - and
presumably, deleting a single history entry deletes the corresponding mork row,
so you wouldn't have to know any mork api calls - just the call that the history
front end already makes when deleting a single entry.
Reporter | ||
Comment 24•25 years ago
|
||
Not holding PR3 for this. Marking nsbeta3- and adding rtm nomination since I
think we'll either have to make this work or take out the UI.
Keywords: rtm
Whiteboard: [nsbeta3+] [PDTP2] More than a simple UI hook-up. Need to implement nsIGlobalHistory::clear(). → [nsbeta3-] [PDTP2] More than a simple UI hook-up. Need to implement nsIGlobalHistory::clear().
Comment 25•25 years ago
|
||
And we'll need to impliment this feature, because otherwise people won't really
want to use Netscape (and they won't be honest about why either).
I'm SO sorry about the delay on getting this done. I'm moving flats right now. :-(
Comment 26•25 years ago
|
||
*** Bug 55294 has been marked as a duplicate of this bug. ***
Comment 27•25 years ago
|
||
using a hack that would simulate a select all and delete won't work - because
doing that doesn't work either. no manipulation to remove any part of the
history within the browser works.
Assignee | ||
Comment 28•25 years ago
|
||
Assignee | ||
Comment 29•25 years ago
|
||
bienvenu, could I get you to look over the changes to nsGlobalHistory.cpp in the
above patch to implement removal from history? I iterate through the rows in the
history back to front, using the PosToRow() API; for each row that's removed, I
cut the row, and then notify via RDF APIs.
ben, could you review the changes to prefutilities.js?
Comment 30•25 years ago
|
||
reassigning to waterson...
Comment 31•25 years ago
|
||
r=ben for the changes to js.
but: shouldn't the method name have a lower case first letter? :P
(removeAllPages)
Comment 32•25 years ago
|
||
Ben: waterson is doing "When in Rome" and minimizing changes. I'd rather he or
someone else change the .idl file to use Mozilla XPIDL style on the trunk, and
later, than to mix styles here in this patch, which hopes to get [rtm++]'d.
I can give an r=, but nominate shaver to give the a= (he knows RDF, if not MDB).
/be
Comment 33•25 years ago
|
||
I'm no RDF wizard, and that MDB stuff makes me cold in my heart, but it looks
pretty good.
I don't like the explicit comparisons to 0 in the conditionals
if (err != 0)
and they're not consistent with the pointer checks below, but other than that I
can find no real nits to pick. sr=shaver
Comment 34•25 years ago
|
||
So we are going to try for rtm for this patch? It's going to be a tough
argument. Brendan, can you officially r= (now that we have sr=shaver), and
then + it once you do (if there's no concerns)?
Keywords: rtm
Whiteboard: [nsbeta3-] [PDTP2] More than a simple UI hook-up. Need to implement nsIGlobalHistory::clear(). → [nsbeta3-] [PDTP2] [rtm need info]
Reporter | ||
Comment 35•25 years ago
|
||
I'd like bienvenu to review the MDB usage. He's on vacation today, but should be
available tomorrow.
Reporter | ||
Comment 36•25 years ago
|
||
Never mind -- bienvenu is out until Monday. He can review ex post facto if PDT
agrees to take this.
Comment 37•25 years ago
|
||
I meant to give my r= -- sorry for any ambiguity.
/be
Comment 38•25 years ago
|
||
OK, r=brendan sr=shaver. +'ing, Phil says David B. won't be back until Monday
so we should try for ++ without waiting for his review.
Whiteboard: [nsbeta3-] [PDTP2] [rtm need info] → [nsbeta3-] [PDTP2] [rtm+]
Assignee | ||
Comment 39•25 years ago
|
||
I am not going to check this in on the branch until bienvenu has looked at it.
Status: NEW → ASSIGNED
Whiteboard: [nsbeta3-] [PDTP2] [rtm+] → [nsbeta3-] [PDTP2] [rtm need info]
Assignee | ||
Comment 40•25 years ago
|
||
patch checked in on trunk
Whiteboard: [nsbeta3-] [PDTP2] [rtm need info] → [nsbeta3-] [PDTP2] [rtm need info] FIXED ON TRUNK
Comment 41•25 years ago
|
||
the "clear history" button works in build 2000102004 (win98), but the delete
function in the edit menu still doesn't work. does this need a new bug report?
Assignee | ||
Comment 42•25 years ago
|
||
ratman: I think that's covered by bug 37078
Comment 43•25 years ago
|
||
I don't know about the batch stuff - I suspect it does nothing. I'll check.
After you cut the row, you should call row->CutAllColumns(morkEnv) - this may
fix the leaks you mentioned.
Comment 44•25 years ago
|
||
your useage of postorow looks fine - pos is just a 0-based index, so you are
using it correctly. The batch hint stuff does nothing corrently, but if mork
supports sorting, then the hint stuff will be useful to tell it not to keep the
sort tables up to date while the batch stuff is going on. r=bienvenu
Assignee | ||
Comment 45•25 years ago
|
||
bienvenu: Do I need to add a "CutAllColumns()" call? Or is the code ok as is...
Comment 46•25 years ago
|
||
I would strongly recommend adding the CutAllColumns call - if you don't, I think
the row won't really fully go away. If you don't, at best you'll have memory
leaks, and at worst, the rows will still be around. It's some mork bug that I've
long since forgotten the details of, except that it might involve the fact that
the same row can appear in multiple tables, and I don't think mork does the
right thing when a row is removed from the last table, or something like that,
unless you CutAllColumns.
Assignee | ||
Comment 47•25 years ago
|
||
Assignee | ||
Comment 48•25 years ago
|
||
Add "CutAllColumns()" call per bienvenu's suggestion; change "LargeCommit()" to
"CompressCommit()" to force file to be nuked.
Comment 49•25 years ago
|
||
Wow, who knew those mork methods had such necessary effects! Their names do not
connote what they do (but you noticed that already, I'm sure).
/be
Comment 50•25 years ago
|
||
looks good, r=bienvenu
Comment 51•25 years ago
|
||
It's just a bug; adding this call works around the bug - the method names *do*
do what they say they do (I assume you're commenting about the fact that you
need to CutAllColumns after removing the row). I think I explained before that
it was a bug, so maybe you're talking about something else.
Comment 52•25 years ago
|
||
Sorry, I missed your explanation citing a mork bug. But I also was commenting
(hence my use of plural) on CompressCommit -- Compress to my reading does not
connote "force file to be nuked", but maybe now I'm misunderstanding waterson's
words.
Who should give sr=?
/be
Comment 53•25 years ago
|
||
I suspect you just misunderstood Chris's comment - compress commit on an empty
database will essentially nuke the file. Compress commit in mork gets rid of all
the incremental updates (hence the name Compress). For example, when you delete
a row from a mork database, it doesn't rewrite the whole file; it just adds a
record at the end that says "remove row foo", and row foo remains in the db on
disk. This makes incremental updates of large db's faster. Compress commit
writes out the db from scratch.
I'm not sure who should do the sr - no one on the reviewers list has more
experience with mork than Chris - in fact, no one else on the reviewers list
probably has any experience with mork, the lucky bastards!
Comment 54•25 years ago
|
||
I'm delegating mork review to bienvenu and waterson, which makes it seem like
this patch is under-reviewed, but I looked at the rest of it and gave an r=. So
consider this my sr=.
/be
Comment 55•25 years ago
|
||
We have a r=, and a sr=, this needs to go to rtm+ immediately.
Whiteboard: [nsbeta3-] [PDTP2] [rtm need info] FIXED ON TRUNK → [nsbeta3-] [PDTP2] [rtm need info] FIXED ON TRUNK r=bienvenu, sr=be
Assignee | ||
Comment 56•25 years ago
|
||
nominating rtm+
Whiteboard: [nsbeta3-] [PDTP2] [rtm need info] FIXED ON TRUNK r=bienvenu, sr=be → [nsbeta3-] [PDTP2] [rtm+] FIXED ON TRUNK r=bienvenu, sr=be
Comment 57•25 years ago
|
||
rtm double plus
As I understand this, the modified (new) code is all restricted to the codepath
associated with clearing history. AS such, it should (worst case) induce
problems only when used, and should not leave us with much in the way of
regressions (if any) unless we exercise the feature. As such, the risk seems
low enough to land on the branch asap.
Thanks for jumping all over this bug so quickly!!!!! Nice work.
Please land asap on branch.
Whiteboard: [nsbeta3-] [PDTP2] [rtm+] FIXED ON TRUNK r=bienvenu, sr=be → [nsbeta3-] [PDTP2] [rtm++] FIXED ON TRUNK r=bienvenu, sr=be
Assignee | ||
Comment 58•25 years ago
|
||
Checked in on branch.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 59•25 years ago
|
||
WooHoo!
VERIFIED Fixed on 2000102509 builds (Win98,MacOS 8.5.1, and Linux RH6)
adding vtrunk keyword so this can be looked at on the trunk as well
Keywords: vtrunk
Comment 60•25 years ago
|
||
Verified fixed on Mac, Linux and Win 10/31 trunk builds.
Status: RESOLVED → VERIFIED
Keywords: vtrunk
Component: History: Session → Document Navigation
QA Contact: claudius → docshell
You need to log in
before you can comment on or make changes to this bug.
Description
•