2005-08-18 15:16:20 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1999-12-23 01:33:16 +03:00
|
|
|
|
|
|
|
/**
|
2018-08-22 12:20:56 +03:00
|
|
|
* The interface to nsISHentry. Each document or subframe in
|
1999-12-23 01:33:16 +03:00
|
|
|
* Session History will have a nsISHEntry associated with it which will
|
|
|
|
* hold all information required to recreate the document from history
|
|
|
|
*/
|
2013-08-30 08:14:59 +04:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
1999-12-23 01:33:16 +03:00
|
|
|
|
2016-10-10 21:36:41 +03:00
|
|
|
interface nsIMutableArray;
|
2005-08-18 15:15:30 +04:00
|
|
|
interface nsILayoutHistoryState;
|
2005-08-18 15:17:00 +04:00
|
|
|
interface nsIContentViewer;
|
|
|
|
interface nsIURI;
|
|
|
|
interface nsIInputStream;
|
|
|
|
interface nsIDocShellTreeItem;
|
2011-04-25 06:30:54 +04:00
|
|
|
interface nsIStructuredCloneContainer;
|
2011-10-21 19:26:34 +04:00
|
|
|
interface nsIBFCacheEntry;
|
2016-07-28 10:20:41 +03:00
|
|
|
interface nsIPrincipal;
|
2017-04-27 13:59:11 +03:00
|
|
|
interface nsISHistory;
|
2011-10-21 19:26:34 +04:00
|
|
|
|
2005-08-18 15:17:00 +04:00
|
|
|
%{C++
|
2015-04-21 18:04:57 +03:00
|
|
|
#include "nsRect.h"
|
2008-04-24 01:36:17 +04:00
|
|
|
class nsDocShellEditorData;
|
2011-10-21 19:26:34 +04:00
|
|
|
class nsSHEntryShared;
|
2005-08-18 15:17:00 +04:00
|
|
|
%}
|
2009-01-15 06:27:09 +03:00
|
|
|
[ref] native nsIntRect(nsIntRect);
|
2008-04-24 01:36:17 +04:00
|
|
|
[ptr] native nsDocShellEditorDataPtr(nsDocShellEditorData);
|
2011-10-21 19:26:34 +04:00
|
|
|
[ptr] native nsSHEntryShared(nsSHEntryShared);
|
2008-04-24 01:36:17 +04:00
|
|
|
|
2018-09-05 02:02:37 +03:00
|
|
|
[builtinclass, scriptable, uuid(0dad26b8-a259-42c7-93f1-2fa7fc076e45)]
|
2013-08-30 08:14:59 +04:00
|
|
|
interface nsISHEntry : nsISupports
|
1999-12-23 01:33:16 +03:00
|
|
|
{
|
2013-08-30 08:14:59 +04:00
|
|
|
/**
|
2018-09-12 05:54:11 +03:00
|
|
|
* The URI of the current entry.
|
2013-08-30 08:14:59 +04:00
|
|
|
*/
|
2018-09-12 05:54:11 +03:00
|
|
|
[infallible] attribute nsIURI URI;
|
2013-08-30 08:14:59 +04:00
|
|
|
|
2015-09-30 09:54:39 +03:00
|
|
|
/**
|
2018-09-12 05:54:11 +03:00
|
|
|
* The original URI of the current entry. If an entry is the result of a
|
|
|
|
* redirect this attribute holds the original URI.
|
2015-09-30 09:54:39 +03:00
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute nsIURI originalURI;
|
2015-09-30 09:54:39 +03:00
|
|
|
|
2017-05-30 19:07:59 +03:00
|
|
|
/**
|
|
|
|
* URL as stored from nsILoadInfo.resultPrincipalURI. See nsILoadInfo
|
|
|
|
* for more details.
|
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute nsIURI resultPrincipalURI;
|
2017-05-30 19:07:59 +03:00
|
|
|
|
2016-06-28 11:03:25 +03:00
|
|
|
/**
|
|
|
|
* This flag remembers whether channel has LOAD_REPLACE set.
|
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute boolean loadReplace;
|
2016-06-28 11:03:25 +03:00
|
|
|
|
2013-08-30 08:14:59 +04:00
|
|
|
/**
|
2018-09-05 04:29:36 +03:00
|
|
|
* The title of the current entry.
|
2013-08-30 08:14:59 +04:00
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
// XXX: make it [infallible] when AString supports that (bug 1491187).
|
2018-09-05 04:29:36 +03:00
|
|
|
attribute AString title;
|
2013-08-30 08:14:59 +04:00
|
|
|
|
|
|
|
/**
|
2018-09-12 05:54:11 +03:00
|
|
|
* Was the entry created as a result of a subframe navigation?
|
|
|
|
* - Will be 'false' when a frameset page is visited for the first time.
|
|
|
|
* - Will be 'true' for all history entries created as a result of a
|
|
|
|
* subframe navigation.
|
2013-08-30 08:14:59 +04:00
|
|
|
*/
|
2018-09-12 05:54:11 +03:00
|
|
|
[infallible] attribute boolean isSubFrame;
|
2005-08-18 15:17:00 +04:00
|
|
|
|
|
|
|
/** Referrer URI */
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute nsIURI referrerURI;
|
2005-08-18 15:17:00 +04:00
|
|
|
|
2018-09-07 04:56:23 +03:00
|
|
|
/**
|
|
|
|
* Referrer policy, holding one of the values (REFERRER_POLICY_*) defined
|
|
|
|
* in nsIHttpChannel.
|
2014-11-18 16:46:29 +03:00
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute unsigned long referrerPolicy;
|
2014-11-18 16:46:29 +03:00
|
|
|
|
2005-08-18 15:17:00 +04:00
|
|
|
/** Content viewer, for fast restoration of presentation */
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute nsIContentViewer contentViewer;
|
2005-08-18 15:17:00 +04:00
|
|
|
|
|
|
|
/** Whether the content viewer is marked "sticky" */
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute boolean sticky;
|
2005-08-18 15:17:00 +04:00
|
|
|
|
|
|
|
/** Saved state of the global window object */
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute nsISupports windowState;
|
2005-08-18 15:17:00 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Saved position and dimensions of the content viewer; we must adjust the
|
|
|
|
* root view's widget accordingly if this has changed when the presentation
|
|
|
|
* is restored.
|
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
[noscript, notxpcom] void getViewerBounds(in nsIntRect bounds);
|
|
|
|
[noscript, notxpcom] void setViewerBounds([const] in nsIntRect bounds);
|
2005-08-18 15:17:00 +04:00
|
|
|
|
|
|
|
/**
|
2006-06-26 22:48:52 +04:00
|
|
|
* Saved child docshells corresponding to contentViewer. The child shells
|
2005-08-18 15:17:00 +04:00
|
|
|
* are restored as children of the parent docshell, in this order, when the
|
|
|
|
* parent docshell restores a saved presentation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** Append a child shell to the end of our list. */
|
2018-09-12 04:59:06 +03:00
|
|
|
[noscript, notxpcom] void addChildShell(in nsIDocShellTreeItem shell);
|
2005-08-18 15:17:00 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the child shell at |index|; returns null if |index| is out of bounds.
|
|
|
|
*/
|
2018-09-12 04:59:06 +03:00
|
|
|
[noscript] nsIDocShellTreeItem childShellAt(in long index);
|
2005-08-18 15:17:00 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Clear the child shell list.
|
|
|
|
*/
|
2018-09-12 04:59:06 +03:00
|
|
|
[noscript, notxpcom] void clearChildShells();
|
2005-08-18 15:17:00 +04:00
|
|
|
|
|
|
|
/** Saved refresh URI list for the content viewer */
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute nsIMutableArray refreshURIList;
|
2005-08-18 15:17:00 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Ensure that the cached presentation members are self-consistent.
|
|
|
|
* If either |contentViewer| or |windowState| are null, then all of the
|
|
|
|
* following members are cleared/reset:
|
|
|
|
* contentViewer, sticky, windowState, viewerBounds, childShells,
|
|
|
|
* refreshURIList.
|
|
|
|
*/
|
2018-09-12 04:59:06 +03:00
|
|
|
[noscript, notxpcom] void syncPresentationState();
|
2005-08-18 15:17:00 +04:00
|
|
|
|
|
|
|
/** Post Data for the document */
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute nsIInputStream postData;
|
2005-08-18 15:17:00 +04:00
|
|
|
|
|
|
|
/** LayoutHistoryState for scroll position and form values */
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute nsILayoutHistoryState layoutHistoryState;
|
2005-08-18 15:17:00 +04:00
|
|
|
|
2017-03-25 16:01:29 +03:00
|
|
|
/**
|
|
|
|
* Initialises the LayoutHistoryState if it doesn't already exist
|
|
|
|
* and returns a reference to it.
|
|
|
|
*/
|
|
|
|
nsILayoutHistoryState initLayoutHistoryState();
|
|
|
|
|
2005-08-18 15:17:00 +04:00
|
|
|
/** parent of this entry */
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute nsISHEntry parent;
|
2005-08-18 15:17:00 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The loadType for this entry. This is typically loadHistory except
|
|
|
|
* when reload is pressed, it has the appropriate reload flag
|
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute unsigned long loadType;
|
2005-08-18 15:17:00 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* An ID to help identify this entry from others during
|
|
|
|
* subframe navigation
|
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute unsigned long ID;
|
2005-08-18 15:17:00 +04:00
|
|
|
|
2018-09-07 04:56:23 +03:00
|
|
|
/** The cache key for the entry */
|
|
|
|
[infallible] attribute unsigned long cacheKey;
|
2005-08-18 15:17:00 +04:00
|
|
|
|
2018-09-07 04:56:23 +03:00
|
|
|
/** Should the layoutHistoryState be saved? */
|
|
|
|
[infallible] attribute boolean saveLayoutStateFlag;
|
2005-08-18 15:17:00 +04:00
|
|
|
|
2018-09-07 04:56:23 +03:00
|
|
|
/** Has the page already expired in cache? */
|
|
|
|
[infallible] attribute boolean expirationStatus;
|
2005-08-18 15:17:00 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* attribute to indicate the content-type of the document that this
|
|
|
|
* is a session history entry for
|
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
// XXX: make it [infallible] when ACString supports that (bug 1491187).
|
2018-08-22 12:20:56 +03:00
|
|
|
attribute ACString contentType;
|
2011-07-07 17:12:14 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* If we created this SHEntry via history.pushState or modified it via
|
|
|
|
* history.replaceState, and if we changed the SHEntry's URI via the
|
|
|
|
* push/replaceState call, and if the SHEntry's new URI differs from its
|
|
|
|
* old URI by more than just the hash, then we set this field to true.
|
|
|
|
*
|
|
|
|
* Additionally, if this SHEntry was created by calling pushState from a
|
|
|
|
* SHEntry whose URI was modified, this SHEntry's URIWasModified field is
|
|
|
|
* true.
|
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute boolean URIWasModified;
|
2018-08-22 12:20:56 +03:00
|
|
|
|
2005-08-18 15:17:00 +04:00
|
|
|
/** Set/Get scrollers' positon in anchored pages */
|
|
|
|
void setScrollPosition(in long x, in long y);
|
|
|
|
void getScrollPosition(out long x, out long y);
|
2005-08-18 15:16:36 +04:00
|
|
|
|
2005-08-18 15:17:00 +04:00
|
|
|
/** Additional ways to create an entry */
|
2007-09-18 02:27:17 +04:00
|
|
|
[noscript] void create(in nsIURI URI, in AString title,
|
|
|
|
in nsIInputStream inputStream,
|
|
|
|
in nsILayoutHistoryState layoutHistoryState,
|
2018-03-06 06:19:42 +03:00
|
|
|
in unsigned long cacheKey, in ACString contentType,
|
2016-07-28 10:20:41 +03:00
|
|
|
in nsIPrincipal triggeringPrincipal,
|
2016-09-20 09:36:25 +03:00
|
|
|
in nsIPrincipal principalToInherit,
|
2016-11-17 00:42:35 +03:00
|
|
|
in nsIDRef docshellID,
|
2010-08-17 18:13:55 +04:00
|
|
|
in boolean dynamicCreation);
|
2005-08-18 15:16:08 +04:00
|
|
|
|
2005-08-18 15:17:00 +04:00
|
|
|
nsISHEntry clone();
|
2005-08-18 15:16:08 +04:00
|
|
|
|
2005-09-23 22:16:40 +04:00
|
|
|
/** Return any content viewer present in or below this node in the
|
|
|
|
nsSHEntry tree. This will differ from contentViewer in the case
|
|
|
|
where a child nsSHEntry has the content viewer for this tree. */
|
2018-09-12 04:59:06 +03:00
|
|
|
[noscript] nsIContentViewer getAnyContentViewer(out nsISHEntry ownerEntry);
|
2006-06-20 01:08:45 +04:00
|
|
|
|
|
|
|
/**
|
2016-07-28 10:20:41 +03:00
|
|
|
* Get the principal, if any, that was associated with the channel
|
2006-06-20 01:08:45 +04:00
|
|
|
* that the document that was loaded to create this history entry
|
|
|
|
* came from.
|
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute nsIPrincipal triggeringPrincipal;
|
2008-04-24 01:36:17 +04:00
|
|
|
|
2016-09-20 09:36:25 +03:00
|
|
|
/**
|
|
|
|
* Get the principal, if any, that is used when the inherit flag
|
|
|
|
* is set.
|
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute nsIPrincipal principalToInherit;
|
2016-09-20 09:36:25 +03:00
|
|
|
|
2009-09-01 20:45:05 +04:00
|
|
|
/**
|
|
|
|
* Get/set data associated with this history state via a pushState() call,
|
2011-04-25 06:30:54 +04:00
|
|
|
* serialized using structured clone.
|
2009-09-01 20:45:05 +04:00
|
|
|
**/
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute nsIStructuredCloneContainer stateData;
|
2009-09-01 20:45:05 +04:00
|
|
|
|
2008-04-24 01:36:17 +04:00
|
|
|
/**
|
|
|
|
* Gets the owning pointer to the editor data assosicated with
|
|
|
|
* this shistory entry. This forgets its pointer, so free it when
|
|
|
|
* you're done.
|
|
|
|
*/
|
|
|
|
[noscript, notxpcom] nsDocShellEditorDataPtr forgetEditorData();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the owning pointer to the editor data assosicated with
|
|
|
|
* this shistory entry. Unless forgetEditorData() is called, this
|
|
|
|
* shentry will destroy the editor data when it's destroyed.
|
|
|
|
*/
|
|
|
|
[noscript, notxpcom] void setEditorData(in nsDocShellEditorDataPtr aData);
|
|
|
|
|
|
|
|
/** Returns true if this shistory entry is storing a detached editor. */
|
|
|
|
[noscript, notxpcom] boolean hasDetachedEditor();
|
2010-08-17 18:13:55 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns true if the related docshell was added because of
|
|
|
|
* dynamic addition of an iframe/frame.
|
|
|
|
*/
|
2018-09-12 04:59:06 +03:00
|
|
|
[noscript, notxpcom] boolean isDynamicallyAdded();
|
2010-08-17 18:13:55 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns true if any of the child entries returns true
|
|
|
|
* when isDynamicallyAdded is called on it.
|
|
|
|
*/
|
|
|
|
boolean hasDynamicallyAddedChild();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The history ID of the docshell.
|
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
// Would be [infallible], but we don't support that property for nsIDPtr.
|
2016-11-17 00:42:35 +03:00
|
|
|
attribute nsIDPtr docshellID;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Helper method for accessing this value from C++
|
|
|
|
*/
|
|
|
|
[noscript, notxpcom] nsID DocshellID();
|
2011-10-21 19:26:34 +04:00
|
|
|
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] readonly attribute nsIBFCacheEntry BFCacheEntry;
|
2011-10-21 19:26:34 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Does this SHEntry point to the given BFCache entry? If so, evicting
|
|
|
|
* the BFCache entry will evict the SHEntry, since the two entries
|
|
|
|
* correspond to the same document.
|
|
|
|
*/
|
2018-09-12 04:59:06 +03:00
|
|
|
[noscript, notxpcom] boolean hasBFCacheEntry(in nsIBFCacheEntry aEntry);
|
2011-10-21 19:26:34 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Adopt aEntry's BFCacheEntry, so now both this and aEntry point to
|
|
|
|
* aEntry's BFCacheEntry.
|
|
|
|
*/
|
|
|
|
void adoptBFCacheEntry(in nsISHEntry aEntry);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new BFCache entry and drop our reference to our old one. This
|
|
|
|
* call unlinks this SHEntry from any other SHEntries for its document.
|
|
|
|
*/
|
|
|
|
void abandonBFCacheEntry();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Does this SHEntry correspond to the same document as aEntry? This is
|
|
|
|
* true iff the two SHEntries have the same BFCacheEntry. So in
|
|
|
|
* particular, sharesDocumentWith(aEntry) is guaranteed to return true if
|
|
|
|
* it's preceeded by a call to adoptBFCacheEntry(aEntry).
|
|
|
|
*/
|
|
|
|
boolean sharesDocumentWith(in nsISHEntry aEntry);
|
2013-06-29 07:13:22 +04:00
|
|
|
|
|
|
|
/**
|
2018-09-07 04:56:23 +03:00
|
|
|
* True if this SHEntry corresponds to a document created by a srcdoc
|
|
|
|
* iframe. Set when a value is assigned to srcdocData.
|
2013-06-29 07:13:22 +04:00
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] readonly attribute boolean isSrcdocEntry;
|
2013-06-29 07:13:22 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Contents of the srcdoc attribute in a srcdoc iframe to be loaded instead
|
|
|
|
* of the URI. Similar to a Data URI, this information is needed to
|
|
|
|
* recreate the document at a later stage.
|
|
|
|
* Setting this sets isSrcdocEntry to true
|
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
// XXX: make it [infallible] when AString supports that (bug 1491187).
|
2013-06-29 07:13:22 +04:00
|
|
|
attribute AString srcdocData;
|
2014-02-06 18:46:29 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* When isSrcdocEntry is true, this contains the baseURI of the srcdoc
|
|
|
|
* document for use in situations where it cannot otherwise be determined,
|
|
|
|
* for example with view-source.
|
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute nsIURI baseURI;
|
2015-12-26 13:59:09 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets/gets the current scroll restoration state,
|
|
|
|
* if true == "manual", false == "auto".
|
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] attribute boolean scrollRestorationIsManual;
|
2017-04-27 13:59:11 +03:00
|
|
|
|
2017-05-18 14:08:56 +03:00
|
|
|
/**
|
|
|
|
* Flag to indicate that the history entry was originally loaded in the
|
|
|
|
* current process. This flag does not survive a browser process switch.
|
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] readonly attribute boolean loadedInThisProcess;
|
2017-05-18 14:08:56 +03:00
|
|
|
|
2017-04-27 13:59:11 +03:00
|
|
|
/**
|
2017-05-22 10:36:06 +03:00
|
|
|
* The session history it belongs to. It's usually only set on root entries.
|
|
|
|
* SHEntry is strictly bound to the SHistory it belongs to; it should not be
|
|
|
|
* changed once set to a non-null value.
|
2017-04-27 13:59:11 +03:00
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
[noscript, infallible] attribute nsISHistory SHistory;
|
2018-07-03 02:32:47 +03:00
|
|
|
|
|
|
|
/**
|
2018-09-12 05:54:11 +03:00
|
|
|
* Sets an SHEntry to reflect that it is a history type load. As
|
2018-07-03 02:32:47 +03:00
|
|
|
* nsIDocShellLoadInfo and its LoadType enum were removed, this is the
|
|
|
|
* equivalent to doing
|
|
|
|
*
|
|
|
|
* shEntry.loadType = 4;
|
|
|
|
*
|
|
|
|
* in js, but easier to maintain and less opaque.
|
|
|
|
*/
|
2018-09-12 05:54:11 +03:00
|
|
|
void setLoadTypeAsHistory();
|
2011-01-19 22:57:36 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* A number that is assigned by the sHistory when the entry is activated
|
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
[noscript, infallible] attribute unsigned long lastTouched;
|
2011-10-21 19:26:34 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Some state, particularly that related to the back/forward cache, is
|
|
|
|
* shared between SHEntries which correspond to the same document. This
|
|
|
|
* method gets a pointer to that shared state.
|
|
|
|
*
|
|
|
|
* This shared state is the SHEntry's BFCacheEntry. So
|
|
|
|
* hasBFCacheEntry(getSharedState()) is guaranteed to return true.
|
|
|
|
*/
|
2018-09-12 04:59:06 +03:00
|
|
|
[noscript, notxpcom] nsSHEntryShared getSharedState();
|
2018-08-22 12:20:56 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The current number of nsISHEntries which are immediate children of this
|
|
|
|
* SHEntry.
|
|
|
|
*/
|
2018-09-07 04:56:23 +03:00
|
|
|
[infallible] readonly attribute long childCount;
|
2018-08-22 12:20:56 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Add a new child SHEntry. If offset is -1 adds to the end of the list.
|
|
|
|
*/
|
|
|
|
void AddChild(in nsISHEntry aChild, in long aOffset);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove a child SHEntry.
|
|
|
|
*/
|
2018-09-12 04:59:06 +03:00
|
|
|
[noscript] void RemoveChild(in nsISHEntry aChild);
|
2018-08-22 12:20:56 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get child at an index.
|
|
|
|
*/
|
|
|
|
nsISHEntry GetChildAt(in long aIndex);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Replaces a child which is for the same docshell as aNewChild
|
|
|
|
* with aNewChild.
|
|
|
|
* @throw if nothing was replaced.
|
|
|
|
*/
|
2018-09-12 04:59:06 +03:00
|
|
|
[noscript] void ReplaceChild(in nsISHEntry aNewChild);
|
2018-09-05 02:02:37 +03:00
|
|
|
|
|
|
|
/**
|
2018-09-05 02:03:22 +03:00
|
|
|
* When an entry is serving is within nsISHistory's array of entries, this
|
2018-09-05 02:02:37 +03:00
|
|
|
* property specifies if it should persist. If not it will be replaced by
|
|
|
|
* new additions to the list.
|
|
|
|
*/
|
|
|
|
[infallible] attribute boolean persist;
|
2010-11-24 00:24:57 +03:00
|
|
|
};
|
1999-12-23 01:33:16 +03:00
|
|
|
|
|
|
|
%{ C++
|
|
|
|
// {BFD1A791-AD9F-11d3-BDC7-0050040A9B44}
|
|
|
|
#define NS_SHENTRY_CID \
|
|
|
|
{0xbfd1a791, 0xad9f, 0x11d3, {0xbd, 0xc7, 0x0, 0x50, 0x4, 0xa, 0x9b, 0x44}}
|
|
|
|
|
2005-08-18 15:15:50 +04:00
|
|
|
#define NS_SHENTRY_CONTRACTID \
|
|
|
|
"@mozilla.org/browser/session-history-entry;1"
|
1999-12-23 01:33:16 +03:00
|
|
|
%}
|
|
|
|
|