Bug 1551344 - Part 2: Update outdated comments referencing XULDocument. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D41239

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Brendan Dahl 2019-08-09 17:47:41 +00:00
parent b474db77c6
commit 0a8d6f243d
12 changed files with 30 additions and 29 deletions

View File

@ -52,7 +52,7 @@ FormAutofillPreferences.prototype = {
/**
* Create the Form Autofill preference group.
*
* @param {XULDocument} document
* @param {HTMLDocument} document
* @returns {XULElement}
*/
init(document) {
@ -73,7 +73,7 @@ FormAutofillPreferences.prototype = {
/**
* Create Form Autofill preference group
*
* @param {XULDocument} document
* @param {HTMLDocument} document
*/
createPreferenceGroup(document) {
let learnMoreURL =

View File

@ -362,7 +362,7 @@ nsScriptSecurityManager::GetChannelURIPrincipal(nsIChannel* aChannel,
MOZ_ASSERT(aChannel, "Must have channel!");
// Get the principal from the URI. Make sure this does the same thing
// as Document::Reset and XULDocument::StartDocumentLoad.
// as Document::Reset and PrototypeDocumentContentSink::Init.
nsCOMPtr<nsIURI> uri;
nsresult rv = NS_GetFinalChannelURI(aChannel, getter_AddRefs(uri));
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -45,7 +45,7 @@ function l10n(key) {
/**
* Create a xul:menuitem element
*
* @param {XULDocument} doc
* @param {HTMLDocument} doc
* The document to which menus are to be added.
* @param {String} id
* Element id.
@ -78,7 +78,7 @@ function createMenuItem({ doc, id, label, accesskey, isCheckbox }) {
*
* @param {Object} toolDefinition
* Tool definition of the tool to add a menu entry.
* @param {XULDocument} doc
* @param {HTMLDocument} doc
* The document to which the tool menu item is to be added.
*/
function createToolMenuElements(toolDefinition, doc) {
@ -143,7 +143,7 @@ function sendEntryPointTelemetry(window) {
* Create xul menuitem, key elements for a given tool.
* And then insert them into browser DOM.
*
* @param {XULDocument} doc
* @param {HTMLDocument} doc
* The document to which the tool is to be registered.
* @param {Object} toolDefinition
* Tool definition of the tool to register.
@ -172,7 +172,7 @@ exports.insertToolMenuElements = insertToolMenuElements;
*
* @param {string} toolId
* Id of the tool to add a menu entry for
* @param {XULDocument} doc
* @param {HTMLDocument} doc
* The document to which the tool menu item is to be removed from
*/
function removeToolFromMenu(toolId, doc) {
@ -191,7 +191,7 @@ exports.removeToolFromMenu = removeToolFromMenu;
/**
* Add all tools to the developer tools menu of a window.
*
* @param {XULDocument} doc
* @param {HTMLDocument} doc
* The document to which the tool items are to be added.
*/
function addAllToolsToMenu(doc) {
@ -224,7 +224,7 @@ function addAllToolsToMenu(doc) {
/**
* Add global menus that are not panel specific.
*
* @param {XULDocument} doc
* @param {HTMLDocument} doc
* The document to which menus are to be added.
*/
function addTopLevelItems(doc) {
@ -277,7 +277,7 @@ function addTopLevelItems(doc) {
/**
* Remove global menus that are not panel specific.
*
* @param {XULDocument} doc
* @param {HTMLDocument} doc
* The document to which menus are to be added.
*/
function removeTopLevelItems(doc) {
@ -294,7 +294,7 @@ function removeTopLevelItems(doc) {
/**
* Add menus to a browser document
*
* @param {XULDocument} doc
* @param {HTMLDocument} doc
* The document to which menus are to be added.
*/
exports.addMenus = function(doc) {
@ -308,7 +308,7 @@ exports.addMenus = function(doc) {
/**
* Remove menus from a browser document
*
* @param {XULDocument} doc
* @param {HTMLDocument} doc
* The document to which menus are to be removed.
*/
exports.removeMenus = function(doc) {

View File

@ -515,7 +515,7 @@ var gDevToolsBrowser = (exports.gDevToolsBrowser = {
/**
* Add this DevTools's presence to a browser window's document
*
* @param {XULDocument} doc
* @param {HTMLDocument} doc
* The document to which devtools should be hooked to.
*/
_registerBrowserWindow(win) {

View File

@ -2255,7 +2255,7 @@ void Document::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup) {
nsCOMPtr<nsIPrincipal> principal;
nsCOMPtr<nsIPrincipal> storagePrincipal;
if (aChannel) {
// Note: this code is duplicated in XULDocument::StartDocumentLoad and
// Note: this code is duplicated in PrototypeDocumentContentSink::Init and
// nsScriptSecurityManager::GetChannelResultPrincipals.
// Note: this should match nsDocShell::OnLoadingSite
NS_GetFinalChannelURI(aChannel, getter_AddRefs(uri));

View File

@ -738,7 +738,7 @@ nsresult PrototypeDocumentContentSink::LoadScript(
mCurrentScriptProto = aScriptProto;
if (isChromeDoc && aScriptProto->mSrcLoading) {
// Another XULDocument load has started, which is still in progress.
// Another document load has started, which is still in progress.
// Remember to ResumeWalk this document when the load completes.
mNextSrcLoadWaiter = aScriptProto->mSrcLoadWaiters;
aScriptProto->mSrcLoadWaiters = this;
@ -807,7 +807,7 @@ PrototypeDocumentContentSink::OnStreamComplete(nsIStreamLoader* aLoader,
}
if (NS_SUCCEEDED(aStatus)) {
// If the including XUL document is a FastLoad document, and we're
// If the including document is a FastLoad document, and we're
// compiling an out-of-line script (one with src=...), then we must
// be writing a new FastLoad file. If we were reading this script
// from the FastLoad file, XULContentSinkImpl::OpenScript (over in
@ -820,7 +820,7 @@ PrototypeDocumentContentSink::OnStreamComplete(nsIStreamLoader* aLoader,
MOZ_ASSERT(!mOffThreadCompiling && (mOffThreadCompileStringLength == 0 &&
!mOffThreadCompileStringBuf),
"XULDocument can't load multiple scripts at once");
"PrototypeDocument can't load multiple scripts at once");
rv = ScriptLoader::ConvertToUTF16(channel, string, stringLen, EmptyString(),
mDocument, mOffThreadCompileStringBuf,
@ -902,7 +902,7 @@ PrototypeDocumentContentSink::OnScriptCompileComplete(JSScript* aScript,
// containing a companion nsXULPrototypeScript node that owns a
// GC root protecting the script object. Otherwise, the script
// cache entry will dangle once the uncached prototype document
// is released when its owning XULDocument is unloaded.
// is released when its owning document is unloaded.
//
// (See http://bugzilla.mozilla.org/show_bug.cgi?id=98207 for
// the true crime story.)
@ -919,7 +919,7 @@ PrototypeDocumentContentSink::OnScriptCompileComplete(JSScript* aScript,
rv = ResumeWalk();
// Load a pointer to the prototype-script's list of XULDocuments who
// Load a pointer to the prototype-script's list of documents who
// raced to load the same script
PrototypeDocumentContentSink** docp = &scriptProto->mSrcLoadWaiters;

View File

@ -1979,7 +1979,7 @@ nsresult nsXULPrototypeScript::DeserializeOutOfLine(
if (mSrcURI) {
// NB: we must check the XUL script cache early, to avoid
// multiple deserialization attempts for a given script.
// Note that XULDocument::LoadScript
// Note that PrototypeDocumentContentSink::LoadScript
// checks the XUL script cache too, in order to handle the
// serialization case.
//

View File

@ -28,7 +28,7 @@ class nsXULPrototypePI;
* for the XUL cache.
* Among other things, stores the tree of nsXULPrototype*
* objects, from which the real DOM tree is built later in
* XULDocument::ResumeWalk.
* PrototypeDocumentContentSink::ResumeWalk.
*/
class nsXULPrototypeDocument final : public nsISerializable {
public:
@ -73,8 +73,8 @@ class nsXULPrototypeDocument final : public nsISerializable {
/**
* If current prototype document has not yet finished loading,
* appends aDocument to the list of documents to notify (via
* XULDocument::OnPrototypeLoadDone()) and sets aLoaded to false.
* Otherwise sets aLoaded to true.
* PrototypeDocumentContentSink::OnPrototypeLoadDone()) and
* sets aLoaded to false. Otherwise sets aLoaded to true.
*/
nsresult AwaitLoadDone(Callback&& aCallback, bool* aResult);
@ -82,7 +82,8 @@ class nsXULPrototypeDocument final : public nsISerializable {
* Notifies each document registered via AwaitLoadDone on this
* prototype document that the prototype has finished loading.
* The notification is performed by calling
* XULDocument::OnPrototypeLoadDone on the registered documents.
* PrototypeDocumentContentSink::OnPrototypeLoadDone on the
* registered documents.
*/
nsresult NotifyLoadDone();

View File

@ -412,8 +412,8 @@ class nsXULPopupManager final : public nsIDOMEventListener,
// retrieve the node and offset of the last mouse event used to open a
// context menu. This information is determined from the rangeParent and
// the rangeOffset of the event supplied to ShowPopup or ShowPopupAtScreen.
// This is used by the implementation of XULDocument::GetPopupRangeParent
// and XULDocument::GetPopupRangeOffset.
// This is used by the implementation of Document::GetPopupRangeParent
// and Document::GetPopupRangeOffset.
nsINode* GetMouseLocationParent();
int32_t MouseLocationOffset();

View File

@ -487,7 +487,7 @@ element.findByPartialLinkText = function(startNode, linkText) {
/**
* Find anonymous nodes of <var>node</var>.
*
* @param {XULDocument} document
* @param {HTMLDocument} document
* Root node of the document.
* @param {XULElement} node
* Where in the DOM hierarchy to begin searching.

View File

@ -1285,7 +1285,7 @@ class HiddenXULWindow {
}
/**
* Private helper that create a XULDocument in a windowless browser.
* Private helper that create a HTMLDocument in a windowless browser.
*
* @returns {Promise<void>}
* A promise which resolves when the windowless browser is ready.

View File

@ -1643,7 +1643,7 @@ nsresult nsXULWindow::SetPersistentValue(const nsAtom* aAttr,
nsAutoString windowElementId;
docShellElement->GetId(windowElementId);
// Match the behavior of XULDocument and only persist values if the element
// Match the behavior of XULPersist and only persist values if the element
// has an ID.
if (windowElementId.IsEmpty()) {
return NS_OK;