mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 11:57:32 +09:00
Issue #1118 Part 1: Split out part of nsDocShell::AddState into a
separate method. This implements the "URL and history update steps" from the HTML spec. See https://html.spec.whatwg.org/multipage/history.html
This commit is contained in:
parent
42659b995e
commit
c6694a0c4c
2 changed files with 112 additions and 52 deletions
|
|
@ -26,6 +26,7 @@ interface nsIChannel;
|
|||
interface nsIContentViewer;
|
||||
interface nsIDOMEventTarget;
|
||||
interface nsIDocShellLoadInfo;
|
||||
interface nsIDocument;
|
||||
interface nsIEditor;
|
||||
interface nsIEditingSession;
|
||||
interface nsISimpleEnumerator;
|
||||
|
|
@ -35,6 +36,7 @@ interface nsISHEntry;
|
|||
interface nsILayoutHistoryState;
|
||||
interface nsISecureBrowserUI;
|
||||
interface nsIScriptGlobalObject;
|
||||
interface nsIStructuredCloneContainer;
|
||||
interface nsIDOMStorage;
|
||||
interface nsIPrincipal;
|
||||
interface nsIWebBrowserPrint;
|
||||
|
|
@ -210,6 +212,30 @@ interface nsIDocShell : nsIDocShellTreeItem
|
|||
void addState(in jsval aData, in DOMString aTitle,
|
||||
in DOMString aURL, in boolean aReplace);
|
||||
|
||||
/**
|
||||
* Helper for addState and document.open that does just the
|
||||
* history-manipulation guts.
|
||||
*
|
||||
* Arguments the spec defines:
|
||||
*
|
||||
* @param aDocument the document we're manipulating. This will get the new URI.
|
||||
* @param aNewURI the new URI.
|
||||
* @param aData The serialized state data. May be null.
|
||||
* @param aTitle The new title. May be empty.
|
||||
* @param aReplace whether this should replace the exising SHEntry.
|
||||
*
|
||||
* Arguments we need internally because deriving them from the
|
||||
* others is a bit complicated:
|
||||
*
|
||||
* @param aCurrentURI the current URI we're working with. Might be null.
|
||||
* @param aEqualURIs whether the two URIs involved are equal.
|
||||
*/
|
||||
[nostdcall]
|
||||
void updateURLAndHistory(in nsIDocument aDocument, in nsIURI aNewURI,
|
||||
in nsIStructuredCloneContainer aData, in AString aTitle,
|
||||
in boolean aReplace, in nsIURI aCurrentURI,
|
||||
in boolean aEqualURIs);
|
||||
|
||||
/**
|
||||
* Creates a DocShellLoadInfo object that you can manipulate and then pass
|
||||
* to loadURI.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue