Closed Bug 328928 Opened 20 years ago Closed 20 years ago

Revert nsIGlobalHistory2 to rev 1.3, and move flags to nsIGlobalHistory3

Categories

(Core Graveyard :: History: Global, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

(Keywords: fixed1.8.1)

Attachments

(2 files, 1 obsolete file)

I believe that's what we agreed on as the way to go for history. Then we can freeze nsIGlobalHistory2. If there are no objections, we should just do this....
Flags: blocking1.9a1+
Sounds good
Attached patch Proposed patch (obsolete) — Splinter Review
Changes: 1) Revert nsIGlobalHistory2. 2) Add the Gecko flags stuff to nsIGlobalHistory3. 3) Add a aTopLevel arg to addTopLevelRedirect so its claim that it provides all the information that addURI provides is actually true. 4) Change the setup a tad so implementors of nsIGlobalHistory3 can fall back to addURI if they don't want to implement addTopLevelRedirect (saved me from having to copy/paste some 20 lines of code in three places). Thoughts? Also thoughts on which parts of this (if any) we should land on the 1.8 branch?
Attachment #213656 - Flags: superreview?(darin)
Attachment #213656 - Flags: review?
Comment on attachment 213656 [details] [diff] [review] Proposed patch Simon, could you OK the camino changes?
Attachment #213656 - Flags: review?(sfraser_bugs)
Attachment #213656 - Flags: review? → review?(brettw)
Comment on attachment 213656 [details] [diff] [review] Proposed patch Why did you add a toplevel flag to the redirect function? I once stepped through IsFrame when I was debugging this feature initially, and found it to be quite surprisingly involved. So I question whether it's worthwhile to include this for purely theoretical future users.
Attachment #213656 - Flags: review?(brettw) → review+
It would be better for me if this was also landed on the branch. Otherwise we'll need some #ifdefs in the places code.
> Why did you add a toplevel flag to the redirect function? Because otherwise the claim that it provides all the functionality addURI provides is false. I could just remove that claim and document that consumers who need both sets of functionality are just screwed, but this seemed like a better approach. ;) Note that the aTopLevel arg _is_ used in the Seamonkey history impl; non-toplevel redirects are not treated the same way as toplevel redirects. Btw, I found the "topLevelRedirect" part of the function name pretty confusing, since it does get called for subframes... Perhaps "addDocumentRedirect" would be clearer? Also, I'm still not sure whether we want the change to that function on the 1.8 branch, at least partly because I'm not sure how much a problem the forkage is for places. Let me know, ok? Also, given that we _do_ have a "toplevel" arg on addURI, there were probably non-theoretical users in the past, no?
Er, the last part of that comment was a mid-air victim. :( Ignore it. I'll produce a branch patch once we agree what the changes on trunk are. Note that branch will not have the same uuid as trunk, since trunk will have extra methods...
Comment on attachment 213656 [details] [diff] [review] Proposed patch >Index: docshell/base/nsIGlobalHistory3.idl >+ */ >+ unsigned long getURIGeckoFlags(in nsIURI aURI); >+ /** A newline here might be nice. >Index: layout/generic/nsGfxScrollFrame.cpp >+ nsCOMPtr<nsIGlobalHistory3> history(do_GetService(NS_GLOBALHISTORY2_CONTRACTID)); > if (!history) > return NS_ERROR_FAILURE; > > PRUint32 flags; > nsresult rv = history->GetURIGeckoFlags(uri, &flags); This should be changed to use the annotation service ;-) sr=darin
Attachment #213656 - Flags: superreview?(darin) → superreview+
(In reply to comment #8) > This should be changed to use the annotation service ;-) I will probably implement this in nsNavHistory as a call to the annotation service. This gives us some flexibility to change it later since the annotation service might be slow.
> This should be changed to use the annotation service ;-) There's no annotation service that Gecko knows about, so... ;) Brett, thoughts on the naming of the addURI method? See comment 6?
> There's no annotation service that Gecko knows about, so... ;) but maybe there should be ;-)
Possibly. The fact that we're storing this information in global history is really somewhat of an implementation detail... We could do that, but the current annotation service api doesn't seem to be ready enough yet (eg using 0 for expiration would so not get us the effect we want).
> Possibly. The fact that we're storing this information in global history is > really somewhat of an implementation detail... We could do that, but the > current annotation service api doesn't seem to be ready enough yet (eg using 0 > for expiration would so not get us the effect we want). I'd propose that we create a Gecko-defined interface for URI annotations similar to the Gecko-defined interface for Global History. This interface could be implemented by the embedder.
The current name sucks and I don't mind it being changed at all. I was trying to differentiate it from image redirects and stuff.
OK, so should we just define this Gecko API in this bug? Or file a new one?
(In reply to comment #15) > OK, so should we just define this Gecko API in this bug? Or file a new one? You mean for renaming the function or something else? I think doing it all at once here is fine.
Comment on attachment 213656 [details] [diff] [review] Proposed patch Camino stuff looks good.
Attachment #213656 - Flags: review?(sfraser_bugs) → review+
I mean for Darin's suggestion of moving this off of the history APIs altogether and having a Gecko annotation api. It seems like new bug fodder to me, frankly, unless we have such an API designed an ready to go. As in, I don't think I'd be able to develop one in the near future, and I want to make sure we don't ship the nsIGlobalHistory2 changes in 1.9.
yeah, i was thinking in terms of a new bug that wouldn't block this one.
I renamed the method to addDocumentRedirect.
Assignee: nobody → bzbarsky
Attachment #213656 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Checked in on trunk.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Attached patch 1.8 branch patchSplinter Review
Attachment #213850 - Flags: approval-branch-1.8.1?(darin)
Attachment #213850 - Flags: approval-branch-1.8.1?(darin) → approval-branch-1.8.1+
"fixed" on the 1.8 branch.
Keywords: fixed1.8.1
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: