Bug 1822222 - Convert browser/actors/PageStyle* JSMs to ESMs. r=kpatenio

Differential Revision: https://phabricator.services.mozilla.com/D172674
This commit is contained in:
Saira Abdulla 2023-03-17 01:55:59 +00:00
Родитель c3355dfd6a
Коммит 6a4ef6bc43
6 изменённых файлов: 9 добавлений и 15 удалений

Просмотреть файл

@ -1,11 +1,8 @@
/* 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/. */
"use strict";
var EXPORTED_SYMBOLS = ["PageStyleChild"];
class PageStyleChild extends JSWindowActorChild {
export class PageStyleChild extends JSWindowActorChild {
actorCreated() {
// C++ can create the actor and call us here once an "interesting" link
// element gets added to the DOM. If pageload hasn't finished yet, just

Просмотреть файл

@ -1,11 +1,8 @@
/* 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/. */
"use strict";
var EXPORTED_SYMBOLS = ["PageStyleParent"];
class PageStyleParent extends JSWindowActorParent {
export class PageStyleParent extends JSWindowActorParent {
// This has the most recent information about the content stylesheets for
// that actor. It's populated via the PageStyle:Add and PageStyle:Clear
// messages from the content process. It has the following structure:

Просмотреть файл

@ -19,7 +19,7 @@ with Files("LightweightThemeChild.jsm"):
with Files("PageInfoChild.sys.mjs"):
BUG_COMPONENT = ("Firefox", "Page Info Window")
with Files("PageStyleChild.jsm"):
with Files("PageStyleChild.sys.mjs"):
BUG_COMPONENT = ("Firefox", "Menus")
with Files("PluginChild.jsm"):
@ -68,8 +68,8 @@ FINAL_TARGET_FILES.actors += [
"LinkHandlerChild.jsm",
"LinkHandlerParent.jsm",
"PageInfoChild.sys.mjs",
"PageStyleChild.jsm",
"PageStyleParent.jsm",
"PageStyleChild.sys.mjs",
"PageStyleParent.sys.mjs",
"PluginChild.jsm",
"PluginParent.jsm",
"PointerLockChild.sys.mjs",

Просмотреть файл

@ -632,10 +632,10 @@ let JSWINDOWACTORS = {
PageStyle: {
parent: {
moduleURI: "resource:///actors/PageStyleParent.jsm",
esModuleURI: "resource:///actors/PageStyleParent.sys.mjs",
},
child: {
moduleURI: "resource:///actors/PageStyleChild.jsm",
esModuleURI: "resource:///actors/PageStyleChild.sys.mjs",
events: {
pageshow: { createActor: false },
},

Просмотреть файл

@ -3281,7 +3281,7 @@ void BrowsingContext::DidSet(FieldIndex<IDX_AuthorStyleDisabledDefault>) {
"Should only set AuthorStyleDisabledDefault in the top "
"browsing context");
// We don't need to handle changes to this field, since PageStyleChild.jsm
// We don't need to handle changes to this field, since PageStyleChild.sys.mjs
// will respond to the PageStyle:Disable message in all content processes.
//
// But we store the state here on the top BrowsingContext so that the

Просмотреть файл

@ -6856,7 +6856,7 @@ already_AddRefed<PresShell> Document::CreatePresShell(
MarkUserFontSetDirty();
// Take the author style disabled state from the top browsing cvontext.
// (PageStyleChild.jsm ensures this is up to date.)
// (PageStyleChild.sys.mjs ensures this is up to date.)
if (BrowsingContext* bc = GetBrowsingContext()) {
presShell->SetAuthorStyleDisabled(bc->Top()->AuthorStyleDisabledDefault());
}