Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky

Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
This commit is contained in:
Ricky Stewart 2020-10-23 20:40:42 +00:00
Родитель 8f82fc1396
Коммит c0cea3b0fa
3432 изменённых файлов: 164119 добавлений и 128521 удалений

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

@ -12,56 +12,55 @@ import sys
old_bytecode = sys.dont_write_bytecode old_bytecode = sys.dont_write_bytecode
sys.dont_write_bytecode = True sys.dont_write_bytecode = True
path = os.path.abspath(os.path.join(os.path.dirname(__file__), 'mach')) path = os.path.abspath(os.path.join(os.path.dirname(__file__), "mach"))
# If mach is not here, we're on the objdir go to the srcdir. # If mach is not here, we're on the objdir go to the srcdir.
if not os.path.exists(path): if not os.path.exists(path):
with open(os.path.join(os.path.dirname(__file__), 'mozinfo.json')) as info: with open(os.path.join(os.path.dirname(__file__), "mozinfo.json")) as info:
config = json.loads(info.read()) config = json.loads(info.read())
path = os.path.join(config['topsrcdir'], 'mach') path = os.path.join(config["topsrcdir"], "mach")
sys.dont_write_bytecode = old_bytecode sys.dont_write_bytecode = old_bytecode
def _is_likely_cpp_header(filename): def _is_likely_cpp_header(filename):
if not filename.endswith('.h'): if not filename.endswith(".h"):
return False return False
if filename.endswith('Inlines.h') or filename.endswith('-inl.h'): if filename.endswith("Inlines.h") or filename.endswith("-inl.h"):
return True return True
cpp_file = filename[:-1] + 'cpp' cpp_file = filename[:-1] + "cpp"
return os.path.exists(cpp_file) return os.path.exists(cpp_file)
def Settings(**kwargs): def Settings(**kwargs):
if kwargs[ 'language' ] == 'cfamily': if kwargs["language"] == "cfamily":
return FlagsForFile(kwargs['filename']) return FlagsForFile(kwargs["filename"])
# This is useful for generic language server protocols, like rust-analyzer, # This is useful for generic language server protocols, like rust-analyzer,
# to discover the right project root instead of guessing based on where the # to discover the right project root instead of guessing based on where the
# closest Cargo.toml is. # closest Cargo.toml is.
return { return {
'project_directory': '.', "project_directory": ".",
} }
def FlagsForFile(filename): def FlagsForFile(filename):
output = subprocess.check_output([path, 'compileflags', filename]) output = subprocess.check_output([path, "compileflags", filename])
output = output.decode('utf-8') output = output.decode("utf-8")
flag_list = shlex.split(output) flag_list = shlex.split(output)
# This flag is added by Fennec for android build and causes ycmd to fail to parse the file. # This flag is added by Fennec for android build and causes ycmd to fail to parse the file.
# Removing this flag is a workaround until ycmd starts to handle this flag properly. # Removing this flag is a workaround until ycmd starts to handle this flag properly.
# https://github.com/Valloric/YouCompleteMe/issues/1490 # https://github.com/Valloric/YouCompleteMe/issues/1490
final_flags = [x for x in flag_list if not x.startswith('-march=armv')] final_flags = [x for x in flag_list if not x.startswith("-march=armv")]
if _is_likely_cpp_header(filename): if _is_likely_cpp_header(filename):
final_flags += ["-x", "c++"] final_flags += ["-x", "c++"]
return { return {"flags": final_flags, "do_cache": True}
'flags': final_flags,
'do_cache': True
}
if __name__ == '__main__':
if __name__ == "__main__":
print(FlagsForFile(sys.argv[1])) print(FlagsForFile(sys.argv[1]))

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

@ -4,38 +4,39 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXPORTS.mozilla.a11y += ['AccessibleWrap.h', EXPORTS.mozilla.a11y += [
'HyperTextAccessibleWrap.h', "AccessibleWrap.h",
'SessionAccessibility.h', "HyperTextAccessibleWrap.h",
'TraversalRule.h', "SessionAccessibility.h",
"TraversalRule.h",
] ]
SOURCES += [ SOURCES += [
'AccessibleWrap.cpp', "AccessibleWrap.cpp",
'DocAccessibleWrap.cpp', "DocAccessibleWrap.cpp",
'Platform.cpp', "Platform.cpp",
'ProxyAccessibleWrap.cpp', "ProxyAccessibleWrap.cpp",
'RootAccessibleWrap.cpp', "RootAccessibleWrap.cpp",
'SessionAccessibility.cpp', "SessionAccessibility.cpp",
'TraversalRule.cpp', "TraversalRule.cpp",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/base', "/accessible/base",
'/accessible/generic', "/accessible/generic",
'/accessible/html', "/accessible/html",
'/accessible/ipc', "/accessible/ipc",
'/accessible/ipc/other', "/accessible/ipc/other",
'/accessible/xpcom', "/accessible/xpcom",
'/accessible/xul', "/accessible/xul",
'/dom/base', "/dom/base",
'/widget', "/widget",
'/widget/android', "/widget/android",
] ]
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")
if CONFIG['CC_TYPE'] in ('clang', 'gcc'): if CONFIG["CC_TYPE"] in ("clang", "gcc"):
CXXFLAGS += ['-Wno-error=shadow'] CXXFLAGS += ["-Wno-error=shadow"]

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

@ -5,40 +5,40 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXPORTS.mozilla.dom += [ EXPORTS.mozilla.dom += [
'AccessibleNode.h', "AccessibleNode.h",
] ]
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'AccessibleNode.cpp', "AccessibleNode.cpp",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/base', "/accessible/base",
'/accessible/generic', "/accessible/generic",
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk': if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/atk', "/accessible/atk",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/windows/ia2', "/accessible/windows/ia2",
'/accessible/windows/msaa', "/accessible/windows/msaa",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/mac', "/accessible/mac",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/android', "/accessible/android",
] ]
else: else:
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/other', "/accessible/other",
] ]
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"

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

@ -5,61 +5,61 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXPORTS.mozilla.a11y += [ EXPORTS.mozilla.a11y += [
'AccessibleWrap.h', "AccessibleWrap.h",
'HyperTextAccessibleWrap.h', "HyperTextAccessibleWrap.h",
] ]
SOURCES += [ SOURCES += [
'AccessibleWrap.cpp', "AccessibleWrap.cpp",
'ApplicationAccessibleWrap.cpp', "ApplicationAccessibleWrap.cpp",
'AtkSocketAccessible.cpp', "AtkSocketAccessible.cpp",
'DocAccessibleWrap.cpp', "DocAccessibleWrap.cpp",
'DOMtoATK.cpp', "DOMtoATK.cpp",
'nsMaiHyperlink.cpp', "nsMaiHyperlink.cpp",
'nsMaiInterfaceAction.cpp', "nsMaiInterfaceAction.cpp",
'nsMaiInterfaceComponent.cpp', "nsMaiInterfaceComponent.cpp",
'nsMaiInterfaceDocument.cpp', "nsMaiInterfaceDocument.cpp",
'nsMaiInterfaceEditableText.cpp', "nsMaiInterfaceEditableText.cpp",
'nsMaiInterfaceHyperlinkImpl.cpp', "nsMaiInterfaceHyperlinkImpl.cpp",
'nsMaiInterfaceHypertext.cpp', "nsMaiInterfaceHypertext.cpp",
'nsMaiInterfaceImage.cpp', "nsMaiInterfaceImage.cpp",
'nsMaiInterfaceSelection.cpp', "nsMaiInterfaceSelection.cpp",
'nsMaiInterfaceTable.cpp', "nsMaiInterfaceTable.cpp",
'nsMaiInterfaceTableCell.cpp', "nsMaiInterfaceTableCell.cpp",
'nsMaiInterfaceText.cpp', "nsMaiInterfaceText.cpp",
'nsMaiInterfaceValue.cpp', "nsMaiInterfaceValue.cpp",
'Platform.cpp', "Platform.cpp",
'RootAccessibleWrap.cpp', "RootAccessibleWrap.cpp",
'UtilInterface.cpp', "UtilInterface.cpp",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/base', "/accessible/base",
'/accessible/generic', "/accessible/generic",
'/accessible/html', "/accessible/html",
'/accessible/ipc', "/accessible/ipc",
'/accessible/ipc/other', "/accessible/ipc/other",
'/accessible/xpcom', "/accessible/xpcom",
'/accessible/xul', "/accessible/xul",
'/other-licenses/atk-1.0', "/other-licenses/atk-1.0",
] ]
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk': if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
CFLAGS += CONFIG['TK_CFLAGS'] CFLAGS += CONFIG["TK_CFLAGS"]
CXXFLAGS += CONFIG['TK_CFLAGS'] CXXFLAGS += CONFIG["TK_CFLAGS"]
if CONFIG['MOZ_ENABLE_DBUS']: if CONFIG["MOZ_ENABLE_DBUS"]:
CXXFLAGS += CONFIG['MOZ_DBUS_CFLAGS'] CXXFLAGS += CONFIG["MOZ_DBUS_CFLAGS"]
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")
if CONFIG['CC_TYPE'] in ('clang', 'gcc'): if CONFIG["CC_TYPE"] in ("clang", "gcc"):
# Used in G_DEFINE_TYPE_EXTENDED macro, probably fixed in newer glib / # Used in G_DEFINE_TYPE_EXTENDED macro, probably fixed in newer glib /
# gobject headers. See bug 1243331 comment 3. # gobject headers. See bug 1243331 comment 3.
CXXFLAGS += [ CXXFLAGS += [
'-Wno-error=unused-function', "-Wno-error=unused-function",
'-Wno-error=shadow', "-Wno-error=shadow",
'-Wno-unused-local-typedefs', "-Wno-unused-local-typedefs",
] ]

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

@ -4,117 +4,114 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXPORTS += [ EXPORTS += ["AccEvent.h", "nsAccessibilityService.h"]
'AccEvent.h',
'nsAccessibilityService.h'
]
EXPORTS.mozilla.a11y += [ EXPORTS.mozilla.a11y += [
'AccTypes.h', "AccTypes.h",
'DocManager.h', "DocManager.h",
'FocusManager.h', "FocusManager.h",
'IDSet.h', "IDSet.h",
'Platform.h', "Platform.h",
'RelationType.h', "RelationType.h",
'Role.h', "Role.h",
'SelectionManager.h', "SelectionManager.h",
'States.h', "States.h",
] ]
if CONFIG['MOZ_DEBUG']: if CONFIG["MOZ_DEBUG"]:
EXPORTS.mozilla.a11y += [ EXPORTS.mozilla.a11y += [
'Logging.h', "Logging.h",
] ]
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'AccessibleOrProxy.cpp', "AccessibleOrProxy.cpp",
'AccEvent.cpp', "AccEvent.cpp",
'AccGroupInfo.cpp', "AccGroupInfo.cpp",
'AccIterator.cpp', "AccIterator.cpp",
'ARIAMap.cpp', "ARIAMap.cpp",
'ARIAStateMap.cpp', "ARIAStateMap.cpp",
'Asserts.cpp', "Asserts.cpp",
'DocManager.cpp', "DocManager.cpp",
'EmbeddedObjCollector.cpp', "EmbeddedObjCollector.cpp",
'EventQueue.cpp', "EventQueue.cpp",
'EventTree.cpp', "EventTree.cpp",
'Filters.cpp', "Filters.cpp",
'FocusManager.cpp', "FocusManager.cpp",
'NotificationController.cpp', "NotificationController.cpp",
'nsAccessibilityService.cpp', "nsAccessibilityService.cpp",
'nsAccessiblePivot.cpp', "nsAccessiblePivot.cpp",
'nsAccUtils.cpp', "nsAccUtils.cpp",
'nsCoreUtils.cpp', "nsCoreUtils.cpp",
'nsEventShell.cpp', "nsEventShell.cpp",
'nsTextEquivUtils.cpp', "nsTextEquivUtils.cpp",
'Pivot.cpp', "Pivot.cpp",
'SelectionManager.cpp', "SelectionManager.cpp",
'StyleInfo.cpp', "StyleInfo.cpp",
'TextAttrs.cpp', "TextAttrs.cpp",
'TextRange.cpp', "TextRange.cpp",
'TextUpdater.cpp', "TextUpdater.cpp",
'TreeWalker.cpp', "TreeWalker.cpp",
] ]
if CONFIG['A11Y_LOG']: if CONFIG["A11Y_LOG"]:
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'Logging.cpp', "Logging.cpp",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/generic', "/accessible/generic",
'/accessible/html', "/accessible/html",
'/accessible/ipc', "/accessible/ipc",
'/dom/base', "/dom/base",
'/dom/xul', "/dom/xul",
] ]
if CONFIG['OS_ARCH'] == 'WINNT': if CONFIG["OS_ARCH"] == "WINNT":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/ipc/win', "/accessible/ipc/win",
] ]
else: else:
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/ipc/other', "/accessible/ipc/other",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/xpcom', "/accessible/xpcom",
'/accessible/xul', "/accessible/xul",
'/dom/base', "/dom/base",
'/ipc/chromium/src', "/ipc/chromium/src",
'/layout/generic', "/layout/generic",
'/layout/style', "/layout/style",
'/layout/xul', "/layout/xul",
'/layout/xul/tree/', "/layout/xul/tree/",
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk': if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/atk', "/accessible/atk",
] ]
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/windows/ia2', "/accessible/windows/ia2",
'/accessible/windows/msaa', "/accessible/windows/msaa",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/mac', "/accessible/mac",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/android', "/accessible/android",
] ]
else: else:
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/other', "/accessible/other",
] ]
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")
if CONFIG['CC_TYPE'] in ('clang', 'gcc'): if CONFIG["CC_TYPE"] in ("clang", "gcc"):
CXXFLAGS += ['-Wno-error=shadow'] CXXFLAGS += ["-Wno-error=shadow"]

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

@ -5,73 +5,73 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXPORTS.mozilla.a11y += [ EXPORTS.mozilla.a11y += [
'Accessible.h', "Accessible.h",
'DocAccessible.h', "DocAccessible.h",
'HyperTextAccessible.h', "HyperTextAccessible.h",
'OuterDocAccessible.h', "OuterDocAccessible.h",
] ]
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'Accessible.cpp', "Accessible.cpp",
'ApplicationAccessible.cpp', "ApplicationAccessible.cpp",
'ARIAGridAccessible.cpp', "ARIAGridAccessible.cpp",
'BaseAccessibles.cpp', "BaseAccessibles.cpp",
'DocAccessible.cpp', "DocAccessible.cpp",
'FormControlAccessible.cpp', "FormControlAccessible.cpp",
'HyperTextAccessible.cpp', "HyperTextAccessible.cpp",
'ImageAccessible.cpp', "ImageAccessible.cpp",
'OuterDocAccessible.cpp', "OuterDocAccessible.cpp",
'RootAccessible.cpp', "RootAccessible.cpp",
'TableAccessible.cpp', "TableAccessible.cpp",
'TableCellAccessible.cpp', "TableCellAccessible.cpp",
'TextLeafAccessible.cpp', "TextLeafAccessible.cpp",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/base', "/accessible/base",
'/accessible/html', "/accessible/html",
'/accessible/xpcom', "/accessible/xpcom",
'/accessible/xul', "/accessible/xul",
'/dom/base', "/dom/base",
'/dom/xul', "/dom/xul",
'/layout/generic', "/layout/generic",
'/layout/xul', "/layout/xul",
] ]
if CONFIG['OS_ARCH'] == 'WINNT': if CONFIG["OS_ARCH"] == "WINNT":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/ipc/win', "/accessible/ipc/win",
] ]
else: else:
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/ipc/other', "/accessible/ipc/other",
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk': if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/atk', "/accessible/atk",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/windows/ia2', "/accessible/windows/ia2",
'/accessible/windows/msaa', "/accessible/windows/msaa",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/mac', "/accessible/mac",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/android', "/accessible/android",
] ]
else: else:
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/other', "/accessible/other",
] ]
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")
if CONFIG['CC_TYPE'] in ('clang', 'gcc'): if CONFIG["CC_TYPE"] in ("clang", "gcc"):
CXXFLAGS += ['-Wno-error=shadow'] CXXFLAGS += ["-Wno-error=shadow"]

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

@ -5,51 +5,51 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'HTMLCanvasAccessible.cpp', "HTMLCanvasAccessible.cpp",
'HTMLElementAccessibles.cpp', "HTMLElementAccessibles.cpp",
'HTMLFormControlAccessible.cpp', "HTMLFormControlAccessible.cpp",
'HTMLImageMapAccessible.cpp', "HTMLImageMapAccessible.cpp",
'HTMLLinkAccessible.cpp', "HTMLLinkAccessible.cpp",
'HTMLListAccessible.cpp', "HTMLListAccessible.cpp",
'HTMLSelectAccessible.cpp', "HTMLSelectAccessible.cpp",
'HTMLTableAccessible.cpp', "HTMLTableAccessible.cpp",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/base', "/accessible/base",
'/accessible/generic', "/accessible/generic",
'/accessible/xpcom', "/accessible/xpcom",
'/layout/forms', "/layout/forms",
'/layout/generic', "/layout/generic",
'/layout/tables', "/layout/tables",
'/layout/xul', "/layout/xul",
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk': if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/atk', "/accessible/atk",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/windows/ia2', "/accessible/windows/ia2",
'/accessible/windows/msaa', "/accessible/windows/msaa",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/mac', "/accessible/mac",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/android', "/accessible/android",
] ]
else: else:
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/other', "/accessible/other",
] ]
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"
if CONFIG['CC_TYPE'] in ('clang', 'gcc'): if CONFIG["CC_TYPE"] in ("clang", "gcc"):
CXXFLAGS += ['-Wno-error=shadow'] CXXFLAGS += ["-Wno-error=shadow"]

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

@ -4,30 +4,36 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
GeneratedFile('IGeckoCustom.h', 'IGeckoCustom_p.c', 'IGeckoCustom_i.c', GeneratedFile(
'IGeckoCustom_dlldata.c', 'IGeckoCustom.tlb', "IGeckoCustom.h",
inputs=['IGeckoCustom.idl'], "IGeckoCustom_p.c",
script='/build/midl.py', entry_point='midl', "IGeckoCustom_i.c",
flags=['-dlldata', OBJDIR + '/IGeckoCustom_dlldata.c']) "IGeckoCustom_dlldata.c",
"IGeckoCustom.tlb",
inputs=["IGeckoCustom.idl"],
script="/build/midl.py",
entry_point="midl",
flags=["-dlldata", OBJDIR + "/IGeckoCustom_dlldata.c"],
)
SOURCES += [ SOURCES += [
'!IGeckoCustom_dlldata.c', "!IGeckoCustom_dlldata.c",
'!IGeckoCustom_i.c', "!IGeckoCustom_i.c",
'!IGeckoCustom_p.c', "!IGeckoCustom_p.c",
] ]
EXPORTS += [ EXPORTS += [
'!IGeckoCustom.h', "!IGeckoCustom.h",
'!IGeckoCustom_i.c', "!IGeckoCustom_i.c",
] ]
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"
# Suppress warnings from the MIDL generated code. # Suppress warnings from the MIDL generated code.
if CONFIG['CC_TYPE'] == 'clang-cl': if CONFIG["CC_TYPE"] == "clang-cl":
CFLAGS += [ CFLAGS += [
'-Wno-extern-initializer', "-Wno-extern-initializer",
'-Wno-incompatible-pointer-types', "-Wno-incompatible-pointer-types",
'-Wno-missing-braces', "-Wno-missing-braces",
'-Wno-unused-const-variable', "-Wno-unused-const-variable",
] ]

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

@ -4,94 +4,128 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
GeckoSharedLibrary('IA2Marshal', linkage=None) GeckoSharedLibrary("IA2Marshal", linkage=None)
DEFINES['REGISTER_PROXY_DLL'] = True DEFINES["REGISTER_PROXY_DLL"] = True
DEFFILE = 'IA2Marshal.def' DEFFILE = "IA2Marshal.def"
OS_LIBS += [ OS_LIBS += [
'uuid', "uuid",
'kernel32', "kernel32",
'rpcrt4', "rpcrt4",
'ole32', "ole32",
'oleaut32', "oleaut32",
] ]
midl_enums = [ midl_enums = [
'AccessibleEventId', "AccessibleEventId",
'AccessibleRole', "AccessibleRole",
'AccessibleStates', "AccessibleStates",
'IA2CommonTypes', "IA2CommonTypes",
] ]
midl_interfaces = [ midl_interfaces = [
'Accessible2', "Accessible2",
'Accessible2_2', "Accessible2_2",
'Accessible2_3', "Accessible2_3",
'AccessibleAction', "AccessibleAction",
'AccessibleApplication', "AccessibleApplication",
'AccessibleComponent', "AccessibleComponent",
'AccessibleDocument', "AccessibleDocument",
'AccessibleEditableText', "AccessibleEditableText",
'AccessibleHyperlink', "AccessibleHyperlink",
'AccessibleHypertext', "AccessibleHypertext",
'AccessibleHypertext2', "AccessibleHypertext2",
'AccessibleImage', "AccessibleImage",
'AccessibleRelation', "AccessibleRelation",
'AccessibleTable', "AccessibleTable",
'AccessibleTable2', "AccessibleTable2",
'AccessibleTableCell', "AccessibleTableCell",
'AccessibleText', "AccessibleText",
'AccessibleText2', "AccessibleText2",
'AccessibleValue', "AccessibleValue",
] ]
for enum in midl_enums: for enum in midl_enums:
GeneratedFile(enum + '.h', inputs=['/other-licenses/ia2/' + enum + '.idl'], GeneratedFile(
script='/build/midl.py', entry_point='midl', enum + ".h",
flags=['-app_config', '-I', TOPSRCDIR + '/other-licenses/ia2']) inputs=["/other-licenses/ia2/" + enum + ".idl"],
script="/build/midl.py",
entry_point="midl",
flags=["-app_config", "-I", TOPSRCDIR + "/other-licenses/ia2"],
)
EXPORTS += ['!' + enum + '.h'] EXPORTS += ["!" + enum + ".h"]
for iface in midl_interfaces: for iface in midl_interfaces:
GeneratedFile(iface + '.h', iface + '_p.c', iface + '_i.c', iface + '_dlldata.c', GeneratedFile(
inputs=['/other-licenses/ia2/' + iface + '.idl'], iface + ".h",
script='/build/midl.py', entry_point='midl', iface + "_p.c",
flags=['-app_config', '-I', TOPSRCDIR + '/other-licenses/ia2', iface + "_i.c",
'-dlldata', OBJDIR + '/' + iface + '_dlldata.c']) iface + "_dlldata.c",
inputs=["/other-licenses/ia2/" + iface + ".idl"],
script="/build/midl.py",
entry_point="midl",
flags=[
"-app_config",
"-I",
TOPSRCDIR + "/other-licenses/ia2",
"-dlldata",
OBJDIR + "/" + iface + "_dlldata.c",
],
)
EXPORTS += ['!' + iface + '.h', '!' + iface + '_i.c'] EXPORTS += ["!" + iface + ".h", "!" + iface + "_i.c"]
for p in [iface + '_p.c', iface + '_i.c']: for p in [iface + "_p.c", iface + "_i.c"]:
SOURCES += ['!%s' % p] SOURCES += ["!%s" % p]
# Give some symbols a unique name in each translation unit, to avoid # Give some symbols a unique name in each translation unit, to avoid
# collisions caused by https://llvm.org/pr41817. # collisions caused by https://llvm.org/pr41817.
if CONFIG['CC_TYPE'] == 'clang-cl': if CONFIG["CC_TYPE"] == "clang-cl":
SOURCES['!%s' % p].flags += ['-DObject_StubDesc=Object_StubDesc__%s' % p[:-2]] SOURCES["!%s" % p].flags += [
SOURCES['!%s' % p].flags += ['-DUserMarshalRoutines=UserMarshalRoutines__%s' % p[:-2]] "-DObject_StubDesc=Object_StubDesc__%s" % p[:-2]
]
SOURCES["!%s" % p].flags += [
"-DUserMarshalRoutines=UserMarshalRoutines__%s" % p[:-2]
]
# Warning: the build system doesn't know about the dependency of IA2Marshal.rc on # Warning: the build system doesn't know about the dependency of IA2Marshal.rc on
# IA2Typelib.tlb. We rely on the IA2Typelib.h output forcing the command to run # IA2Typelib.tlb. We rely on the IA2Typelib.h output forcing the command to run
# during export, before rc files are treated during compile. # during export, before rc files are treated during compile.
GeneratedFile('IA2Typelib.h', 'IA2Typelib_i.c', 'IA2Typelib.tlb', GeneratedFile(
inputs=['IA2Typelib.idl'], script='/build/midl.py', entry_point='midl', "IA2Typelib.h",
flags=['-app_config', '-I', TOPSRCDIR + '/other-licenses/ia2', "IA2Typelib_i.c",
'-D', '_MIDL_DECLARE_WIREM_HANDLE']) "IA2Typelib.tlb",
inputs=["IA2Typelib.idl"],
script="/build/midl.py",
entry_point="midl",
flags=[
"-app_config",
"-I",
TOPSRCDIR + "/other-licenses/ia2",
"-D",
"_MIDL_DECLARE_WIREM_HANDLE",
],
)
GeneratedFile('dlldata.c', inputs=['!' + iface + '_dlldata.c' for iface in midl_interfaces], GeneratedFile(
script='/build/midl.py', entry_point='merge_dlldata') "dlldata.c",
inputs=["!" + iface + "_dlldata.c" for iface in midl_interfaces],
script="/build/midl.py",
entry_point="merge_dlldata",
)
SOURCES += ['!dlldata.c'] SOURCES += ["!dlldata.c"]
RCINCLUDE = 'IA2Marshal.rc' RCINCLUDE = "IA2Marshal.rc"
# Suppress warnings from the MIDL generated code. # Suppress warnings from the MIDL generated code.
if CONFIG['CC_TYPE'] == 'clang-cl': if CONFIG["CC_TYPE"] == "clang-cl":
CFLAGS += [ CFLAGS += [
'-Wno-extern-initializer', "-Wno-extern-initializer",
'-Wno-incompatible-pointer-types', "-Wno-incompatible-pointer-types",
'-Wno-missing-braces', "-Wno-missing-braces",
'-Wno-unused-const-variable', "-Wno-unused-const-variable",
] ]

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

@ -4,42 +4,42 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows' and CONFIG['COMPILE_ENVIRONMENT']: if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows" and CONFIG["COMPILE_ENVIRONMENT"]:
DIRS += ['gecko', 'msaa', 'ia2'] DIRS += ["gecko", "msaa", "ia2"]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
XPIDL_SOURCES += ['nsIAccessibleMacInterface.idl'] XPIDL_SOURCES += ["nsIAccessibleMacInterface.idl"]
XPIDL_SOURCES += [ XPIDL_SOURCES += [
'nsIAccessibilityService.idl', "nsIAccessibilityService.idl",
'nsIAccessible.idl', "nsIAccessible.idl",
'nsIAccessibleAnnouncementEvent.idl', "nsIAccessibleAnnouncementEvent.idl",
'nsIAccessibleApplication.idl', "nsIAccessibleApplication.idl",
'nsIAccessibleCaretMoveEvent.idl', "nsIAccessibleCaretMoveEvent.idl",
'nsIAccessibleDocument.idl', "nsIAccessibleDocument.idl",
'nsIAccessibleEditableText.idl', "nsIAccessibleEditableText.idl",
'nsIAccessibleEvent.idl', "nsIAccessibleEvent.idl",
'nsIAccessibleHideEvent.idl', "nsIAccessibleHideEvent.idl",
'nsIAccessibleHyperLink.idl', "nsIAccessibleHyperLink.idl",
'nsIAccessibleHyperText.idl', "nsIAccessibleHyperText.idl",
'nsIAccessibleImage.idl', "nsIAccessibleImage.idl",
'nsIAccessibleObjectAttributeChangedEvent.idl', "nsIAccessibleObjectAttributeChangedEvent.idl",
'nsIAccessiblePivot.idl', "nsIAccessiblePivot.idl",
'nsIAccessibleRelation.idl', "nsIAccessibleRelation.idl",
'nsIAccessibleRole.idl', "nsIAccessibleRole.idl",
'nsIAccessibleScrollingEvent.idl', "nsIAccessibleScrollingEvent.idl",
'nsIAccessibleSelectable.idl', "nsIAccessibleSelectable.idl",
'nsIAccessibleStateChangeEvent.idl', "nsIAccessibleStateChangeEvent.idl",
'nsIAccessibleStates.idl', "nsIAccessibleStates.idl",
'nsIAccessibleTable.idl', "nsIAccessibleTable.idl",
'nsIAccessibleTableChangeEvent.idl', "nsIAccessibleTableChangeEvent.idl",
'nsIAccessibleText.idl', "nsIAccessibleText.idl",
'nsIAccessibleTextChangeEvent.idl', "nsIAccessibleTextChangeEvent.idl",
'nsIAccessibleTextRange.idl', "nsIAccessibleTextRange.idl",
'nsIAccessibleTextSelectionChangeEvent.idl', "nsIAccessibleTextSelectionChangeEvent.idl",
'nsIAccessibleTypes.idl', "nsIAccessibleTypes.idl",
'nsIAccessibleValue.idl', "nsIAccessibleValue.idl",
'nsIAccessibleVirtualCursorChangeEvent.idl', "nsIAccessibleVirtualCursorChangeEvent.idl",
] ]
XPIDL_MODULE = 'accessibility' XPIDL_MODULE = "accessibility"

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

@ -4,48 +4,54 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
GeckoSharedLibrary('AccessibleMarshal', linkage=None) GeckoSharedLibrary("AccessibleMarshal", linkage=None)
# Missing here, is the notion that changes to the idl files included by # Missing here, is the notion that changes to the idl files included by
# ISimpleDOM.idl (e.g. ISimpleDOMNode.idl) should rebuild the outputs. # ISimpleDOM.idl (e.g. ISimpleDOMNode.idl) should rebuild the outputs.
GeneratedFile('ISimpleDOM.h', 'ISimpleDOM_p.c', 'ISimpleDOM_i.c', GeneratedFile(
'ISimpleDOM_dlldata.c', 'ISimpleDOM.tlb', "ISimpleDOM.h",
inputs=['ISimpleDOM.idl'], "ISimpleDOM_p.c",
script='/build/midl.py', entry_point='midl', "ISimpleDOM_i.c",
flags=['-I', SRCDIR, '-robust', '-dlldata', OBJDIR + '/ISimpleDOM_dlldata.c']) "ISimpleDOM_dlldata.c",
"ISimpleDOM.tlb",
inputs=["ISimpleDOM.idl"],
script="/build/midl.py",
entry_point="midl",
flags=["-I", SRCDIR, "-robust", "-dlldata", OBJDIR + "/ISimpleDOM_dlldata.c"],
)
SOURCES += [ SOURCES += [
'!ISimpleDOM_dlldata.c', "!ISimpleDOM_dlldata.c",
'!ISimpleDOM_i.c', "!ISimpleDOM_i.c",
'!ISimpleDOM_p.c', "!ISimpleDOM_p.c",
'AccessibleMarshalThunk.c', "AccessibleMarshalThunk.c",
] ]
EXPORTS += [ EXPORTS += [
'!ISimpleDOM.h', "!ISimpleDOM.h",
'!ISimpleDOM_i.c', "!ISimpleDOM_i.c",
] ]
DEFINES['REGISTER_PROXY_DLL'] = True DEFINES["REGISTER_PROXY_DLL"] = True
# The following line is required to preserve compatibility with older versions # The following line is required to preserve compatibility with older versions
# of AccessibleMarshal.dll. # of AccessibleMarshal.dll.
DEFINES['PROXY_CLSID'] = 'IID_ISimpleDOMNode' DEFINES["PROXY_CLSID"] = "IID_ISimpleDOMNode"
DEFFILE = 'AccessibleMarshal.def' DEFFILE = "AccessibleMarshal.def"
OS_LIBS += [ OS_LIBS += [
'kernel32', "kernel32",
'rpcrt4', "rpcrt4",
'oleaut32', "oleaut32",
] ]
RCINCLUDE = 'AccessibleMarshal.rc' RCINCLUDE = "AccessibleMarshal.rc"
# Suppress warnings from the MIDL generated code. # Suppress warnings from the MIDL generated code.
if CONFIG['CC_TYPE'] == 'clang-cl': if CONFIG["CC_TYPE"] == "clang-cl":
CFLAGS += [ CFLAGS += [
'-Wno-extern-initializer', "-Wno-extern-initializer",
'-Wno-incompatible-pointer-types', "-Wno-incompatible-pointer-types",
'-Wno-missing-braces', "-Wno-missing-braces",
'-Wno-unused-const-variable', "-Wno-unused-const-variable",
] ]

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

@ -4,26 +4,26 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
if CONFIG['ACCESSIBILITY']: if CONFIG["ACCESSIBILITY"]:
IPDL_SOURCES += ['PDocAccessiblePlatformExt.ipdl'] IPDL_SOURCES += ["PDocAccessiblePlatformExt.ipdl"]
EXPORTS.mozilla.a11y += [ EXPORTS.mozilla.a11y += [
'DocAccessiblePlatformExtChild.h', "DocAccessiblePlatformExtChild.h",
'DocAccessiblePlatformExtParent.h', "DocAccessiblePlatformExtParent.h",
] ]
SOURCES += [ SOURCES += [
'DocAccessiblePlatformExtChild.cpp', "DocAccessiblePlatformExtChild.cpp",
'DocAccessiblePlatformExtParent.cpp', "DocAccessiblePlatformExtParent.cpp",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/android', "/accessible/android",
'/accessible/generic', "/accessible/generic",
'/accessible/ipc/other', "/accessible/ipc/other",
'/widget/android', "/widget/android",
] ]
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"

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

@ -4,25 +4,25 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
if CONFIG['ACCESSIBILITY']: if CONFIG["ACCESSIBILITY"]:
IPDL_SOURCES += ['PDocAccessiblePlatformExt.ipdl'] IPDL_SOURCES += ["PDocAccessiblePlatformExt.ipdl"]
EXPORTS.mozilla.a11y += [ EXPORTS.mozilla.a11y += [
'DocAccessiblePlatformExtChild.h', "DocAccessiblePlatformExtChild.h",
'DocAccessiblePlatformExtParent.h', "DocAccessiblePlatformExtParent.h",
] ]
SOURCES += [ SOURCES += [
'DocAccessiblePlatformExtChild.cpp', "DocAccessiblePlatformExtChild.cpp",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/base', "/accessible/base",
'/accessible/generic', "/accessible/generic",
'/accessible/ipc/other', "/accessible/ipc/other",
'/accessible/mac', "/accessible/mac",
] ]
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"

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

@ -4,11 +4,11 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
toolkit = CONFIG['MOZ_WIDGET_TOOLKIT'] toolkit = CONFIG["MOZ_WIDGET_TOOLKIT"]
if toolkit == 'android': if toolkit == "android":
DIRS += ['android'] DIRS += ["android"]
elif toolkit == 'cocoa': elif toolkit == "cocoa":
DIRS += ['mac'] DIRS += ["mac"]
else: else:
DIRS += ['other'] DIRS += ["other"]

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

@ -4,14 +4,14 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
if CONFIG['ACCESSIBILITY']: if CONFIG["ACCESSIBILITY"]:
IPDL_SOURCES += ['PDocAccessiblePlatformExt.ipdl'] IPDL_SOURCES += ["PDocAccessiblePlatformExt.ipdl"]
EXPORTS.mozilla.a11y += [ EXPORTS.mozilla.a11y += [
'DocAccessiblePlatformExtChild.h', "DocAccessiblePlatformExtChild.h",
'DocAccessiblePlatformExtParent.h', "DocAccessiblePlatformExtParent.h",
] ]
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"

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

@ -4,65 +4,65 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
if CONFIG['OS_ARCH'] == 'WINNT': if CONFIG["OS_ARCH"] == "WINNT":
DIRS += ['win'] DIRS += ["win"]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/ipc/win', "/accessible/ipc/win",
'/accessible/windows/ia2', "/accessible/windows/ia2",
'/accessible/windows/msaa', "/accessible/windows/msaa",
] ]
else: else:
DIRS += ['other', 'extension'] DIRS += ["other", "extension"]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/ipc/other', "/accessible/ipc/other",
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk': if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/atk', "/accessible/atk",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/mac', "/accessible/mac",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/android', "/accessible/android",
] ]
else: else:
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/other', "/accessible/other",
] ]
EXPORTS.mozilla.a11y += [ EXPORTS.mozilla.a11y += [
'IPCTypes.h', "IPCTypes.h",
] ]
if CONFIG['CC_TYPE'] in ('clang', 'gcc'): if CONFIG["CC_TYPE"] in ("clang", "gcc"):
CXXFLAGS += ['-Wno-error=shadow'] CXXFLAGS += ["-Wno-error=shadow"]
if CONFIG['ACCESSIBILITY']: if CONFIG["ACCESSIBILITY"]:
EXPORTS.mozilla.a11y += [ EXPORTS.mozilla.a11y += [
'DocAccessibleChildBase.h', "DocAccessibleChildBase.h",
'DocAccessibleParent.h', "DocAccessibleParent.h",
'ProxyAccessibleBase.h', "ProxyAccessibleBase.h",
'ProxyAccessibleShared.h', "ProxyAccessibleShared.h",
] ]
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'DocAccessibleChildBase.cpp', "DocAccessibleChildBase.cpp",
'DocAccessibleParent.cpp', "DocAccessibleParent.cpp",
'ProxyAccessibleBase.cpp', "ProxyAccessibleBase.cpp",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/base', "/accessible/base",
'/accessible/generic', "/accessible/generic",
'/accessible/xpcom', "/accessible/xpcom",
] ]
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"
# Add libFuzzer configuration directives # Add libFuzzer configuration directives
include('/tools/fuzzing/libfuzzer-config.mozbuild') include("/tools/fuzzing/libfuzzer-config.mozbuild")

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

@ -5,48 +5,48 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
if CONFIG['ACCESSIBILITY']: if CONFIG["ACCESSIBILITY"]:
IPDL_SOURCES += ['PDocAccessible.ipdl'] IPDL_SOURCES += ["PDocAccessible.ipdl"]
EXPORTS.mozilla.a11y += [ EXPORTS.mozilla.a11y += [
'DocAccessibleChild.h', "DocAccessibleChild.h",
'ProxyAccessible.h', "ProxyAccessible.h",
] ]
SOURCES += [ SOURCES += [
'DocAccessibleChild.cpp', "DocAccessibleChild.cpp",
'ProxyAccessible.cpp', "ProxyAccessible.cpp",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'../../base', "../../base",
'../../generic', "../../generic",
'../../xpcom', "../../xpcom",
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk': if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/atk', "/accessible/atk",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/mac', "/accessible/mac",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/android', "/accessible/android",
] ]
else: else:
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/other', "/accessible/other",
] ]
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")
# Add libFuzzer configuration directives # Add libFuzzer configuration directives
include('/tools/fuzzing/libfuzzer-config.mozbuild') include("/tools/fuzzing/libfuzzer-config.mozbuild")
if CONFIG['CC_TYPE'] in ('clang', 'gcc'): if CONFIG["CC_TYPE"] in ("clang", "gcc"):
CXXFLAGS += ['-Wno-error=shadow'] CXXFLAGS += ["-Wno-error=shadow"]
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"

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

@ -4,16 +4,16 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
SharedLibrary('AccessibleHandler') SharedLibrary("AccessibleHandler")
EXPORTS.mozilla.a11y += [ EXPORTS.mozilla.a11y += [
'AccessibleHandler.h', "AccessibleHandler.h",
'HandlerDataCleanup.h', "HandlerDataCleanup.h",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/interfaces/ia2', "/accessible/interfaces/ia2",
'/ipc/mscom/oop', "/ipc/mscom/oop",
] ]
# We want to generate distinct UUIDs on a per-channel basis, so we need # We want to generate distinct UUIDs on a per-channel basis, so we need
@ -21,79 +21,103 @@ LOCAL_INCLUDES += [
# These defines allow us to separate local builds from automated builds, # These defines allow us to separate local builds from automated builds,
# as well as separate beta from release. # as well as separate beta from release.
flags = [] flags = []
if CONFIG['MOZ_UPDATE_CHANNEL'] == 'default': if CONFIG["MOZ_UPDATE_CHANNEL"] == "default":
flags += ['-DUSE_LOCAL_UUID'] flags += ["-DUSE_LOCAL_UUID"]
elif CONFIG['MOZ_UPDATE_CHANNEL'] == 'beta': elif CONFIG["MOZ_UPDATE_CHANNEL"] == "beta":
flags += ['-DUSE_BETA_UUID'] flags += ["-DUSE_BETA_UUID"]
GeneratedFile('HandlerData.h', 'HandlerData_p.c', 'HandlerData_i.c', 'HandlerData_c.c', GeneratedFile(
'HandlerData_dlldata.c', 'HandlerData.tlb', "HandlerData.h",
inputs=['HandlerData.idl'], "HandlerData_p.c",
script='/build/midl.py', entry_point='midl', "HandlerData_i.c",
flags=flags + ['-I', TOPOBJDIR, '-I', TOPOBJDIR + '/dist/include', "HandlerData_c.c",
'-I', TOPSRCDIR + '/other-licenses/ia2', '-I', SRCDIR, "HandlerData_dlldata.c",
'-acf', SRCDIR + '/HandlerData.acf', "HandlerData.tlb",
'-dlldata', OBJDIR + '/HandlerData_dlldata.c']) inputs=["HandlerData.idl"],
script="/build/midl.py",
entry_point="midl",
flags=flags
+ [
"-I",
TOPOBJDIR,
"-I",
TOPOBJDIR + "/dist/include",
"-I",
TOPSRCDIR + "/other-licenses/ia2",
"-I",
SRCDIR,
"-acf",
SRCDIR + "/HandlerData.acf",
"-dlldata",
OBJDIR + "/HandlerData_dlldata.c",
],
)
SOURCES += [ SOURCES += [
'!HandlerData_c.c', "!HandlerData_c.c",
'!HandlerData_dlldata.c', "!HandlerData_dlldata.c",
'!HandlerData_i.c', "!HandlerData_i.c",
'!HandlerData_p.c', "!HandlerData_p.c",
'AccessibleHandler.cpp', "AccessibleHandler.cpp",
'AccessibleHandlerControl.cpp', "AccessibleHandlerControl.cpp",
'HandlerChildEnumerator.cpp', "HandlerChildEnumerator.cpp",
'HandlerRelation.cpp', "HandlerRelation.cpp",
'HandlerTextLeaf.cpp', "HandlerTextLeaf.cpp",
] ]
EXPORTS += [ EXPORTS += [
'!HandlerData.h', "!HandlerData.h",
'!HandlerData_i.c', "!HandlerData_i.c",
] ]
# Give some symbols a unique name in each translation unit, to avoid # Give some symbols a unique name in each translation unit, to avoid
# collisions caused by https://llvm.org/pr41817. # collisions caused by https://llvm.org/pr41817.
if CONFIG['CC_TYPE'] == 'clang-cl': if CONFIG["CC_TYPE"] == "clang-cl":
SOURCES['!HandlerData_p.c'].flags += ['-DHandlerData__MIDL_ProcFormatString=HandlerData__MIDL_ProcFormatString__HandlerData_p'] SOURCES["!HandlerData_p.c"].flags += [
SOURCES['!HandlerData_p.c'].flags += ['-DHandlerData__MIDL_TypeFormatString=HandlerData__MIDL_TypeFormatString__HandlerData_p'] "-DHandlerData__MIDL_ProcFormatString=HandlerData__MIDL_ProcFormatString__HandlerData_p"
for p in ('dlldata', 'c', 'i', 'p'): ]
SOURCES['!HandlerData_%s.c' % p].flags += ['-DUserMarshalRoutines=UserMarshalRoutines__HandlerData_%s' % p] SOURCES["!HandlerData_p.c"].flags += [
"-DHandlerData__MIDL_TypeFormatString=HandlerData__MIDL_TypeFormatString__HandlerData_p"
]
for p in ("dlldata", "c", "i", "p"):
SOURCES["!HandlerData_%s.c" % p].flags += [
"-DUserMarshalRoutines=UserMarshalRoutines__HandlerData_%s" % p
]
DEFFILE = 'AccessibleHandler.def' DEFFILE = "AccessibleHandler.def"
USE_LIBS += [ USE_LIBS += [
'mscom_oop', "mscom_oop",
] ]
OS_LIBS += [ OS_LIBS += [
'rpcrt4', "rpcrt4",
'oleacc', "oleacc",
] ]
RCINCLUDE = 'AccessibleHandler.rc' RCINCLUDE = "AccessibleHandler.rc"
# Suppress warnings from the MIDL generated code. # Suppress warnings from the MIDL generated code.
if CONFIG['CC_TYPE'] == 'clang-cl': if CONFIG["CC_TYPE"] == "clang-cl":
CFLAGS += [ CFLAGS += [
'-Wno-extern-initializer', "-Wno-extern-initializer",
'-Wno-incompatible-pointer-types', "-Wno-incompatible-pointer-types",
'-Wno-missing-braces', "-Wno-missing-braces",
'-Wno-unused-const-variable', "-Wno-unused-const-variable",
] ]
# Since we are defining our own COM entry points (DllRegisterServer et al), # Since we are defining our own COM entry points (DllRegisterServer et al),
# but we still want to be able to delegate some work to the generated code, # but we still want to be able to delegate some work to the generated code,
# we add the prefix "Proxy" to all of the generated counterparts. # we add the prefix "Proxy" to all of the generated counterparts.
DEFINES['ENTRY_PREFIX'] = 'Proxy' DEFINES["ENTRY_PREFIX"] = "Proxy"
DEFINES['REGISTER_PROXY_DLL'] = True DEFINES["REGISTER_PROXY_DLL"] = True
LIBRARY_DEFINES['MOZ_MSCOM_REMARSHAL_NO_HANDLER'] = True LIBRARY_DEFINES["MOZ_MSCOM_REMARSHAL_NO_HANDLER"] = True
# This DLL may be loaded into other processes, so we need static libs for # This DLL may be loaded into other processes, so we need static libs for
# Windows 7 and Windows 8. # Windows 7 and Windows 8.
USE_STATIC_LIBS = True USE_STATIC_LIBS = True
LIBRARY_DEFINES['UNICODE'] = True LIBRARY_DEFINES["UNICODE"] = True
LIBRARY_DEFINES['_UNICODE'] = True LIBRARY_DEFINES["_UNICODE"] = True
LIBRARY_DEFINES['MOZ_NO_MOZALLOC'] = True LIBRARY_DEFINES["MOZ_NO_MOZALLOC"] = True
DisableStlWrapping() DisableStlWrapping()

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

@ -4,67 +4,69 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
if CONFIG['COMPILE_ENVIRONMENT'] and CONFIG['ACCESSIBILITY']: if CONFIG["COMPILE_ENVIRONMENT"] and CONFIG["ACCESSIBILITY"]:
DIRS += [ DIRS += [
'handler', "handler",
'typelib', "typelib",
] ]
if CONFIG['ACCESSIBILITY']: if CONFIG["ACCESSIBILITY"]:
IPDL_SOURCES += ['PDocAccessible.ipdl'] IPDL_SOURCES += ["PDocAccessible.ipdl"]
if not CONFIG['HAVE_64BIT_BUILD']: if not CONFIG["HAVE_64BIT_BUILD"]:
EXPORTS += [ EXPORTS += [
'IAccessible32.manifest', "IAccessible32.manifest",
] ]
EXPORTS += [ EXPORTS += [
'IAccessible64.manifest', "IAccessible64.manifest",
] ]
EXPORTS.mozilla.a11y += [ EXPORTS.mozilla.a11y += [
'COMPtrTypes.h', "COMPtrTypes.h",
'DocAccessibleChild.h', "DocAccessibleChild.h",
'HandlerProvider.h', "HandlerProvider.h",
'PlatformChild.h', "PlatformChild.h",
'ProxyAccessible.h' "ProxyAccessible.h",
] ]
SOURCES += [ SOURCES += [
'!./handler/HandlerData_c.c', "!./handler/HandlerData_c.c",
'COMPtrTypes.cpp', "COMPtrTypes.cpp",
'DocAccessibleChild.cpp', "DocAccessibleChild.cpp",
'HandlerProvider.cpp', "HandlerProvider.cpp",
'PlatformChild.cpp', "PlatformChild.cpp",
'ProxyAccessible.cpp', "ProxyAccessible.cpp",
] ]
# Give some symbols a unique name in each translation unit, to avoid # Give some symbols a unique name in each translation unit, to avoid
# collisions caused by https://llvm.org/pr41817. # collisions caused by https://llvm.org/pr41817.
if CONFIG['CC_TYPE'] == 'clang-cl': if CONFIG["CC_TYPE"] == "clang-cl":
SOURCES['!./handler/HandlerData_c.c'].flags += ['-DUserMarshalRoutines=UserMarshalRoutines__HandlerData_c'] SOURCES["!./handler/HandlerData_c.c"].flags += [
"-DUserMarshalRoutines=UserMarshalRoutines__HandlerData_c"
]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/base', "/accessible/base",
'/accessible/generic', "/accessible/generic",
'/accessible/windows/ia2', "/accessible/windows/ia2",
'/accessible/windows/msaa', "/accessible/windows/msaa",
'/accessible/xpcom', "/accessible/xpcom",
] ]
# Suppress warnings from the MIDL generated code. # Suppress warnings from the MIDL generated code.
if CONFIG['CC_TYPE'] == 'clang-cl': if CONFIG["CC_TYPE"] == "clang-cl":
CFLAGS += [ CFLAGS += [
'-Wno-extern-initializer', "-Wno-extern-initializer",
'-Wno-incompatible-pointer-types', "-Wno-incompatible-pointer-types",
'-Wno-missing-braces', "-Wno-missing-braces",
'-Wno-unused-const-variable', "-Wno-unused-const-variable",
] ]
CXXFLAGS += [ CXXFLAGS += [
'-Wno-missing-braces', "-Wno-missing-braces",
] ]
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"

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

@ -5,9 +5,12 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
FINAL_TARGET_FILES += [ FINAL_TARGET_FILES += [
'!Accessible.tlb', "!Accessible.tlb",
] ]
GeneratedFile('Accessible.tlb', GeneratedFile(
inputs=['Accessible.idl'], "Accessible.tlb",
script='/build/midl.py', entry_point='midl') inputs=["Accessible.idl"],
script="/build/midl.py",
entry_point="midl",
)

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

@ -28,8 +28,9 @@ def gen_mm(fd, protocol_file):
fd.write("#import <Foundation/Foundation.h>\n\n") fd.write("#import <Foundation/Foundation.h>\n\n")
fd.write("namespace mozilla {\nnamespace a11y {\nnamespace mac {\n\n") fd.write("namespace mozilla {\nnamespace a11y {\nnamespace mac {\n\n")
sections = re.findall(r"#pragma mark - (\w+)\n(.*?)(?=(?:#pragma mark|@end))", sections = re.findall(
protocol, re.DOTALL) r"#pragma mark - (\w+)\n(.*?)(?=(?:#pragma mark|@end))", protocol, re.DOTALL
)
for name, text in sections: for name, text in sections:
write_map(fd, name, text) write_map(fd, name, text)
@ -38,8 +39,9 @@ def gen_mm(fd, protocol_file):
def gen_h(fd, protocol_file): def gen_h(fd, protocol_file):
protocol = open(protocol_file).read() protocol = open(protocol_file).read()
sections = re.findall(r"#pragma mark - (\w+)\n(.*?)(?=(?:#pragma mark|@end))", sections = re.findall(
protocol, re.DOTALL) r"#pragma mark - (\w+)\n(.*?)(?=(?:#pragma mark|@end))", protocol, re.DOTALL
)
fd.write("/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */\n\n") fd.write("/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */\n\n")
fd.write("#ifndef _MacSelectorMap_H_\n") fd.write("#ifndef _MacSelectorMap_H_\n")
@ -55,6 +57,7 @@ def gen_h(fd, protocol_file):
# For debugging # For debugging
if __name__ == "__main__": if __name__ == "__main__":
import sys import sys
gen_mm(sys.stdout, "accessible/mac/MOXAccessibleProtocol.h") gen_mm(sys.stdout, "accessible/mac/MOXAccessibleProtocol.h")
gen_h(sys.stdout, "accessible/mac/MOXAccessibleProtocol.h") gen_h(sys.stdout, "accessible/mac/MOXAccessibleProtocol.h")

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

@ -5,63 +5,69 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXPORTS += [ EXPORTS += [
'mozAccessibleProtocol.h', "mozAccessibleProtocol.h",
] ]
EXPORTS.mozilla.a11y += [ EXPORTS.mozilla.a11y += [
'AccessibleWrap.h', "AccessibleWrap.h",
'HyperTextAccessibleWrap.h', "HyperTextAccessibleWrap.h",
'RangeTypes.h', "RangeTypes.h",
] ]
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'AccessibleWrap.mm', "AccessibleWrap.mm",
'DocAccessibleWrap.mm', "DocAccessibleWrap.mm",
'GeckoTextMarker.mm', "GeckoTextMarker.mm",
'HyperTextAccessibleWrap.mm', "HyperTextAccessibleWrap.mm",
'MacUtils.mm', "MacUtils.mm",
'MOXAccessibleBase.mm', "MOXAccessibleBase.mm",
'MOXLandmarkAccessibles.mm', "MOXLandmarkAccessibles.mm",
'MOXMathAccessibles.mm', "MOXMathAccessibles.mm",
'MOXSearchInfo.mm', "MOXSearchInfo.mm",
'MOXTextMarkerDelegate.mm', "MOXTextMarkerDelegate.mm",
'MOXWebAreaAccessible.mm', "MOXWebAreaAccessible.mm",
'mozAccessible.mm', "mozAccessible.mm",
'mozActionElements.mm', "mozActionElements.mm",
'mozHTMLAccessible.mm', "mozHTMLAccessible.mm",
'mozRootAccessible.mm', "mozRootAccessible.mm",
'mozSelectableElements.mm', "mozSelectableElements.mm",
'mozTableAccessible.mm', "mozTableAccessible.mm",
'mozTextAccessible.mm', "mozTextAccessible.mm",
'Platform.mm', "Platform.mm",
'RootAccessibleWrap.mm', "RootAccessibleWrap.mm",
'RotorRules.mm', "RotorRules.mm",
] ]
SOURCES += [ SOURCES += [
'!MacSelectorMap.mm', "!MacSelectorMap.mm",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/base', "/accessible/base",
'/accessible/generic', "/accessible/generic",
'/accessible/html', "/accessible/html",
'/accessible/ipc', "/accessible/ipc",
'/accessible/ipc/other', "/accessible/ipc/other",
'/accessible/xul', "/accessible/xul",
'/layout/generic', "/layout/generic",
'/layout/xul', "/layout/xul",
'/widget', "/widget",
'/widget/cocoa', "/widget/cocoa",
] ]
GeneratedFile('MacSelectorMap.h', GeneratedFile(
script='/accessible/mac/SelectorMapGen.py', entry_point='gen_h', "MacSelectorMap.h",
inputs=['MOXAccessibleProtocol.h']) script="/accessible/mac/SelectorMapGen.py",
GeneratedFile('MacSelectorMap.mm', entry_point="gen_h",
script='/accessible/mac/SelectorMapGen.py', entry_point='gen_mm', inputs=["MOXAccessibleProtocol.h"],
inputs=['MOXAccessibleProtocol.h']) )
GeneratedFile(
"MacSelectorMap.mm",
script="/accessible/mac/SelectorMapGen.py",
entry_point="gen_mm",
inputs=["MOXAccessibleProtocol.h"],
)
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")

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

@ -4,46 +4,39 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
toolkit = CONFIG['MOZ_WIDGET_TOOLKIT'] toolkit = CONFIG["MOZ_WIDGET_TOOLKIT"]
if toolkit == 'gtk': if toolkit == "gtk":
DIRS += ['atk'] DIRS += ["atk"]
elif toolkit == 'windows': elif toolkit == "windows":
DIRS += ['windows'] DIRS += ["windows"]
elif toolkit == 'cocoa': elif toolkit == "cocoa":
DIRS += ['mac'] DIRS += ["mac"]
elif toolkit == 'android': elif toolkit == "android":
DIRS += ['android'] DIRS += ["android"]
else: else:
DIRS += ['other'] DIRS += ["other"]
DIRS += [ 'aom', DIRS += ["aom", "base", "generic", "html", "interfaces", "ipc", "xpcom"]
'base',
'generic',
'html',
'interfaces',
'ipc',
'xpcom'
]
if CONFIG['MOZ_XUL']: if CONFIG["MOZ_XUL"]:
DIRS += ['xul'] DIRS += ["xul"]
TEST_DIRS += ['tests/mochitest'] TEST_DIRS += ["tests/mochitest"]
BROWSER_CHROME_MANIFESTS += [ BROWSER_CHROME_MANIFESTS += [
'tests/browser/bounds/browser.ini', "tests/browser/bounds/browser.ini",
'tests/browser/browser.ini', "tests/browser/browser.ini",
'tests/browser/e10s/browser.ini', "tests/browser/e10s/browser.ini",
'tests/browser/events/browser.ini', "tests/browser/events/browser.ini",
'tests/browser/fission/browser.ini', "tests/browser/fission/browser.ini",
'tests/browser/general/browser.ini', "tests/browser/general/browser.ini",
'tests/browser/hittest/browser.ini', "tests/browser/hittest/browser.ini",
'tests/browser/mac/browser.ini', "tests/browser/mac/browser.ini",
'tests/browser/scroll/browser.ini', "tests/browser/scroll/browser.ini",
'tests/browser/states/browser.ini', "tests/browser/states/browser.ini",
'tests/browser/telemetry/browser.ini', "tests/browser/telemetry/browser.ini",
'tests/browser/tree/browser.ini' "tests/browser/tree/browser.ini",
] ]
with Files("**"): with Files("**"):

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

@ -5,23 +5,23 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXPORTS.mozilla.a11y += [ EXPORTS.mozilla.a11y += [
'AccessibleWrap.h', "AccessibleWrap.h",
'HyperTextAccessibleWrap.h', "HyperTextAccessibleWrap.h",
] ]
SOURCES += [ SOURCES += [
'AccessibleWrap.cpp', "AccessibleWrap.cpp",
'Platform.cpp', "Platform.cpp",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/base', "/accessible/base",
'/accessible/generic', "/accessible/generic",
'/accessible/html', "/accessible/html",
'/accessible/xul', "/accessible/xul",
] ]
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"
if CONFIG['CC_TYPE'] in ('clang', 'gcc'): if CONFIG["CC_TYPE"] in ("clang", "gcc"):
CXXFLAGS += ['-Wno-error=shadow'] CXXFLAGS += ["-Wno-error=shadow"]

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

@ -5,33 +5,33 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
A11Y_MANIFESTS += [ A11Y_MANIFESTS += [
'a11y.ini', "a11y.ini",
'actions/a11y.ini', "actions/a11y.ini",
'aom/a11y.ini', "aom/a11y.ini",
'attributes/a11y.ini', "attributes/a11y.ini",
'bounds/a11y.ini', "bounds/a11y.ini",
'editabletext/a11y.ini', "editabletext/a11y.ini",
'elm/a11y.ini', "elm/a11y.ini",
'events/a11y.ini', "events/a11y.ini",
'events/docload/a11y.ini', "events/docload/a11y.ini",
'focus/a11y.ini', "focus/a11y.ini",
'hittest/a11y.ini', "hittest/a11y.ini",
'hyperlink/a11y.ini', "hyperlink/a11y.ini",
'hypertext/a11y.ini', "hypertext/a11y.ini",
'name/a11y.ini', "name/a11y.ini",
'pivot/a11y.ini', "pivot/a11y.ini",
'relations/a11y.ini', "relations/a11y.ini",
'role/a11y.ini', "role/a11y.ini",
'scroll/a11y.ini', "scroll/a11y.ini",
'selectable/a11y.ini', "selectable/a11y.ini",
'states/a11y.ini', "states/a11y.ini",
'table/a11y.ini', "table/a11y.ini",
'text/a11y.ini', "text/a11y.ini",
'textattrs/a11y.ini', "textattrs/a11y.ini",
'textcaret/a11y.ini', "textcaret/a11y.ini",
'textrange/a11y.ini', "textrange/a11y.ini",
'textselection/a11y.ini', "textselection/a11y.ini",
'tree/a11y.ini', "tree/a11y.ini",
'treeupdate/a11y.ini', "treeupdate/a11y.ini",
'value/a11y.ini', "value/a11y.ini",
] ]

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

@ -5,54 +5,54 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXPORTS += [ EXPORTS += [
'ia2Accessible.h', "ia2Accessible.h",
'ia2AccessibleAction.h', "ia2AccessibleAction.h",
'ia2AccessibleComponent.h', "ia2AccessibleComponent.h",
'ia2AccessibleEditableText.h', "ia2AccessibleEditableText.h",
'ia2AccessibleHyperlink.h', "ia2AccessibleHyperlink.h",
'ia2AccessibleHypertext.h', "ia2AccessibleHypertext.h",
'ia2AccessibleText.h', "ia2AccessibleText.h",
'ia2AccessibleValue.h', "ia2AccessibleValue.h",
] ]
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'ia2Accessible.cpp', "ia2Accessible.cpp",
'ia2AccessibleAction.cpp', "ia2AccessibleAction.cpp",
'ia2AccessibleComponent.cpp', "ia2AccessibleComponent.cpp",
'ia2AccessibleEditableText.cpp', "ia2AccessibleEditableText.cpp",
'ia2AccessibleHyperlink.cpp', "ia2AccessibleHyperlink.cpp",
'ia2AccessibleHypertext.cpp', "ia2AccessibleHypertext.cpp",
'ia2AccessibleImage.cpp', "ia2AccessibleImage.cpp",
'ia2AccessibleRelation.cpp', "ia2AccessibleRelation.cpp",
'ia2AccessibleText.cpp', "ia2AccessibleText.cpp",
'ia2AccessibleValue.cpp', "ia2AccessibleValue.cpp",
] ]
# These files cannot be built in unified mode because they both include # These files cannot be built in unified mode because they both include
# AccessibleTable2_i.c. # AccessibleTable2_i.c.
SOURCES += [ SOURCES += [
'ia2AccessibleTable.cpp', "ia2AccessibleTable.cpp",
'ia2AccessibleTableCell.cpp', "ia2AccessibleTableCell.cpp",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/base', "/accessible/base",
'/accessible/generic', "/accessible/generic",
'/accessible/html', "/accessible/html",
'/accessible/windows', "/accessible/windows",
'/accessible/windows/msaa', "/accessible/windows/msaa",
'/accessible/xpcom', "/accessible/xpcom",
'/accessible/xul', "/accessible/xul",
] ]
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"
# The Windows MIDL code generator creates things like: # The Windows MIDL code generator creates things like:
# #
# #endif !_MIDL_USE_GUIDDEF_ # #endif !_MIDL_USE_GUIDDEF_
# #
# which clang-cl complains about. MSVC doesn't, so turn this warning off. # which clang-cl complains about. MSVC doesn't, so turn this warning off.
if CONFIG['CC_TYPE'] == 'clang-cl': if CONFIG["CC_TYPE"] == "clang-cl":
CXXFLAGS += ['-Wno-extra-tokens'] CXXFLAGS += ["-Wno-extra-tokens"]
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")

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

@ -4,8 +4,8 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += ['msaa', 'ia2', 'sdn', 'uia'] DIRS += ["msaa", "ia2", "sdn", "uia"]
EXPORTS.mozilla.a11y += [ EXPORTS.mozilla.a11y += [
'ProxyWrappers.h', "ProxyWrappers.h",
] ]

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

@ -5,71 +5,71 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXPORTS += [ EXPORTS += [
'IUnknownImpl.h', "IUnknownImpl.h",
] ]
EXPORTS.mozilla.a11y += [ EXPORTS.mozilla.a11y += [
'AccessibleWrap.h', "AccessibleWrap.h",
'Compatibility.h', "Compatibility.h",
'HyperTextAccessibleWrap.h', "HyperTextAccessibleWrap.h",
'LazyInstantiator.h', "LazyInstantiator.h",
'MsaaIdGenerator.h', "MsaaIdGenerator.h",
'nsWinUtils.h', "nsWinUtils.h",
] ]
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'AccessibleWrap.cpp', "AccessibleWrap.cpp",
'ApplicationAccessibleWrap.cpp', "ApplicationAccessibleWrap.cpp",
'ARIAGridAccessibleWrap.cpp', "ARIAGridAccessibleWrap.cpp",
'Compatibility.cpp', "Compatibility.cpp",
'CompatibilityUIA.cpp', "CompatibilityUIA.cpp",
'DocAccessibleWrap.cpp', "DocAccessibleWrap.cpp",
'EnumVariant.cpp', "EnumVariant.cpp",
'GeckoCustom.cpp', "GeckoCustom.cpp",
'HTMLTableAccessibleWrap.cpp', "HTMLTableAccessibleWrap.cpp",
'HTMLWin32ObjectAccessible.cpp', "HTMLWin32ObjectAccessible.cpp",
'HyperTextAccessibleWrap.cpp', "HyperTextAccessibleWrap.cpp",
'ImageAccessibleWrap.cpp', "ImageAccessibleWrap.cpp",
'IUnknownImpl.cpp', "IUnknownImpl.cpp",
'MsaaIdGenerator.cpp', "MsaaIdGenerator.cpp",
'nsWinUtils.cpp', "nsWinUtils.cpp",
'Platform.cpp', "Platform.cpp",
'RootAccessibleWrap.cpp', "RootAccessibleWrap.cpp",
'TextLeafAccessibleWrap.cpp', "TextLeafAccessibleWrap.cpp",
] ]
SOURCES += [ SOURCES += [
# This file cannot be built in unified mode because it redefines _WIN32_WINNT # This file cannot be built in unified mode because it redefines _WIN32_WINNT
'LazyInstantiator.cpp', "LazyInstantiator.cpp",
# This file cannot be built in unified mode because it includes ISimpleDOMNode_i.c. # This file cannot be built in unified mode because it includes ISimpleDOMNode_i.c.
'ServiceProvider.cpp', "ServiceProvider.cpp",
] ]
OS_LIBS += [ OS_LIBS += [
'ntdll', "ntdll",
] ]
if CONFIG['MOZ_XUL']: if CONFIG["MOZ_XUL"]:
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'XULListboxAccessibleWrap.cpp', "XULListboxAccessibleWrap.cpp",
'XULMenuAccessibleWrap.cpp', "XULMenuAccessibleWrap.cpp",
'XULTreeGridAccessibleWrap.cpp', "XULTreeGridAccessibleWrap.cpp",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/base', "/accessible/base",
'/accessible/generic', "/accessible/generic",
'/accessible/html', "/accessible/html",
'/accessible/ipc', "/accessible/ipc",
'/accessible/ipc/win', "/accessible/ipc/win",
'/accessible/windows', "/accessible/windows",
'/accessible/windows/ia2', "/accessible/windows/ia2",
'/accessible/windows/sdn', "/accessible/windows/sdn",
'/accessible/windows/uia', "/accessible/windows/uia",
'/accessible/xpcom', "/accessible/xpcom",
'/accessible/xul', "/accessible/xul",
'/dom/base', "/dom/base",
'/layout/style', "/layout/style",
] ]
# The Windows MIDL code generator creates things like: # The Windows MIDL code generator creates things like:
@ -77,9 +77,9 @@ LOCAL_INCLUDES += [
# #endif !_MIDL_USE_GUIDDEF_ # #endif !_MIDL_USE_GUIDDEF_
# #
# which clang-cl complains about. MSVC doesn't, so turn this warning off. # which clang-cl complains about. MSVC doesn't, so turn this warning off.
if CONFIG['CC_TYPE'] == 'clang-cl': if CONFIG["CC_TYPE"] == "clang-cl":
CXXFLAGS += ['-Wno-extra-tokens'] CXXFLAGS += ["-Wno-extra-tokens"]
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"

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

@ -5,20 +5,20 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'sdnAccessible.cpp', "sdnAccessible.cpp",
'sdnDocAccessible.cpp', "sdnDocAccessible.cpp",
'sdnTextAccessible.cpp', "sdnTextAccessible.cpp",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/base', "/accessible/base",
'/accessible/generic', "/accessible/generic",
'/accessible/html', "/accessible/html",
'/accessible/windows/msaa', "/accessible/windows/msaa",
'/accessible/xpcom', "/accessible/xpcom",
'/accessible/xul', "/accessible/xul",
] ]
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"

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

@ -5,18 +5,18 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
SOURCES += [ SOURCES += [
'uiaRawElmProvider.cpp', "uiaRawElmProvider.cpp",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/base', "/accessible/base",
'/accessible/generic', "/accessible/generic",
'/accessible/html', "/accessible/html",
'/accessible/windows/msaa', "/accessible/windows/msaa",
'/accessible/xpcom', "/accessible/xpcom",
'/accessible/xul', "/accessible/xul",
] ]
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"

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

@ -14,8 +14,13 @@ from xpidl import xpidl
# Load the webidl configuration file. # Load the webidl configuration file.
glbl = {} glbl = {}
exec(open(mozpath.join(buildconfig.topsrcdir, 'dom', 'bindings', 'Bindings.conf')).read(), glbl) exec(
webidlconfig = glbl['DOMInterfaces'] open(
mozpath.join(buildconfig.topsrcdir, "dom", "bindings", "Bindings.conf")
).read(),
glbl,
)
webidlconfig = glbl["DOMInterfaces"]
# Instantiate the parser. # Instantiate the parser.
p = xpidl.IDLParser() p = xpidl.IDLParser()
@ -26,13 +31,14 @@ def findIDL(includePath, interfaceFileName):
path = mozpath.join(d, interfaceFileName) path = mozpath.join(d, interfaceFileName)
if os.path.exists(path): if os.path.exists(path):
return path return path
raise BaseException("No IDL file found for interface %s " raise BaseException(
"in include path %r" "No IDL file found for interface %s "
% (interfaceFileName, includePath)) "in include path %r" % (interfaceFileName, includePath)
)
def loadEventIDL(parser, includePath, eventname): def loadEventIDL(parser, includePath, eventname):
eventidl = ("nsIAccessible%s.idl" % eventname) eventidl = "nsIAccessible%s.idl" % eventname
idlFile = findIDL(includePath, eventidl) idlFile = findIDL(includePath, eventidl)
idl = p.parse(open(idlFile).read(), idlFile) idl = p.parse(open(idlFile).read(), idlFile)
idl.resolve(includePath, p, webidlconfig) idl.resolve(includePath, p, webidlconfig)
@ -43,7 +49,7 @@ class Configuration:
def __init__(self, filename): def __init__(self, filename):
config = {} config = {}
exec(open(filename).read(), config) exec(open(filename).read(), config)
self.simple_events = config.get('simple_events', []) self.simple_events = config.get("simple_events", [])
def firstCap(str): def firstCap(str):
@ -51,26 +57,28 @@ def firstCap(str):
def writeAttributeParams(a): def writeAttributeParams(a):
return ("%s a%s" % (a.realtype.nativeType('in'), firstCap(a.name))) return "%s a%s" % (a.realtype.nativeType("in"), firstCap(a.name))
def print_header_file(fd, conf, incdirs): def print_header_file(fd, conf, incdirs):
idl_paths = set() idl_paths = set()
fd.write("/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */\n") fd.write("/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */\n")
fd.write("#ifndef _mozilla_a11y_generated_AccEvents_h_\n" fd.write(
"#define _mozilla_a11y_generated_AccEvents_h_\n\n") "#ifndef _mozilla_a11y_generated_AccEvents_h_\n"
fd.write("#include \"nscore.h\"\n") "#define _mozilla_a11y_generated_AccEvents_h_\n\n"
fd.write("#include \"nsCOMPtr.h\"\n") )
fd.write("#include \"nsCycleCollectionParticipant.h\"\n") fd.write('#include "nscore.h"\n')
fd.write("#include \"nsString.h\"\n") fd.write('#include "nsCOMPtr.h"\n')
fd.write('#include "nsCycleCollectionParticipant.h"\n')
fd.write('#include "nsString.h"\n')
for e in conf.simple_events: for e in conf.simple_events:
fd.write("#include \"nsIAccessible%s.h\"\n" % e) fd.write('#include "nsIAccessible%s.h"\n' % e)
for e in conf.simple_events: for e in conf.simple_events:
idl, idl_path = loadEventIDL(p, incdirs, e) idl, idl_path = loadEventIDL(p, incdirs, e)
idl_paths.add(idl_path) idl_paths.add(idl_path)
for iface in filter(lambda p: p.kind == "interface", idl.productions): for iface in filter(lambda p: p.kind == "interface", idl.productions):
classname = ("xpcAcc%s" % e) classname = "xpcAcc%s" % e
baseinterfaces = interfaces(iface) baseinterfaces = interfaces(iface)
fd.write("\nclass %s final : public %s\n" % (classname, iface.name)) fd.write("\nclass %s final : public %s\n" % (classname, iface.name))
@ -114,7 +122,7 @@ def interfaceAttributeTypes(idl):
def print_cpp(idl, fd, conf, eventname): def print_cpp(idl, fd, conf, eventname):
for p in idl.productions: for p in idl.productions:
if p.kind == 'interface': if p.kind == "interface":
write_cpp(eventname, p, fd) write_cpp(eventname, p, fd)
@ -135,7 +143,7 @@ def print_cpp_file(fd, conf, incdirs):
types.extend(interfaceAttributeTypes(idl)) types.extend(interfaceAttributeTypes(idl))
for c in types: for c in types:
fd.write("#include \"%s.h\"\n" % c) fd.write('#include "%s.h"\n' % c)
fd.write("\n") fd.write("\n")
for e in conf.simple_events: for e in conf.simple_events:
@ -147,37 +155,40 @@ def print_cpp_file(fd, conf, incdirs):
def attributeVariableTypeAndName(a): def attributeVariableTypeAndName(a):
if a.realtype.nativeType('in').endswith('*'): if a.realtype.nativeType("in").endswith("*"):
l = ["nsCOMPtr<%s> m%s;" % (a.realtype.nativeType('in').strip('* '), l = [
firstCap(a.name))] "nsCOMPtr<%s> m%s;"
elif a.realtype.nativeType('in').count("nsAString"): % (a.realtype.nativeType("in").strip("* "), firstCap(a.name))
]
elif a.realtype.nativeType("in").count("nsAString"):
l = ["nsString m%s;" % firstCap(a.name)] l = ["nsString m%s;" % firstCap(a.name)]
elif a.realtype.nativeType('in').count("nsACString"): elif a.realtype.nativeType("in").count("nsACString"):
l = ["nsCString m%s;" % firstCap(a.name)] l = ["nsCString m%s;" % firstCap(a.name)]
else: else:
l = ["%sm%s;" % (a.realtype.nativeType('in'), l = ["%sm%s;" % (a.realtype.nativeType("in"), firstCap(a.name))]
firstCap(a.name))]
return ", ".join(l) return ", ".join(l)
def writeAttributeGetter(fd, classname, a): def writeAttributeGetter(fd, classname, a):
fd.write("NS_IMETHODIMP\n") fd.write("NS_IMETHODIMP\n")
fd.write("%s::Get%s(" % (classname, firstCap(a.name))) fd.write("%s::Get%s(" % (classname, firstCap(a.name)))
if a.realtype.nativeType('in').endswith('*'): if a.realtype.nativeType("in").endswith("*"):
fd.write("%s** a%s" % (a.realtype.nativeType('in').strip('* '), firstCap(a.name))) fd.write(
elif a.realtype.nativeType('in').count("nsAString"): "%s** a%s" % (a.realtype.nativeType("in").strip("* "), firstCap(a.name))
)
elif a.realtype.nativeType("in").count("nsAString"):
fd.write("nsAString& a%s" % firstCap(a.name)) fd.write("nsAString& a%s" % firstCap(a.name))
elif a.realtype.nativeType('in').count("nsACString"): elif a.realtype.nativeType("in").count("nsACString"):
fd.write("nsACString& a%s" % firstCap(a.name)) fd.write("nsACString& a%s" % firstCap(a.name))
else: else:
fd.write("%s*a%s" % (a.realtype.nativeType('in'), firstCap(a.name))) fd.write("%s*a%s" % (a.realtype.nativeType("in"), firstCap(a.name)))
fd.write(")\n") fd.write(")\n")
fd.write("{\n") fd.write("{\n")
if a.realtype.nativeType('in').endswith('*'): if a.realtype.nativeType("in").endswith("*"):
fd.write(" NS_IF_ADDREF(*a%s = m%s);\n" % (firstCap(a.name), firstCap(a.name))) fd.write(" NS_IF_ADDREF(*a%s = m%s);\n" % (firstCap(a.name), firstCap(a.name)))
elif a.realtype.nativeType('in').count("nsAString"): elif a.realtype.nativeType("in").count("nsAString"):
fd.write(" a%s = m%s;\n" % (firstCap(a.name), firstCap(a.name))) fd.write(" a%s = m%s;\n" % (firstCap(a.name), firstCap(a.name)))
elif a.realtype.nativeType('in').count("nsACString"): elif a.realtype.nativeType("in").count("nsACString"):
fd.write(" a%s = m%s;\n" % (firstCap(a.name), firstCap(a.name))) fd.write(" a%s = m%s;\n" % (firstCap(a.name), firstCap(a.name)))
else: else:
fd.write(" *a%s = m%s;\n" % (firstCap(a.name), firstCap(a.name))) fd.write(" *a%s = m%s;\n" % (firstCap(a.name), firstCap(a.name)))
@ -207,7 +218,9 @@ def allAttributes(iface):
def write_cpp(eventname, iface, fd): def write_cpp(eventname, iface, fd):
classname = "xpcAcc%s" % eventname classname = "xpcAcc%s" % eventname
attributes = allAttributes(iface) attributes = allAttributes(iface)
ccattributes = filter(lambda m: m.realtype.nativeType('in').endswith('*'), attributes) ccattributes = filter(
lambda m: m.realtype.nativeType("in").endswith("*"), attributes
)
fd.write("NS_IMPL_CYCLE_COLLECTION(%s" % classname) fd.write("NS_IMPL_CYCLE_COLLECTION(%s" % classname)
for c in ccattributes: for c in ccattributes:
fd.write(", m%s" % firstCap(c.name)) fd.write(", m%s" % firstCap(c.name))
@ -228,8 +241,8 @@ def write_cpp(eventname, iface, fd):
def get_conf(conf_file): def get_conf(conf_file):
conf = Configuration(conf_file) conf = Configuration(conf_file)
inc_dir = [ inc_dir = [
mozpath.join(buildconfig.topsrcdir, 'accessible', 'interfaces'), mozpath.join(buildconfig.topsrcdir, "accessible", "interfaces"),
mozpath.join(buildconfig.topsrcdir, 'xpcom', 'base'), mozpath.join(buildconfig.topsrcdir, "xpcom", "base"),
] ]
return conf, inc_dir return conf, inc_dir
@ -238,6 +251,8 @@ def gen_files(fd, conf_file):
deps = set() deps = set()
conf, inc_dir = get_conf(conf_file) conf, inc_dir = get_conf(conf_file)
deps.update(print_header_file(fd, conf, inc_dir)) deps.update(print_header_file(fd, conf, inc_dir))
with open(os.path.join(os.path.dirname(fd.name), 'xpcAccEvents.cpp'), 'w') as cpp_fd: with open(
os.path.join(os.path.dirname(fd.name), "xpcAccEvents.cpp"), "w"
) as cpp_fd:
deps.update(print_cpp_file(cpp_fd, conf, inc_dir)) deps.update(print_cpp_file(cpp_fd, conf, inc_dir))
return deps return deps

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

@ -5,76 +5,77 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'nsAccessibleRelation.cpp', "nsAccessibleRelation.cpp",
'xpcAccessibilityService.cpp', "xpcAccessibilityService.cpp",
'xpcAccessible.cpp', "xpcAccessible.cpp",
'xpcAccessibleApplication.cpp', "xpcAccessibleApplication.cpp",
'xpcAccessibleDocument.cpp', "xpcAccessibleDocument.cpp",
'xpcAccessibleGeneric.cpp', "xpcAccessibleGeneric.cpp",
'xpcAccessibleHyperLink.cpp', "xpcAccessibleHyperLink.cpp",
'xpcAccessibleHyperText.cpp', "xpcAccessibleHyperText.cpp",
'xpcAccessibleImage.cpp', "xpcAccessibleImage.cpp",
'xpcAccessibleSelectable.cpp', "xpcAccessibleSelectable.cpp",
'xpcAccessibleTable.cpp', "xpcAccessibleTable.cpp",
'xpcAccessibleTableCell.cpp', "xpcAccessibleTableCell.cpp",
'xpcAccessibleTextRange.cpp', "xpcAccessibleTextRange.cpp",
'xpcAccessibleValue.cpp', "xpcAccessibleValue.cpp",
] ]
SOURCES += [ SOURCES += [
'!xpcAccEvents.cpp', "!xpcAccEvents.cpp",
] ]
EXPORTS += [ EXPORTS += [
'!xpcAccEvents.h', "!xpcAccEvents.h",
'xpcAccessibilityService.h', "xpcAccessibilityService.h",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/base', "/accessible/base",
'/accessible/generic', "/accessible/generic",
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk': if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/atk', "/accessible/atk",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/windows/msaa', "/accessible/windows/msaa",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/ipc', "/accessible/ipc",
'/accessible/ipc/other', "/accessible/ipc/other",
'/accessible/mac', "/accessible/mac",
]
UNIFIED_SOURCES += [
'xpcAccessibleMacInterface.mm'
] ]
UNIFIED_SOURCES += ["xpcAccessibleMacInterface.mm"]
EXPORTS += [ EXPORTS += [
'xpcAccessibleMacInterface.h', "xpcAccessibleMacInterface.h",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/android', "/accessible/android",
] ]
else: else:
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/other', "/accessible/other",
] ]
GeneratedFile( GeneratedFile(
'xpcAccEvents.h', 'xpcAccEvents.cpp', "xpcAccEvents.h",
script='AccEventGen.py', entry_point='gen_files', "xpcAccEvents.cpp",
script="AccEventGen.py",
entry_point="gen_files",
inputs=[ inputs=[
'AccEvents.conf', "AccEvents.conf",
]) ],
)
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")
if CONFIG['CC_TYPE'] in ('clang', 'gcc'): if CONFIG["CC_TYPE"] in ("clang", "gcc"):
CXXFLAGS += ['-Wno-error=shadow'] CXXFLAGS += ["-Wno-error=shadow"]

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

@ -5,55 +5,55 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'XULAlertAccessible.cpp', "XULAlertAccessible.cpp",
'XULComboboxAccessible.cpp', "XULComboboxAccessible.cpp",
'XULElementAccessibles.cpp', "XULElementAccessibles.cpp",
'XULFormControlAccessible.cpp', "XULFormControlAccessible.cpp",
'XULListboxAccessible.cpp', "XULListboxAccessible.cpp",
'XULMenuAccessible.cpp', "XULMenuAccessible.cpp",
'XULSelectControlAccessible.cpp', "XULSelectControlAccessible.cpp",
'XULTabAccessible.cpp', "XULTabAccessible.cpp",
'XULTreeAccessible.cpp', "XULTreeAccessible.cpp",
'XULTreeGridAccessible.cpp', "XULTreeGridAccessible.cpp",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/base', "/accessible/base",
'/accessible/generic', "/accessible/generic",
'/accessible/html', "/accessible/html",
'/accessible/xpcom', "/accessible/xpcom",
'/dom/base', "/dom/base",
'/dom/xul', "/dom/xul",
'/layout/generic', "/layout/generic",
'/layout/xul', "/layout/xul",
'/layout/xul/tree', "/layout/xul/tree",
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk': if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/atk', "/accessible/atk",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/windows/ia2', "/accessible/windows/ia2",
'/accessible/windows/msaa', "/accessible/windows/msaa",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/mac', "/accessible/mac",
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/android', "/accessible/android",
] ]
else: else:
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/other', "/accessible/other",
] ]
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"
if CONFIG['CC_TYPE'] in ('clang', 'gcc'): if CONFIG["CC_TYPE"] in ("clang", "gcc"):
CXXFLAGS += ['-Wno-error=shadow'] CXXFLAGS += ["-Wno-error=shadow"]

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

@ -29,61 +29,61 @@ with Files("WebRTCChild.jsm"):
BUG_COMPONENT = ("Firefox", "Site Permissions") BUG_COMPONENT = ("Firefox", "Site Permissions")
FINAL_TARGET_FILES.actors += [ FINAL_TARGET_FILES.actors += [
'AboutNewInstallChild.jsm', "AboutNewInstallChild.jsm",
'AboutNewInstallParent.jsm', "AboutNewInstallParent.jsm",
'AboutNewTabChild.jsm', "AboutNewTabChild.jsm",
'AboutNewTabParent.jsm', "AboutNewTabParent.jsm",
'AboutPluginsChild.jsm', "AboutPluginsChild.jsm",
'AboutPluginsParent.jsm', "AboutPluginsParent.jsm",
'AboutPrivateBrowsingChild.jsm', "AboutPrivateBrowsingChild.jsm",
'AboutPrivateBrowsingParent.jsm', "AboutPrivateBrowsingParent.jsm",
'AboutProtectionsChild.jsm', "AboutProtectionsChild.jsm",
'AboutProtectionsParent.jsm', "AboutProtectionsParent.jsm",
'AboutReaderChild.jsm', "AboutReaderChild.jsm",
'AboutReaderParent.jsm', "AboutReaderParent.jsm",
'AboutTabCrashedChild.jsm', "AboutTabCrashedChild.jsm",
'AboutTabCrashedParent.jsm', "AboutTabCrashedParent.jsm",
'BlockedSiteChild.jsm', "BlockedSiteChild.jsm",
'BlockedSiteParent.jsm', "BlockedSiteParent.jsm",
'BrowserProcessChild.jsm', "BrowserProcessChild.jsm",
'BrowserTabChild.jsm', "BrowserTabChild.jsm",
'BrowserTabParent.jsm', "BrowserTabParent.jsm",
'ClickHandlerChild.jsm', "ClickHandlerChild.jsm",
'ClickHandlerParent.jsm', "ClickHandlerParent.jsm",
'ContentMetaChild.jsm', "ContentMetaChild.jsm",
'ContentMetaParent.jsm', "ContentMetaParent.jsm",
'ContentSearchChild.jsm', "ContentSearchChild.jsm",
'ContentSearchParent.jsm', "ContentSearchParent.jsm",
'ContextMenuChild.jsm', "ContextMenuChild.jsm",
'ContextMenuParent.jsm', "ContextMenuParent.jsm",
'DecoderDoctorChild.jsm', "DecoderDoctorChild.jsm",
'DecoderDoctorParent.jsm', "DecoderDoctorParent.jsm",
'DOMFullscreenChild.jsm', "DOMFullscreenChild.jsm",
'DOMFullscreenParent.jsm', "DOMFullscreenParent.jsm",
'EncryptedMediaChild.jsm', "EncryptedMediaChild.jsm",
'EncryptedMediaParent.jsm', "EncryptedMediaParent.jsm",
'FormValidationChild.jsm', "FormValidationChild.jsm",
'FormValidationParent.jsm', "FormValidationParent.jsm",
'LightweightThemeChild.jsm', "LightweightThemeChild.jsm",
'LinkHandlerChild.jsm', "LinkHandlerChild.jsm",
'LinkHandlerParent.jsm', "LinkHandlerParent.jsm",
'NetErrorChild.jsm', "NetErrorChild.jsm",
'NetErrorParent.jsm', "NetErrorParent.jsm",
'PageInfoChild.jsm', "PageInfoChild.jsm",
'PageStyleChild.jsm', "PageStyleChild.jsm",
'PageStyleParent.jsm', "PageStyleParent.jsm",
'PluginChild.jsm', "PluginChild.jsm",
'PluginParent.jsm', "PluginParent.jsm",
'PointerLockChild.jsm', "PointerLockChild.jsm",
'PointerLockParent.jsm', "PointerLockParent.jsm",
'PromptParent.jsm', "PromptParent.jsm",
'RefreshBlockerChild.jsm', "RefreshBlockerChild.jsm",
'RefreshBlockerParent.jsm', "RefreshBlockerParent.jsm",
'RFPHelperChild.jsm', "RFPHelperChild.jsm",
'RFPHelperParent.jsm', "RFPHelperParent.jsm",
'SearchTelemetryChild.jsm', "SearchTelemetryChild.jsm",
'SearchTelemetryParent.jsm', "SearchTelemetryParent.jsm",
'SwitchDocumentDirectionChild.jsm', "SwitchDocumentDirectionChild.jsm",
'WebRTCChild.jsm', "WebRTCChild.jsm",
'WebRTCParent.jsm', "WebRTCParent.jsm",
] ]

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

@ -6,14 +6,20 @@
defs = [] defs = []
for s in ('MOZ_GECKODRIVER', 'MOZ_ASAN', 'MOZ_TSAN', 'MOZ_CRASHREPORTER', for s in (
'MOZ_APP_NAME'): "MOZ_GECKODRIVER",
"MOZ_ASAN",
"MOZ_TSAN",
"MOZ_CRASHREPORTER",
"MOZ_APP_NAME",
):
if CONFIG[s]: if CONFIG[s]:
defs.append('-D%s=%s' % (s, '1' if CONFIG[s] is True else CONFIG[s])) defs.append("-D%s=%s" % (s, "1" if CONFIG[s] is True else CONFIG[s]))
GeneratedFile( GeneratedFile(
'MacOS-files.txt', "MacOS-files.txt",
script='/python/mozbuild/mozbuild/action/preprocessor.py', script="/python/mozbuild/mozbuild/action/preprocessor.py",
entry_point='generate', entry_point="generate",
inputs=['MacOS-files.in'], inputs=["MacOS-files.in"],
flags=defs) flags=defs,
)

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

@ -10,17 +10,17 @@ import sys
import re import re
o = OptionParser() o = OptionParser()
o.add_option('--buildid', dest='buildid') o.add_option("--buildid", dest="buildid")
o.add_option('--version', dest='version') o.add_option("--version", dest="version")
(options, args) = o.parse_args() (options, args) = o.parse_args()
if not options.buildid: if not options.buildid:
print('--buildid is required', file=sys.stderr) print("--buildid is required", file=sys.stderr)
sys.exit(1) sys.exit(1)
if not options.version: if not options.version:
print('--version is required', file=sys.stderr) print("--version is required", file=sys.stderr)
sys.exit(1) sys.exit(1)
# We want to build a version number that matches the format allowed for # We want to build a version number that matches the format allowed for
@ -29,18 +29,19 @@ if not options.version:
# builds), but also so that newly-built older versions (e.g. beta build) aren't # builds), but also so that newly-built older versions (e.g. beta build) aren't
# considered "newer" than previously-built newer versions (e.g. a trunk nightly) # considered "newer" than previously-built newer versions (e.g. a trunk nightly)
define, MOZ_BUILDID, buildid = io.open( define, MOZ_BUILDID, buildid = (
options.buildid, 'r', encoding='utf-8').read().split() io.open(options.buildid, "r", encoding="utf-8").read().split()
)
# extract only the major version (i.e. "14" from "14.0b1") # extract only the major version (i.e. "14" from "14.0b1")
majorVersion = re.match(r'^(\d+)[^\d].*', options.version).group(1) majorVersion = re.match(r"^(\d+)[^\d].*", options.version).group(1)
# last two digits of the year # last two digits of the year
twodigityear = buildid[2:4] twodigityear = buildid[2:4]
month = buildid[4:6] month = buildid[4:6]
if month[0] == '0': if month[0] == "0":
month = month[1] month = month[1]
day = buildid[6:8] day = buildid[6:8]
if day[0] == '0': if day[0] == "0":
day = day[1] day = day[1]
print('%s.%s.%s' % (majorVersion + twodigityear, month, day)) print("%s.%s.%s" % (majorVersion + twodigityear, month, day))

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

@ -29,90 +29,90 @@ with Files("profile/channel-prefs.js"):
with Files("profile/firefox.js"): with Files("profile/firefox.js"):
BUG_COMPONENT = ("Firefox", "General") BUG_COMPONENT = ("Firefox", "General")
if CONFIG['MOZ_MACBUNDLE_NAME']: if CONFIG["MOZ_MACBUNDLE_NAME"]:
DIRS += ['macbuild/Contents'] DIRS += ["macbuild/Contents"]
if CONFIG['MOZ_NO_PIE_COMPAT']: if CONFIG["MOZ_NO_PIE_COMPAT"]:
GeckoProgram(CONFIG['MOZ_APP_NAME'] + '-bin') GeckoProgram(CONFIG["MOZ_APP_NAME"] + "-bin")
DIRS += ['no-pie'] DIRS += ["no-pie"]
else: else:
GeckoProgram(CONFIG['MOZ_APP_NAME']) GeckoProgram(CONFIG["MOZ_APP_NAME"])
SOURCES += [ SOURCES += [
'nsBrowserApp.cpp', "nsBrowserApp.cpp",
] ]
# Neither channel-prefs.js nor firefox.exe want to end up in dist/bin/browser. # Neither channel-prefs.js nor firefox.exe want to end up in dist/bin/browser.
DIST_SUBDIR = "" DIST_SUBDIR = ""
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'!/build', "!/build",
'/toolkit/xre', "/toolkit/xre",
'/xpcom/base', "/xpcom/base",
'/xpcom/build', "/xpcom/build",
] ]
if CONFIG['LIBFUZZER']: if CONFIG["LIBFUZZER"]:
USE_LIBS += [ 'fuzzer' ] USE_LIBS += ["fuzzer"]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/tools/fuzzing/libfuzzer', "/tools/fuzzing/libfuzzer",
] ]
if CONFIG['ENABLE_GECKODRIVER']: if CONFIG["ENABLE_GECKODRIVER"]:
DEFINES['MOZ_GECKODRIVER'] = True DEFINES["MOZ_GECKODRIVER"] = True
if CONFIG['CC_TYPE'] == 'clang-cl': if CONFIG["CC_TYPE"] == "clang-cl":
# Always enter a Windows program through wmain, whether or not we're # Always enter a Windows program through wmain, whether or not we're
# a console application. # a console application.
WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup'] WIN32_EXE_LDFLAGS += ["-ENTRY:wmainCRTStartup"]
if CONFIG['OS_ARCH'] == 'WINNT': if CONFIG["OS_ARCH"] == "WINNT":
RCINCLUDE = 'splash.rc' RCINCLUDE = "splash.rc"
DIRS += [ DIRS += [
'winlauncher', "winlauncher",
] ]
USE_LIBS += [ USE_LIBS += [
'winlauncher', "winlauncher",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/browser/app/winlauncher', "/browser/app/winlauncher",
] ]
DELAYLOAD_DLLS += [ DELAYLOAD_DLLS += [
'oleaut32.dll', "oleaut32.dll",
'ole32.dll', "ole32.dll",
'rpcrt4.dll', "rpcrt4.dll",
'version.dll', "version.dll",
] ]
if CONFIG['CC_TYPE'] == 'clang-cl': if CONFIG["CC_TYPE"] == "clang-cl":
libpath_flag = '-LIBPATH:' libpath_flag = "-LIBPATH:"
else: else:
libpath_flag = '-L' libpath_flag = "-L"
WIN32_EXE_LDFLAGS += [ WIN32_EXE_LDFLAGS += [
libpath_flag + OBJDIR + '/winlauncher/freestanding', libpath_flag + OBJDIR + "/winlauncher/freestanding",
] ]
if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'Darwin': if CONFIG["MOZ_SANDBOX"] and CONFIG["OS_ARCH"] == "Darwin":
USE_LIBS += [ USE_LIBS += [
'mozsandbox', "mozsandbox",
] ]
if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT': if CONFIG["MOZ_SANDBOX"] and CONFIG["OS_ARCH"] == "WINNT":
# For sandbox includes and the include dependencies those have # For sandbox includes and the include dependencies those have
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/security/sandbox/chromium', "/security/sandbox/chromium",
'/security/sandbox/chromium-shim', "/security/sandbox/chromium-shim",
] ]
USE_LIBS += [ USE_LIBS += [
'sandbox_s', "sandbox_s",
] ]
DELAYLOAD_DLLS += [ DELAYLOAD_DLLS += [
'winmm.dll', "winmm.dll",
'user32.dll', "user32.dll",
] ]
# Control the default heap size. # Control the default heap size.
@ -123,23 +123,29 @@ if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT':
# The heap will grow if need be. # The heap will grow if need be.
# #
# Set it to 256k. See bug 127069. # Set it to 256k. See bug 127069.
if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['CC_TYPE'] not in ('clang', 'gcc'): if CONFIG["OS_ARCH"] == "WINNT" and CONFIG["CC_TYPE"] not in ("clang", "gcc"):
LDFLAGS += ['/HEAP:0x40000'] LDFLAGS += ["/HEAP:0x40000"]
DisableStlWrapping() DisableStlWrapping()
if CONFIG['HAVE_CLOCK_MONOTONIC']: if CONFIG["HAVE_CLOCK_MONOTONIC"]:
OS_LIBS += CONFIG['REALTIME_LIBS'] OS_LIBS += CONFIG["REALTIME_LIBS"]
if CONFIG['MOZ_LINUX_32_SSE2_STARTUP_ERROR']: if CONFIG["MOZ_LINUX_32_SSE2_STARTUP_ERROR"]:
DEFINES['MOZ_LINUX_32_SSE2_STARTUP_ERROR'] = True DEFINES["MOZ_LINUX_32_SSE2_STARTUP_ERROR"] = True
COMPILE_FLAGS['OS_CXXFLAGS'] = [ COMPILE_FLAGS["OS_CXXFLAGS"] = [
f for f in COMPILE_FLAGS.get('OS_CXXFLAGS', []) f
if not f.startswith('-march=') and f not in ('-msse', '-msse2', '-mfpmath=sse') for f in COMPILE_FLAGS.get("OS_CXXFLAGS", [])
if not f.startswith("-march=") and f not in ("-msse", "-msse2", "-mfpmath=sse")
] + [ ] + [
'-mno-sse', '-mno-sse2', '-mfpmath=387', "-mno-sse",
"-mno-sse2",
"-mfpmath=387",
] ]
for icon in ('firefox', 'document', 'newwindow', 'newtab', 'pbmode'): for icon in ("firefox", "document", "newwindow", "newtab", "pbmode"):
DEFINES[icon.upper() + '_ICO'] = '"%s/%s/%s.ico"' % ( DEFINES[icon.upper() + "_ICO"] = '"%s/%s/%s.ico"' % (
TOPSRCDIR, CONFIG['MOZ_BRANDING_DIRECTORY'], icon) TOPSRCDIR,
CONFIG["MOZ_BRANDING_DIRECTORY"],
icon,
)

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

@ -4,25 +4,21 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
Program(CONFIG['MOZ_APP_NAME']) Program(CONFIG["MOZ_APP_NAME"])
SOURCES += [ SOURCES += [
'NoPie.c', "NoPie.c",
] ]
# For some reason, LTO messes things up. We don't care anyways. # For some reason, LTO messes things up. We don't care anyways.
CFLAGS += [ CFLAGS += [
'-fno-lto', "-fno-lto",
] ]
# Use OS_LIBS instead of LDFLAGS to "force" the flag to come after -pie # Use OS_LIBS instead of LDFLAGS to "force" the flag to come after -pie
# from MOZ_PROGRAM_LDFLAGS. # from MOZ_PROGRAM_LDFLAGS.
if CONFIG['CC_TYPE'] == 'clang': if CONFIG["CC_TYPE"] == "clang":
# clang < 5.0 doesn't support -no-pie. # clang < 5.0 doesn't support -no-pie.
OS_LIBS += [ OS_LIBS += ["-nopie"]
'-nopie'
]
else: else:
OS_LIBS += [ OS_LIBS += ["-no-pie"]
'-no-pie'
]

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

@ -20,11 +20,11 @@ def main(output_fd, def_file, llvm_dlltool, *llvm_dlltool_args):
try: try:
cmd = [llvm_dlltool] cmd = [llvm_dlltool]
cmd.extend(llvm_dlltool_args) cmd.extend(llvm_dlltool_args)
cmd += ['-d', def_file, '-l', tmp_output] cmd += ["-d", def_file, "-l", tmp_output]
subprocess.check_call(cmd) subprocess.check_call(cmd)
with open(tmp_output, 'rb') as tmplib: with open(tmp_output, "rb") as tmplib:
output_fd.write(tmplib.read()) output_fd.write(tmplib.read())
finally: finally:
os.remove(tmp_output) os.remove(tmp_output)

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

@ -4,7 +4,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
Library('winlauncher-freestanding') Library("winlauncher-freestanding")
FORCE_STATIC_LIB = True FORCE_STATIC_LIB = True
@ -14,43 +14,43 @@ FORCE_STATIC_LIB = True
NO_PGO = True NO_PGO = True
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'DllBlocklist.cpp', "DllBlocklist.cpp",
'FunctionTableResolver.cpp', "FunctionTableResolver.cpp",
'LoaderPrivateAPI.cpp', "LoaderPrivateAPI.cpp",
'ModuleLoadFrame.cpp', "ModuleLoadFrame.cpp",
] ]
# This library must be compiled in a freestanding environment, as its code must # This library must be compiled in a freestanding environment, as its code must
# not assume that it has access to any runtime libraries. # not assume that it has access to any runtime libraries.
if CONFIG['CC_TYPE'] == 'clang-cl': if CONFIG["CC_TYPE"] == "clang-cl":
CXXFLAGS += ['-Xclang'] CXXFLAGS += ["-Xclang"]
CXXFLAGS += [ CXXFLAGS += [
'-ffreestanding', "-ffreestanding",
] ]
# Forcibly include Freestanding.h into all source files in this library. # Forcibly include Freestanding.h into all source files in this library.
if CONFIG['CC_TYPE'] == 'clang-cl': if CONFIG["CC_TYPE"] == "clang-cl":
CXXFLAGS += ['-FI'] CXXFLAGS += ["-FI"]
else: else:
CXXFLAGS += ['-include'] CXXFLAGS += ["-include"]
CXXFLAGS += [ SRCDIR + '/Freestanding.h' ] CXXFLAGS += [SRCDIR + "/Freestanding.h"]
OS_LIBS += [ OS_LIBS += [
'ntdll', "ntdll",
'ntdll_freestanding', "ntdll_freestanding",
] ]
if CONFIG['COMPILE_ENVIRONMENT'] and CONFIG['LLVM_DLLTOOL']: if CONFIG["COMPILE_ENVIRONMENT"] and CONFIG["LLVM_DLLTOOL"]:
GeneratedFile( GeneratedFile(
'%sntdll_freestanding.%s' % (CONFIG['LIB_PREFIX'], "%sntdll_freestanding.%s" % (CONFIG["LIB_PREFIX"], CONFIG["LIB_SUFFIX"]),
CONFIG['LIB_SUFFIX']), script="gen_ntdll_freestanding_lib.py",
script='gen_ntdll_freestanding_lib.py', inputs=["ntdll_freestanding.def"],
inputs=['ntdll_freestanding.def'], flags=[CONFIG["LLVM_DLLTOOL"]] + CONFIG["LLVM_DLLTOOL_FLAGS"],
flags=[CONFIG['LLVM_DLLTOOL']] + CONFIG['LLVM_DLLTOOL_FLAGS']) )
DisableStlWrapping() DisableStlWrapping()
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'Launcher Process') BUG_COMPONENT = ("Firefox", "Launcher Process")

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

@ -4,48 +4,48 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
Library('winlauncher') Library("winlauncher")
FORCE_STATIC_LIB = True FORCE_STATIC_LIB = True
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'/ipc/mscom/ProcessRuntime.cpp', "/ipc/mscom/ProcessRuntime.cpp",
'/widget/windows/WindowsConsole.cpp', "/widget/windows/WindowsConsole.cpp",
'DllBlocklistInit.cpp', "DllBlocklistInit.cpp",
'ErrorHandler.cpp', "ErrorHandler.cpp",
'LauncherProcessWin.cpp', "LauncherProcessWin.cpp",
'LaunchUnelevated.cpp', "LaunchUnelevated.cpp",
'NtLoaderAPI.cpp', "NtLoaderAPI.cpp",
] ]
OS_LIBS += [ OS_LIBS += [
'oleaut32', "oleaut32",
'ole32', "ole32",
'rpcrt4', "rpcrt4",
'version', "version",
] ]
DIRS += [ DIRS += [
'freestanding', "freestanding",
] ]
USE_LIBS += [ USE_LIBS += [
'winlauncher-freestanding', "winlauncher-freestanding",
] ]
TEST_DIRS += [ TEST_DIRS += [
'test', "test",
] ]
if CONFIG['MOZ_LAUNCHER_PROCESS']: if CONFIG["MOZ_LAUNCHER_PROCESS"]:
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'/toolkit/xre/LauncherRegistryInfo.cpp', "/toolkit/xre/LauncherRegistryInfo.cpp",
'/toolkit/xre/WinTokenUtils.cpp', "/toolkit/xre/WinTokenUtils.cpp",
] ]
for var in ('MOZ_APP_BASENAME', 'MOZ_APP_VENDOR'): for var in ("MOZ_APP_BASENAME", "MOZ_APP_VENDOR"):
DEFINES[var] = '"%s"' % CONFIG[var] DEFINES[var] = '"%s"' % CONFIG[var]
DisableStlWrapping() DisableStlWrapping()
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'Launcher Process') BUG_COMPONENT = ("Firefox", "Launcher Process")

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

@ -8,22 +8,22 @@ DisableStlWrapping()
GeckoCppUnitTests( GeckoCppUnitTests(
[ [
'TestSafeThreadLocal', "TestSafeThreadLocal",
'TestSameBinary', "TestSameBinary",
], ],
linkage=None linkage=None,
) )
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/browser/app/winlauncher', "/browser/app/winlauncher",
] ]
OS_LIBS += [ OS_LIBS += [
'ntdll', "ntdll",
] ]
if CONFIG['CC_TYPE'] in ('gcc', 'clang'): if CONFIG["CC_TYPE"] in ("gcc", "clang"):
# This allows us to use wmain as the entry point on mingw # This allows us to use wmain as the entry point on mingw
LDFLAGS += [ LDFLAGS += [
'-municode', "-municode",
] ]

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

@ -11,8 +11,10 @@ import sys
def find_error_ids(filename, known_strings): def find_error_ids(filename, known_strings):
with open(filename, 'r', encoding="utf-8") as f: with open(filename, "r", encoding="utf-8") as f:
known_strings += [m.id.name for m in parse(f.read()).body if isinstance(m, Message)] known_strings += [
m.id.name for m in parse(f.read()).body if isinstance(m, Message)
]
def main(output, *filenames): def main(output, *filenames):
@ -20,11 +22,11 @@ def main(output, *filenames):
for filename in filenames: for filename in filenames:
find_error_ids(filename, known_strings) find_error_ids(filename, known_strings)
output.write('const KNOWN_ERROR_MESSAGE_IDS = new Set([\n') output.write("const KNOWN_ERROR_MESSAGE_IDS = new Set([\n")
for known_string in known_strings: for known_string in known_strings:
output.write(' "{}",\n'.format(known_string)) output.write(' "{}",\n'.format(known_string))
output.write(']);\n') output.write("]);\n")
if __name__ == '__main__': if __name__ == "__main__":
sys.exit(main(sys.stdout, *sys.argv[1:])) sys.exit(main(sys.stdout, *sys.argv[1:]))

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

@ -7,80 +7,80 @@
with Files("**"): with Files("**"):
BUG_COMPONENT = ("Firefox", "General") BUG_COMPONENT = ("Firefox", "General")
SPHINX_TREES['sslerrorreport'] = 'content/docs/sslerrorreport' SPHINX_TREES["sslerrorreport"] = "content/docs/sslerrorreport"
SPHINX_TREES['tabbrowser'] = 'content/docs/tabbrowser' SPHINX_TREES["tabbrowser"] = "content/docs/tabbrowser"
with Files('content/docs/sslerrorreport/**'): with Files("content/docs/sslerrorreport/**"):
SCHEDULES.exclusive = ['docs'] SCHEDULES.exclusive = ["docs"]
MOCHITEST_CHROME_MANIFESTS += [ MOCHITEST_CHROME_MANIFESTS += [
'content/test/chrome/chrome.ini', "content/test/chrome/chrome.ini",
] ]
BROWSER_CHROME_MANIFESTS += [ BROWSER_CHROME_MANIFESTS += [
'content/test/about/browser.ini', "content/test/about/browser.ini",
'content/test/alerts/browser.ini', "content/test/alerts/browser.ini",
'content/test/backforward/browser.ini', "content/test/backforward/browser.ini",
'content/test/caps/browser.ini', "content/test/caps/browser.ini",
'content/test/captivePortal/browser.ini', "content/test/captivePortal/browser.ini",
'content/test/contextMenu/browser.ini', "content/test/contextMenu/browser.ini",
'content/test/favicons/browser.ini', "content/test/favicons/browser.ini",
'content/test/forms/browser.ini', "content/test/forms/browser.ini",
'content/test/fullscreen/browser.ini', "content/test/fullscreen/browser.ini",
'content/test/general/browser.ini', "content/test/general/browser.ini",
'content/test/historySwipeAnimation/browser.ini', "content/test/historySwipeAnimation/browser.ini",
'content/test/keyboard/browser.ini', "content/test/keyboard/browser.ini",
'content/test/menubar/browser.ini', "content/test/menubar/browser.ini",
'content/test/metaTags/browser.ini', "content/test/metaTags/browser.ini",
'content/test/outOfProcess/browser.ini', "content/test/outOfProcess/browser.ini",
'content/test/pageActions/browser.ini', "content/test/pageActions/browser.ini",
'content/test/pageinfo/browser.ini', "content/test/pageinfo/browser.ini",
'content/test/pageStyle/browser.ini', "content/test/pageStyle/browser.ini",
'content/test/performance/browser.ini', "content/test/performance/browser.ini",
'content/test/performance/hidpi/browser.ini', "content/test/performance/hidpi/browser.ini",
'content/test/performance/io/browser.ini', "content/test/performance/io/browser.ini",
'content/test/performance/lowdpi/browser.ini', "content/test/performance/lowdpi/browser.ini",
'content/test/permissions/browser.ini', "content/test/permissions/browser.ini",
'content/test/plugins/browser.ini', "content/test/plugins/browser.ini",
'content/test/popupNotifications/browser.ini', "content/test/popupNotifications/browser.ini",
'content/test/popups/browser.ini', "content/test/popups/browser.ini",
'content/test/protectionsUI/browser.ini', "content/test/protectionsUI/browser.ini",
'content/test/referrer/browser.ini', "content/test/referrer/browser.ini",
'content/test/sanitize/browser.ini', "content/test/sanitize/browser.ini",
'content/test/sidebar/browser.ini', "content/test/sidebar/browser.ini",
'content/test/siteIdentity/browser.ini', "content/test/siteIdentity/browser.ini",
'content/test/static/browser.ini', "content/test/static/browser.ini",
'content/test/statuspanel/browser.ini', "content/test/statuspanel/browser.ini",
'content/test/sync/browser.ini', "content/test/sync/browser.ini",
'content/test/tabcrashed/browser.ini', "content/test/tabcrashed/browser.ini",
'content/test/tabdialogs/browser.ini', "content/test/tabdialogs/browser.ini",
'content/test/tabMediaIndicator/browser.ini', "content/test/tabMediaIndicator/browser.ini",
'content/test/tabPrompts/browser.ini', "content/test/tabPrompts/browser.ini",
'content/test/tabs/browser.ini', "content/test/tabs/browser.ini",
'content/test/touch/browser.ini', "content/test/touch/browser.ini",
'content/test/webextensions/browser.ini', "content/test/webextensions/browser.ini",
'content/test/webrtc/browser.ini', "content/test/webrtc/browser.ini",
'content/test/webrtc/legacyIndicator/browser.ini', "content/test/webrtc/legacyIndicator/browser.ini",
'content/test/zoom/browser.ini', "content/test/zoom/browser.ini",
] ]
PERFTESTS_MANIFESTS += [ PERFTESTS_MANIFESTS += ["content/test/perftest.ini"]
'content/test/perftest.ini'
]
DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION'] DEFINES["MOZ_APP_VERSION"] = CONFIG["MOZ_APP_VERSION"]
DEFINES['MOZ_APP_VERSION_DISPLAY'] = CONFIG['MOZ_APP_VERSION_DISPLAY'] DEFINES["MOZ_APP_VERSION_DISPLAY"] = CONFIG["MOZ_APP_VERSION_DISPLAY"]
DEFINES['APP_LICENSE_BLOCK'] = '%s/content/overrides/app-license.html' % SRCDIR DEFINES["APP_LICENSE_BLOCK"] = "%s/content/overrides/app-license.html" % SRCDIR
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk', 'cocoa'): if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("windows", "gtk", "cocoa"):
DEFINES['CONTEXT_COPY_IMAGE_CONTENTS'] = 1 DEFINES["CONTEXT_COPY_IMAGE_CONTENTS"] = 1
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk'): if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("windows", "gtk"):
DEFINES['MENUBAR_CAN_AUTOHIDE'] = 1 DEFINES["MENUBAR_CAN_AUTOHIDE"] = 1
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]
GeneratedFile('content/aboutNetErrorCodes.js', script='gen_aboutneterror_codes.py',
inputs=['/browser/locales/en-US/browser/nsserrors.ftl'])
GeneratedFile(
"content/aboutNetErrorCodes.js",
script="gen_aboutneterror_codes.py",
inputs=["/browser/locales/en-US/browser/nsserrors.ftl"],
)

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

@ -4,4 +4,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]

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

@ -4,6 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEFINES['MOZ_DISTRIBUTION_ID_UNQUOTED'] = CONFIG['MOZ_DISTRIBUTION_ID'] DEFINES["MOZ_DISTRIBUTION_ID_UNQUOTED"] = CONFIG["MOZ_DISTRIBUTION_ID"]
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]

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

@ -4,10 +4,10 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += ['content', 'locales'] DIRS += ["content", "locales"]
DIST_SUBDIR = 'browser' DIST_SUBDIR = "browser"
export('DIST_SUBDIR') export("DIST_SUBDIR")
include('../branding-common.mozbuild') include("../branding-common.mozbuild")
FirefoxBranding() FirefoxBranding()

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

@ -4,4 +4,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]

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

@ -4,6 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEFINES['MOZ_DISTRIBUTION_ID_UNQUOTED'] = CONFIG['MOZ_DISTRIBUTION_ID'] DEFINES["MOZ_DISTRIBUTION_ID_UNQUOTED"] = CONFIG["MOZ_DISTRIBUTION_ID"]
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]

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

@ -4,10 +4,10 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += ['content', 'locales'] DIRS += ["content", "locales"]
DIST_SUBDIR = 'browser' DIST_SUBDIR = "browser"
export('DIST_SUBDIR') export("DIST_SUBDIR")
include('../branding-common.mozbuild') include("../branding-common.mozbuild")
FirefoxBranding() FirefoxBranding()

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

@ -4,4 +4,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]

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

@ -4,4 +4,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]

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

@ -4,10 +4,10 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += ['content', 'locales'] DIRS += ["content", "locales"]
DIST_SUBDIR = 'browser' DIST_SUBDIR = "browser"
export('DIST_SUBDIR') export("DIST_SUBDIR")
include('../branding-common.mozbuild') include("../branding-common.mozbuild")
FirefoxBranding() FirefoxBranding()

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

@ -4,4 +4,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]

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

@ -4,6 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEFINES['MOZ_DISTRIBUTION_ID_UNQUOTED'] = CONFIG['MOZ_DISTRIBUTION_ID'] DEFINES["MOZ_DISTRIBUTION_ID_UNQUOTED"] = CONFIG["MOZ_DISTRIBUTION_ID"]
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]

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

@ -4,10 +4,10 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += ['content', 'locales'] DIRS += ["content", "locales"]
DIST_SUBDIR = 'browser' DIST_SUBDIR = "browser"
export('DIST_SUBDIR') export("DIST_SUBDIR")
include('../branding-common.mozbuild') include("../branding-common.mozbuild")
FirefoxBranding() FirefoxBranding()

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

@ -8,25 +8,25 @@ with Files("**"):
BUG_COMPONENT = ("Firefox", "General") BUG_COMPONENT = ("Firefox", "General")
EXPORTS.mozilla.browser += [ EXPORTS.mozilla.browser += [
'AboutRedirector.h', "AboutRedirector.h",
] ]
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini'] XPCSHELL_TESTS_MANIFESTS += ["test/unit/xpcshell.ini"]
SOURCES += [ SOURCES += [
'AboutRedirector.cpp', "AboutRedirector.cpp",
] ]
XPCOM_MANIFESTS += [ XPCOM_MANIFESTS += [
'components.conf', "components.conf",
] ]
FINAL_LIBRARY = 'browsercomps' FINAL_LIBRARY = "browsercomps"
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'../build', "../build",
'/dom/base', "/dom/base",
'/ipc/chromium/src', "/ipc/chromium/src",
] ]
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")

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

@ -4,6 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini'] BROWSER_CHROME_MANIFESTS += ["test/browser/browser.ini"]
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]

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

@ -4,20 +4,20 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'about:logins') BUG_COMPONENT = ("Firefox", "about:logins")
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'LoginBreaches.jsm', "LoginBreaches.jsm",
] ]
FINAL_TARGET_FILES.actors += [ FINAL_TARGET_FILES.actors += [
'AboutLoginsChild.jsm', "AboutLoginsChild.jsm",
'AboutLoginsParent.jsm', "AboutLoginsParent.jsm",
] ]
BROWSER_CHROME_MANIFESTS += ['tests/browser/browser.ini'] BROWSER_CHROME_MANIFESTS += ["tests/browser/browser.ini"]
MOCHITEST_CHROME_MANIFESTS += ['tests/chrome/chrome.ini'] MOCHITEST_CHROME_MANIFESTS += ["tests/chrome/chrome.ini"]
XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini'] XPCSHELL_TESTS_MANIFESTS += ["tests/unit/xpcshell.ini"]

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

@ -7,31 +7,31 @@
with Files("**"): with Files("**"):
BUG_COMPONENT = ("Toolkit", "Telemetry") BUG_COMPONENT = ("Toolkit", "Telemetry")
XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini'] XPCSHELL_TESTS_MANIFESTS += ["test/xpcshell/xpcshell.ini"]
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini'] BROWSER_CHROME_MANIFESTS += ["test/browser/browser.ini"]
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'AttributionCode.jsm', "AttributionCode.jsm",
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
XPIDL_SOURCES += [ XPIDL_SOURCES += [
'nsIMacAttribution.idl', "nsIMacAttribution.idl",
] ]
XPIDL_MODULE = 'attribution' XPIDL_MODULE = "attribution"
EXPORTS += [ EXPORTS += [
'nsMacAttribution.h', "nsMacAttribution.h",
] ]
SOURCES += [ SOURCES += [
'nsMacAttribution.cpp', "nsMacAttribution.cpp",
] ]
FINAL_LIBRARY = 'browsercomps' FINAL_LIBRARY = "browsercomps"
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'MacAttribution.jsm', "MacAttribution.jsm",
] ]

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

@ -8,15 +8,15 @@ with Files("**"):
BUG_COMPONENT = ("Firefox Build System", "General") BUG_COMPONENT = ("Firefox Build System", "General")
XPCOM_MANIFESTS += [ XPCOM_MANIFESTS += [
'components.conf', "components.conf",
] ]
Library('browsercomps') Library("browsercomps")
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = "xul"
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'../about', "../about",
'../migration', "../migration",
'../sessionstore', "../sessionstore",
'../shell', "../shell",
] ]

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

@ -5,10 +5,10 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
BROWSER_CHROME_MANIFESTS += [ BROWSER_CHROME_MANIFESTS += [
'test/browser/browser.ini', "test/browser/browser.ini",
] ]
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Core', 'DOM: Security') BUG_COMPONENT = ("Core", "DOM: Security")

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

@ -4,4 +4,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]

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

@ -5,23 +5,23 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += [ DIRS += [
'content', "content",
] ]
BROWSER_CHROME_MANIFESTS += ['test/browser.ini'] BROWSER_CHROME_MANIFESTS += ["test/browser.ini"]
TESTING_JS_MODULES += [ TESTING_JS_MODULES += [
'test/CustomizableUITestUtils.jsm', "test/CustomizableUITestUtils.jsm",
] ]
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'CustomizableUI.jsm', "CustomizableUI.jsm",
'CustomizableWidgets.jsm', "CustomizableWidgets.jsm",
'CustomizeMode.jsm', "CustomizeMode.jsm",
'DragPositionManager.jsm', "DragPositionManager.jsm",
'PanelMultiView.jsm', "PanelMultiView.jsm",
'SearchWidgetTracker.jsm', "SearchWidgetTracker.jsm",
] ]
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'Toolbars and Customization') BUG_COMPONENT = ("Firefox", "Toolbars and Customization")

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

@ -4,15 +4,15 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'Security') BUG_COMPONENT = ("Firefox", "Security")
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'DoHConfig.jsm', "DoHConfig.jsm",
'DoHController.jsm', "DoHController.jsm",
'DoHHeuristics.jsm', "DoHHeuristics.jsm",
'TRRPerformance.jsm', "TRRPerformance.jsm",
] ]
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini'] XPCSHELL_TESTS_MANIFESTS += ["test/unit/xpcshell.ini"]
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini'] BROWSER_CHROME_MANIFESTS += ["test/browser/browser.ini"]

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

@ -4,27 +4,27 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
with Files('*'): with Files("*"):
BUG_COMPONENT = ('Firefox', 'Downloads Panel') BUG_COMPONENT = ("Firefox", "Downloads Panel")
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini'] BROWSER_CHROME_MANIFESTS += ["test/browser/browser.ini"]
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'DownloadsCommon.jsm', "DownloadsCommon.jsm",
'DownloadsSubview.jsm', "DownloadsSubview.jsm",
'DownloadsTaskbar.jsm', "DownloadsTaskbar.jsm",
'DownloadsViewableInternally.jsm', "DownloadsViewableInternally.jsm",
'DownloadsViewUI.jsm', "DownloadsViewUI.jsm",
] ]
toolkit = CONFIG['MOZ_WIDGET_TOOLKIT'] toolkit = CONFIG["MOZ_WIDGET_TOOLKIT"]
if toolkit == 'cocoa': if toolkit == "cocoa":
EXTRA_JS_MODULES += ['DownloadsMacFinderProgress.jsm'] EXTRA_JS_MODULES += ["DownloadsMacFinderProgress.jsm"]
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'Downloads Panel') BUG_COMPONENT = ("Firefox", "Downloads Panel")
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini'] XPCSHELL_TESTS_MANIFESTS += ["test/unit/xpcshell.ini"]

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

@ -8,7 +8,7 @@ with Files("**"):
BUG_COMPONENT = ("Firefox", "Enterprise Policies") BUG_COMPONENT = ("Firefox", "Enterprise Policies")
EXTRA_JS_MODULES.policies += [ EXTRA_JS_MODULES.policies += [
'BookmarksPolicies.jsm', "BookmarksPolicies.jsm",
'ProxyPolicies.jsm', "ProxyPolicies.jsm",
'WebsiteFilter.jsm', "WebsiteFilter.jsm",
] ]

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

@ -7,21 +7,19 @@
with Files("**"): with Files("**"):
BUG_COMPONENT = ("Firefox", "Enterprise Policies") BUG_COMPONENT = ("Firefox", "Enterprise Policies")
SPHINX_TREES['docs'] = 'docs' SPHINX_TREES["docs"] = "docs"
DIRS += [ DIRS += [
'helpers', "helpers",
'schemas', "schemas",
] ]
TEST_DIRS += [ TEST_DIRS += ["tests"]
'tests'
]
EXTRA_JS_MODULES.policies += [ EXTRA_JS_MODULES.policies += [
'Policies.jsm', "Policies.jsm",
] ]
FINAL_LIBRARY = 'browsercomps' FINAL_LIBRARY = "browsercomps"
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]

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

@ -8,5 +8,5 @@ with Files("**"):
BUG_COMPONENT = ("Firefox", "Enterprise Policies") BUG_COMPONENT = ("Firefox", "Enterprise Policies")
EXTRA_PP_JS_MODULES.policies += [ EXTRA_PP_JS_MODULES.policies += [
'schema.jsm', "schema.jsm",
] ]

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

@ -5,14 +5,14 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
BROWSER_CHROME_MANIFESTS += [ BROWSER_CHROME_MANIFESTS += [
'browser/browser.ini', "browser/browser.ini",
'browser/disable_app_update/browser.ini', "browser/disable_app_update/browser.ini",
'browser/disable_default_bookmarks/browser.ini', "browser/disable_default_bookmarks/browser.ini",
'browser/disable_developer_tools/browser.ini', "browser/disable_developer_tools/browser.ini",
'browser/disable_forget_button/browser.ini', "browser/disable_forget_button/browser.ini",
'browser/disable_fxscreenshots/browser.ini', "browser/disable_fxscreenshots/browser.ini",
'browser/hardware_acceleration/browser.ini', "browser/hardware_acceleration/browser.ini",
'browser/managedbookmarks/browser.ini', "browser/managedbookmarks/browser.ini",
] ]
XPCSHELL_TESTS_MANIFESTS += ['xpcshell/xpcshell.ini'] XPCSHELL_TESTS_MANIFESTS += ["xpcshell/xpcshell.ini"]

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

@ -7,25 +7,25 @@
with Files("**"): with Files("**"):
BUG_COMPONENT = ("WebExtensions", "Untriaged") BUG_COMPONENT = ("WebExtensions", "Untriaged")
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]
EXTRA_COMPONENTS += [ EXTRA_COMPONENTS += [
'extensions-browser.manifest', "extensions-browser.manifest",
] ]
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'ExtensionControlledPopup.jsm', "ExtensionControlledPopup.jsm",
'ExtensionPopups.jsm', "ExtensionPopups.jsm",
] ]
DIRS += ['schemas'] DIRS += ["schemas"]
BROWSER_CHROME_MANIFESTS += [ BROWSER_CHROME_MANIFESTS += [
'test/browser/browser-private.ini', "test/browser/browser-private.ini",
'test/browser/browser.ini', "test/browser/browser.ini",
] ]
MOCHITEST_MANIFESTS += ['test/mochitest/mochitest.ini'] MOCHITEST_MANIFESTS += ["test/mochitest/mochitest.ini"]
XPCSHELL_TESTS_MANIFESTS += [ XPCSHELL_TESTS_MANIFESTS += [
'test/xpcshell/xpcshell.ini', "test/xpcshell/xpcshell.ini",
] ]

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

@ -4,4 +4,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]

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

@ -4,14 +4,13 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'Firefox Monitor') BUG_COMPONENT = ("Firefox", "Firefox Monitor")
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'FirefoxMonitor.jsm', "FirefoxMonitor.jsm",
] ]
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
BROWSER_CHROME_MANIFESTS += ["test/browser/browser.ini"]

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

@ -4,15 +4,15 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'Installer') BUG_COMPONENT = ("Firefox", "Installer")
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini'] XPCSHELL_TESTS_MANIFESTS += ["test/unit/xpcshell.ini"]
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'InstallerPrefs.jsm', "InstallerPrefs.jsm",
] ]
XPCOM_MANIFESTS += [ XPCOM_MANIFESTS += [
'components.conf', "components.conf",
] ]

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

@ -4,14 +4,14 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini'] BROWSER_CHROME_MANIFESTS += ["test/browser/browser.ini"]
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'General') BUG_COMPONENT = ("Firefox", "General")
TESTING_JS_MODULES += [ TESTING_JS_MODULES += [
'schemas/IonContentSchema.json', "schemas/IonContentSchema.json",
'schemas/IonStudyAddonsSchema.json', "schemas/IonStudyAddonsSchema.json",
] ]

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

@ -4,64 +4,64 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini'] XPCSHELL_TESTS_MANIFESTS += ["tests/unit/xpcshell.ini"]
MARIONETTE_UNIT_MANIFESTS += ['tests/marionette/manifest.ini'] MARIONETTE_UNIT_MANIFESTS += ["tests/marionette/manifest.ini"]
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]
XPIDL_SOURCES += [ XPIDL_SOURCES += [
'nsIBrowserProfileMigrator.idl', "nsIBrowserProfileMigrator.idl",
] ]
XPIDL_MODULE = 'migration' XPIDL_MODULE = "migration"
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'ChromeMigrationUtils.jsm', "ChromeMigrationUtils.jsm",
'ChromeProfileMigrator.jsm', "ChromeProfileMigrator.jsm",
'FirefoxProfileMigrator.jsm', "FirefoxProfileMigrator.jsm",
'MigrationUtils.jsm', "MigrationUtils.jsm",
'ProfileMigrator.jsm', "ProfileMigrator.jsm",
] ]
if CONFIG['OS_ARCH'] == 'WINNT': if CONFIG["OS_ARCH"] == "WINNT":
if CONFIG['ENABLE_TESTS']: if CONFIG["ENABLE_TESTS"]:
DIRS += [ DIRS += [
'tests/unit/insertIEHistory', "tests/unit/insertIEHistory",
] ]
SOURCES += [ SOURCES += [
'nsIEHistoryEnumerator.cpp', "nsIEHistoryEnumerator.cpp",
] ]
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'360seProfileMigrator.jsm', "360seProfileMigrator.jsm",
'ChromeWindowsLoginCrypto.jsm', "ChromeWindowsLoginCrypto.jsm",
'EdgeProfileMigrator.jsm', "EdgeProfileMigrator.jsm",
'ESEDBReader.jsm', "ESEDBReader.jsm",
'IEProfileMigrator.jsm', "IEProfileMigrator.jsm",
'MSMigrationUtils.jsm', "MSMigrationUtils.jsm",
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
EXPORTS += [ EXPORTS += [
'nsKeychainMigrationUtils.h', "nsKeychainMigrationUtils.h",
] ]
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'ChromeMacOSLoginCrypto.jsm', "ChromeMacOSLoginCrypto.jsm",
'SafariProfileMigrator.jsm', "SafariProfileMigrator.jsm",
] ]
SOURCES += [ SOURCES += [
'nsKeychainMigrationUtils.mm', "nsKeychainMigrationUtils.mm",
] ]
XPIDL_SOURCES += [ XPIDL_SOURCES += [
'nsIKeychainMigrationUtils.idl', "nsIKeychainMigrationUtils.idl",
] ]
XPCOM_MANIFESTS += [ XPCOM_MANIFESTS += [
'components.conf', "components.conf",
] ]
FINAL_LIBRARY = 'browsercomps' FINAL_LIBRARY = "browsercomps"
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'Migration') BUG_COMPONENT = ("Firefox", "Migration")

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

@ -4,14 +4,14 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
FINAL_TARGET = '_tests/xpcshell/browser/components/migration/tests/unit' FINAL_TARGET = "_tests/xpcshell/browser/components/migration/tests/unit"
Program('InsertIEHistory') Program("InsertIEHistory")
OS_LIBS += [ OS_LIBS += [
'ole32', "ole32",
] ]
SOURCES += [ SOURCES += [
'InsertIEHistory.cpp', "InsertIEHistory.cpp",
] ]
NO_PGO = True NO_PGO = True

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

@ -22,88 +22,86 @@ with Files("tests/unit/test_distribution.js"):
with Files("safebrowsing/**"): with Files("safebrowsing/**"):
BUG_COMPONENT = ("Toolkit", "Safe Browsing") BUG_COMPONENT = ("Toolkit", "Safe Browsing")
with Files('controlcenter/**'): with Files("controlcenter/**"):
BUG_COMPONENT = ('Firefox', 'General') BUG_COMPONENT = ("Firefox", "General")
DIRS += [ DIRS += [
'about', "about",
'aboutconfig', "aboutconfig",
'aboutlogins', "aboutlogins",
'attribution', "attribution",
'contextualidentity', "contextualidentity",
'customizableui', "customizableui",
'doh', "doh",
'downloads', "downloads",
'enterprisepolicies', "enterprisepolicies",
'extensions', "extensions",
'fxmonitor', "fxmonitor",
'migration', "migration",
'newtab', "newtab",
'originattributes', "originattributes",
'ion', "ion",
'places', "places",
'pocket', "pocket",
'preferences', "preferences",
'privatebrowsing', "privatebrowsing",
'prompts', "prompts",
'protections', "protections",
'protocolhandler', "protocolhandler",
'resistfingerprinting', "resistfingerprinting",
'search', "search",
'sessionstore', "sessionstore",
'shell', "shell",
'ssb', "ssb",
'syncedtabs', "syncedtabs",
'uitour', "uitour",
'urlbar', "urlbar",
'translation', "translation",
] ]
DIRS += ['build'] DIRS += ["build"]
if CONFIG['NIGHTLY_BUILD']: if CONFIG["NIGHTLY_BUILD"]:
DIRS += [ DIRS += [
'payments', "payments",
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
DIRS += ['touchbar'] DIRS += ["touchbar"]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
DIRS += ['installerprefs'] DIRS += ["installerprefs"]
XPIDL_SOURCES += [ XPIDL_SOURCES += [
'nsIBrowserHandler.idl', "nsIBrowserHandler.idl",
] ]
XPIDL_MODULE = 'browsercompsbase' XPIDL_MODULE = "browsercompsbase"
XPCOM_MANIFESTS += [ XPCOM_MANIFESTS += [
'components.conf', "components.conf",
] ]
EXTRA_COMPONENTS += [ EXTRA_COMPONENTS += [
'BrowserComponents.manifest', "BrowserComponents.manifest",
'tests/startupRecorder.js', "tests/startupRecorder.js",
'tests/testComponents.manifest', "tests/testComponents.manifest",
] ]
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'BrowserContentHandler.jsm', "BrowserContentHandler.jsm",
'BrowserGlue.jsm', "BrowserGlue.jsm",
'distribution.js', "distribution.js",
] ]
BROWSER_CHROME_MANIFESTS += [ BROWSER_CHROME_MANIFESTS += [
'safebrowsing/content/test/browser.ini', "safebrowsing/content/test/browser.ini",
'tests/browser/browser.ini', "tests/browser/browser.ini",
] ]
if CONFIG['MOZ_UPDATER']: if CONFIG["MOZ_UPDATER"]:
BROWSER_CHROME_MANIFESTS += [ BROWSER_CHROME_MANIFESTS += [
'tests/browser/whats_new_page/browser.ini', "tests/browser/whats_new_page/browser.ini",
] ]
XPCSHELL_TESTS_MANIFESTS += [ XPCSHELL_TESTS_MANIFESTS += ["tests/unit/xpcshell.ini"]
'tests/unit/xpcshell.ini'
]

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

@ -8,36 +8,36 @@ with Files("**"):
BUG_COMPONENT = ("Firefox", "New Tab Page") BUG_COMPONENT = ("Firefox", "New Tab Page")
BROWSER_CHROME_MANIFESTS += [ BROWSER_CHROME_MANIFESTS += [
'test/browser/abouthomecache/browser.ini', "test/browser/abouthomecache/browser.ini",
'test/browser/browser.ini', "test/browser/browser.ini",
] ]
SPHINX_TREES['docs'] = 'docs' SPHINX_TREES["docs"] = "docs"
SPHINX_TREES['content-src/asrouter/docs'] = 'content-src/asrouter/docs' SPHINX_TREES["content-src/asrouter/docs"] = "content-src/asrouter/docs"
XPCSHELL_TESTS_MANIFESTS += [ XPCSHELL_TESTS_MANIFESTS += [
'test/xpcshell/xpcshell.ini', "test/xpcshell/xpcshell.ini",
] ]
XPIDL_SOURCES += [ XPIDL_SOURCES += [
'nsIAboutNewTabService.idl', "nsIAboutNewTabService.idl",
] ]
XPIDL_MODULE = 'browser-newtab' XPIDL_MODULE = "browser-newtab"
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'AboutNewTabService.jsm', "AboutNewTabService.jsm",
] ]
FINAL_TARGET_FILES.actors += [ FINAL_TARGET_FILES.actors += [
'aboutwelcome/AboutWelcomeChild.jsm', "aboutwelcome/AboutWelcomeChild.jsm",
'aboutwelcome/AboutWelcomeParent.jsm', "aboutwelcome/AboutWelcomeParent.jsm",
'actors/ASRouterChild.jsm', "actors/ASRouterChild.jsm",
'actors/ASRouterParent.jsm', "actors/ASRouterParent.jsm",
] ]
XPCOM_MANIFESTS += [ XPCOM_MANIFESTS += [
'components.conf', "components.conf",
] ]
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]

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

@ -5,12 +5,10 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
BROWSER_CHROME_MANIFESTS += [ BROWSER_CHROME_MANIFESTS += [
'test/browser/browser.ini', "test/browser/browser.ini",
] ]
MOCHITEST_MANIFESTS += [ MOCHITEST_MANIFESTS += ["test/mochitest/mochitest.ini"]
'test/mochitest/mochitest.ini'
]
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Core', 'DOM: Security') BUG_COMPONENT = ("Core", "DOM: Security")

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

@ -4,33 +4,33 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini'] BROWSER_CHROME_MANIFESTS += ["test/browser/browser.ini"]
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'WebPayments UI') BUG_COMPONENT = ("Firefox", "WebPayments UI")
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'PaymentUIService.jsm', "PaymentUIService.jsm",
] ]
XPCOM_MANIFESTS += [ XPCOM_MANIFESTS += [
'components.conf', "components.conf",
] ]
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]
MOCHITEST_MANIFESTS += [ MOCHITEST_MANIFESTS += [
'test/mochitest/formautofill/mochitest.ini', "test/mochitest/formautofill/mochitest.ini",
'test/mochitest/mochitest.ini', "test/mochitest/mochitest.ini",
] ]
SPHINX_TREES['docs'] = 'docs' SPHINX_TREES["docs"] = "docs"
with Files('docs/**'): with Files("docs/**"):
SCHEDULES.exclusive = ['docs'] SCHEDULES.exclusive = ["docs"]
TESTING_JS_MODULES += [ TESTING_JS_MODULES += [
'test/PaymentTestUtils.jsm', "test/PaymentTestUtils.jsm",
] ]
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini'] XPCSHELL_TESTS_MANIFESTS += ["test/unit/xpcshell.ini"]

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

@ -11,14 +11,13 @@ class RequestHandler(SimpleHTTPRequestHandler, object):
def translate_path(self, path): def translate_path(self, path):
# Map autofill paths to their own directory # Map autofill paths to their own directory
autofillPath = "/formautofill" autofillPath = "/formautofill"
if (path.startswith(autofillPath)): if path.startswith(autofillPath):
path = "browser/extensions/formautofill/content" + \ path = "browser/extensions/formautofill/content" + path[len(autofillPath) :]
path[len(autofillPath):]
else: else:
path = "browser/components/payments/res" + path path = "browser/components/payments/res" + path
return super(RequestHandler, self).translate_path(path) return super(RequestHandler, self).translate_path(path)
if __name__ == '__main__': if __name__ == "__main__":
BaseHTTPServer.test(RequestHandler, BaseHTTPServer.HTTPServer) BaseHTTPServer.test(RequestHandler, BaseHTTPServer.HTTPServer)

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

@ -4,15 +4,15 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini'] XPCSHELL_TESTS_MANIFESTS += ["tests/unit/xpcshell.ini"]
MOCHITEST_CHROME_MANIFESTS += ['tests/chrome/chrome.ini'] MOCHITEST_CHROME_MANIFESTS += ["tests/chrome/chrome.ini"]
BROWSER_CHROME_MANIFESTS += ['tests/browser/browser.ini'] BROWSER_CHROME_MANIFESTS += ["tests/browser/browser.ini"]
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'PlacesUIUtils.jsm', "PlacesUIUtils.jsm",
] ]
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'Bookmarks & History') BUG_COMPONENT = ("Firefox", "Bookmarks & History")

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

@ -7,6 +7,6 @@
with Files("**"): with Files("**"):
BUG_COMPONENT = ("Firefox", "Pocket") BUG_COMPONENT = ("Firefox", "Pocket")
BROWSER_CHROME_MANIFESTS += ['test/browser.ini', 'test/unit/browser.ini'] BROWSER_CHROME_MANIFESTS += ["test/browser.ini", "test/unit/browser.ini"]
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]

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

@ -4,10 +4,10 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
for var in ('MOZ_APP_NAME', 'MOZ_MACBUNDLE_NAME'): for var in ("MOZ_APP_NAME", "MOZ_MACBUNDLE_NAME"):
DEFINES[var] = CONFIG[var] DEFINES[var] = CONFIG[var]
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk', 'cocoa'): if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("windows", "gtk", "cocoa"):
DEFINES['HAVE_SHELL_SERVICE'] = 1 DEFINES["HAVE_SHELL_SERVICE"] = 1
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]

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

@ -4,22 +4,17 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += [ DIRS += ["dialogs"]
'dialogs'
]
BROWSER_CHROME_MANIFESTS += [ BROWSER_CHROME_MANIFESTS += ["tests/browser.ini", "tests/siteData/browser.ini"]
'tests/browser.ini',
'tests/siteData/browser.ini'
]
for var in ('MOZ_APP_NAME', 'MOZ_MACBUNDLE_NAME'): for var in ("MOZ_APP_NAME", "MOZ_MACBUNDLE_NAME"):
DEFINES[var] = CONFIG[var] DEFINES[var] = CONFIG[var]
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk', 'cocoa'): if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("windows", "gtk", "cocoa"):
DEFINES['HAVE_SHELL_SERVICE'] = 1 DEFINES["HAVE_SHELL_SERVICE"] = 1
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'Preferences') BUG_COMPONENT = ("Firefox", "Preferences")

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

@ -5,10 +5,10 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
BROWSER_CHROME_MANIFESTS += [ BROWSER_CHROME_MANIFESTS += [
'test/browser/browser.ini', "test/browser/browser.ini",
] ]
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'Private Browsing') BUG_COMPONENT = ("Firefox", "Private Browsing")

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

@ -6,9 +6,9 @@ with Files("**"):
BUG_COMPONENT = ("Toolkit", "Notifications and Alerts") BUG_COMPONENT = ("Toolkit", "Notifications and Alerts")
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'PromptCollection.jsm', "PromptCollection.jsm",
] ]
XPCOM_MANIFESTS += [ XPCOM_MANIFESTS += [
'components.conf', "components.conf",
] ]

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

@ -4,9 +4,9 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini'] BROWSER_CHROME_MANIFESTS += ["test/browser/browser.ini"]
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'Protections UI') BUG_COMPONENT = ("Firefox", "Protections UI")

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

@ -4,15 +4,15 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini'] BROWSER_CHROME_MANIFESTS += ["test/browser/browser.ini"]
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'WebProtocolHandlerRegistrar.jsm', "WebProtocolHandlerRegistrar.jsm",
] ]
XPCOM_MANIFESTS += [ XPCOM_MANIFESTS += [
'components.conf', "components.conf",
] ]
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'General') BUG_COMPONENT = ("Firefox", "General")

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

@ -8,13 +8,13 @@ with Files("**"):
BUG_COMPONENT = ("Core", "Security") BUG_COMPONENT = ("Core", "Security")
BROWSER_CHROME_MANIFESTS += [ BROWSER_CHROME_MANIFESTS += [
'test/browser/browser.ini', "test/browser/browser.ini",
] ]
MOCHITEST_MANIFESTS += [ MOCHITEST_MANIFESTS += [
'test/mochitest/mochitest.ini', "test/mochitest/mochitest.ini",
] ]
MOCHITEST_CHROME_MANIFESTS += [ MOCHITEST_CHROME_MANIFESTS += [
'test/chrome/chrome.ini', "test/chrome/chrome.ini",
] ]

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

@ -5,21 +5,21 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'SearchOneOffs.jsm', "SearchOneOffs.jsm",
'SearchTelemetry.jsm', "SearchTelemetry.jsm",
'SearchUIUtils.jsm', "SearchUIUtils.jsm",
] ]
BROWSER_CHROME_MANIFESTS += [ BROWSER_CHROME_MANIFESTS += [
'test/browser/browser.ini', "test/browser/browser.ini",
'test/browser/google_codes/browser.ini', "test/browser/google_codes/browser.ini",
] ]
MARIONETTE_LAYOUT_MANIFESTS += ['test/marionette/manifest.ini'] MARIONETTE_LAYOUT_MANIFESTS += ["test/marionette/manifest.ini"]
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini'] XPCSHELL_TESTS_MANIFESTS += ["test/unit/xpcshell.ini"]
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'Search') BUG_COMPONENT = ("Firefox", "Search")

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

@ -10,12 +10,13 @@ from marionette_harness.marionette_test import MarionetteTestCase
class TestEnginesOnRestart(MarionetteTestCase): class TestEnginesOnRestart(MarionetteTestCase):
def setUp(self): def setUp(self):
super(TestEnginesOnRestart, self).setUp() super(TestEnginesOnRestart, self).setUp()
self.marionette.enforce_gecko_prefs({ self.marionette.enforce_gecko_prefs(
'browser.search.log': True, {
}) "browser.search.log": True,
}
)
def get_default_search_engine(self): def get_default_search_engine(self):
"""Retrieve the identifier of the default search engine.""" """Retrieve the identifier of the default search engine."""

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

@ -4,31 +4,31 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini'] XPCSHELL_TESTS_MANIFESTS += ["test/unit/xpcshell.ini"]
BROWSER_CHROME_MANIFESTS += ['test/browser.ini'] BROWSER_CHROME_MANIFESTS += ["test/browser.ini"]
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]
EXTRA_JS_MODULES.sessionstore = [ EXTRA_JS_MODULES.sessionstore = [
'ContentRestore.jsm', "ContentRestore.jsm",
'ContentSessionStore.jsm', "ContentSessionStore.jsm",
'GlobalState.jsm', "GlobalState.jsm",
'RecentlyClosedTabsAndWindowsMenuUtils.jsm', "RecentlyClosedTabsAndWindowsMenuUtils.jsm",
'RunState.jsm', "RunState.jsm",
'SessionCookies.jsm', "SessionCookies.jsm",
'SessionFile.jsm', "SessionFile.jsm",
'SessionMigration.jsm', "SessionMigration.jsm",
'SessionSaver.jsm', "SessionSaver.jsm",
'SessionStartup.jsm', "SessionStartup.jsm",
'SessionStore.jsm', "SessionStore.jsm",
'SessionWorker.js', "SessionWorker.js",
'SessionWorker.jsm', "SessionWorker.jsm",
'StartupPerformance.jsm', "StartupPerformance.jsm",
'TabAttributes.jsm', "TabAttributes.jsm",
'TabState.jsm', "TabState.jsm",
'TabStateCache.jsm', "TabStateCache.jsm",
'TabStateFlusher.jsm', "TabStateFlusher.jsm",
] ]
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'Session Restore') BUG_COMPONENT = ("Firefox", "Session Restore")

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

@ -5,77 +5,75 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# For BinaryPath::GetLong for Windows # For BinaryPath::GetLong for Windows
LOCAL_INCLUDES += [ LOCAL_INCLUDES += ["/xpcom/build"]
'/xpcom/build'
]
BROWSER_CHROME_MANIFESTS += ['test/browser.ini'] BROWSER_CHROME_MANIFESTS += ["test/browser.ini"]
MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini'] MOCHITEST_CHROME_MANIFESTS += ["test/chrome.ini"]
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini'] XPCSHELL_TESTS_MANIFESTS += ["test/unit/xpcshell.ini"]
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]
XPIDL_SOURCES += [ XPIDL_SOURCES += [
'nsIShellService.idl', "nsIShellService.idl",
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
XPIDL_SOURCES += [ XPIDL_SOURCES += [
'nsIMacShellService.idl', "nsIMacShellService.idl",
] ]
SOURCES += [ SOURCES += [
'nsMacShellService.cpp', "nsMacShellService.cpp",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
# For CocoaFileUtils # For CocoaFileUtils
'/xpcom/io' "/xpcom/io"
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk': elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
XPIDL_SOURCES += [ XPIDL_SOURCES += [
'nsIGNOMEShellService.idl', "nsIGNOMEShellService.idl",
] ]
SOURCES += [ SOURCES += [
'nsGNOMEShellService.cpp', "nsGNOMEShellService.cpp",
] ]
if CONFIG['MOZ_ENABLE_DBUS']: if CONFIG["MOZ_ENABLE_DBUS"]:
SOURCES += [ SOURCES += [
'nsGNOMEShellDBusHelper.cpp', "nsGNOMEShellDBusHelper.cpp",
'nsGNOMEShellSearchProvider.cpp', "nsGNOMEShellSearchProvider.cpp",
] ]
include('/ipc/chromium/chromium-config.mozbuild') include("/ipc/chromium/chromium-config.mozbuild")
elif CONFIG['OS_ARCH'] == 'WINNT': elif CONFIG["OS_ARCH"] == "WINNT":
XPIDL_SOURCES += [ XPIDL_SOURCES += [
'nsIWindowsShellService.idl', "nsIWindowsShellService.idl",
] ]
SOURCES += [ SOURCES += [
'nsWindowsShellService.cpp', "nsWindowsShellService.cpp",
'WindowsDefaultBrowser.cpp', "WindowsDefaultBrowser.cpp",
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'../../../other-licenses/nsis/Contrib/CityHash/cityhash', "../../../other-licenses/nsis/Contrib/CityHash/cityhash",
] ]
XPIDL_MODULE = 'shellservice' XPIDL_MODULE = "shellservice"
if SOURCES: if SOURCES:
FINAL_LIBRARY = 'browsercomps' FINAL_LIBRARY = "browsercomps"
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'HeadlessShell.jsm', "HeadlessShell.jsm",
'ScreenshotChild.jsm', "ScreenshotChild.jsm",
'ShellService.jsm', "ShellService.jsm",
] ]
for var in ('MOZ_APP_NAME', 'MOZ_APP_VERSION'): for var in ("MOZ_APP_NAME", "MOZ_APP_VERSION"):
DEFINES[var] = '"%s"' % CONFIG[var] DEFINES[var] = '"%s"' % CONFIG[var]
CXXFLAGS += CONFIG['TK_CFLAGS'] CXXFLAGS += CONFIG["TK_CFLAGS"]
if CONFIG['MOZ_ENABLE_DBUS']: if CONFIG["MOZ_ENABLE_DBUS"]:
CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS'] CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"]
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'Shell Integration') BUG_COMPONENT = ("Firefox", "Shell Integration")

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

@ -34,24 +34,40 @@ import sys
def main(): def main():
parser = argparse.ArgumentParser(description="Utility to print, set, or " + parser = argparse.ArgumentParser(
"check the path to image being used as " + description="Utility to print, set, or "
"the desktop background image. By " + + "check the path to image being used as "
"default, prints the path to the " + + "the desktop background image. By "
"current desktop background image.") + "default, prints the path to the "
parser.add_argument("-v", "--verbose", action="store_true", + "current desktop background image."
)
parser.add_argument(
"-v",
"--verbose",
action="store_true",
help="print verbose debugging information", help="print verbose debugging information",
default=False) default=False,
)
group = parser.add_mutually_exclusive_group() group = parser.add_mutually_exclusive_group()
group.add_argument("-s", "--set-background-image", group.add_argument(
dest='newBackgroundImagePath', required=False, "-s",
help="path to the new background image to set. A zero " + "--set-background-image",
"exit code indicates no errors occurred.", default=None) dest="newBackgroundImagePath",
group.add_argument("-c", "--check-background-image", required=False,
dest='checkBackgroundImagePath', required=False, help="path to the new background image to set. A zero "
help="check if the provided background image path " + + "exit code indicates no errors occurred.",
"matches the provided path. A zero exit code " + default=None,
"indicates the paths match.", default=None) )
group.add_argument(
"-c",
"--check-background-image",
dest="checkBackgroundImagePath",
required=False,
help="check if the provided background image path "
+ "matches the provided path. A zero exit code "
+ "indicates the paths match.",
default=None,
)
args = parser.parse_args() args = parser.parse_args()
# Using logging for verbose output # Using logging for verbose output
@ -59,12 +75,14 @@ def main():
logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
else: else:
logging.basicConfig(level=logging.CRITICAL) logging.basicConfig(level=logging.CRITICAL)
logger = logging.getLogger('desktopImage') logger = logging.getLogger("desktopImage")
# Print what we're going to do # Print what we're going to do
if args.checkBackgroundImagePath is not None: if args.checkBackgroundImagePath is not None:
logger.debug("checking provided desktop image %s matches current " logger.debug(
"image" % args.checkBackgroundImagePath) "checking provided desktop image %s matches current "
"image" % args.checkBackgroundImagePath
)
elif args.newBackgroundImagePath is not None: elif args.newBackgroundImagePath is not None:
logger.debug("setting image to %s " % args.newBackgroundImagePath) logger.debug("setting image to %s " % args.newBackgroundImagePath)
else: else:
@ -121,7 +139,8 @@ def main():
status = False status = False
(status, error) = ws.setDesktopImageURL_forScreen_options_error_( (status, error) = ws.setDesktopImageURL_forScreen_options_error_(
newImageURL, focussedScreen, None, None) newImageURL, focussedScreen, None, None
)
if not status: if not status:
raise RuntimeError("setDesktopImageURL error") raise RuntimeError("setDesktopImageURL error")
@ -145,7 +164,7 @@ def getCurrentDesktopImageURL(focussedScreen, workspace, logger):
return imageURL return imageURL
if __name__ == '__main__': if __name__ == "__main__":
if not main(): if not main():
sys.exit(1) sys.exit(1)
else: else:

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

@ -4,28 +4,28 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ['content/jar.mn'] JAR_MANIFESTS += ["content/jar.mn"]
BROWSER_CHROME_MANIFESTS += ['tests/browser/browser.ini'] BROWSER_CHROME_MANIFESTS += ["tests/browser/browser.ini"]
XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell/xpcshell.ini'] XPCSHELL_TESTS_MANIFESTS += ["tests/xpcshell/xpcshell.ini"]
XPCOM_MANIFESTS += [ XPCOM_MANIFESTS += [
'components.conf', "components.conf",
] ]
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'SiteSpecificBrowserService.jsm', "SiteSpecificBrowserService.jsm",
] ]
EXTRA_JS_MODULES.ssb += [ EXTRA_JS_MODULES.ssb += [
'ImageTools.jsm', "ImageTools.jsm",
] ]
FINAL_TARGET_FILES.actors += [ FINAL_TARGET_FILES.actors += [
'SiteSpecificBrowserChild.jsm', "SiteSpecificBrowserChild.jsm",
'SiteSpecificBrowserParent.jsm', "SiteSpecificBrowserParent.jsm",
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
EXTRA_JS_MODULES.ssb += [ EXTRA_JS_MODULES.ssb += [
'WindowsSupport.jsm', "WindowsSupport.jsm",
] ]

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

@ -2,23 +2,22 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini'] BROWSER_CHROME_MANIFESTS += ["test/browser/browser.ini"]
XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini'] XPCSHELL_TESTS_MANIFESTS += ["test/xpcshell/xpcshell.ini"]
EXTRA_JS_MODULES.syncedtabs += [ EXTRA_JS_MODULES.syncedtabs += [
'EventEmitter.jsm', "EventEmitter.jsm",
'SyncedTabsDeckComponent.js', "SyncedTabsDeckComponent.js",
'SyncedTabsDeckStore.js', "SyncedTabsDeckStore.js",
'SyncedTabsDeckView.js', "SyncedTabsDeckView.js",
'SyncedTabsListStore.js', "SyncedTabsListStore.js",
'TabListComponent.js', "TabListComponent.js",
'TabListView.js', "TabListView.js",
'util.js', "util.js",
] ]
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Firefox', 'Sync') BUG_COMPONENT = ("Firefox", "Sync")

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

@ -2,14 +2,14 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
with Files('**'): with Files("**"):
BUG_COMPONENT = ('Core', 'Widget: Cocoa') BUG_COMPONENT = ("Core", "Widget: Cocoa")
BROWSER_CHROME_MANIFESTS += ['tests/browser/browser.ini'] BROWSER_CHROME_MANIFESTS += ["tests/browser/browser.ini"]
EXTRA_COMPONENTS += [ EXTRA_COMPONENTS += [
'MacTouchBar.js', "MacTouchBar.js",
'MacTouchBar.manifest', "MacTouchBar.manifest",
] ]
SPHINX_TREES['/browser/touchbar'] = 'docs' SPHINX_TREES["/browser/touchbar"] = "docs"

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

@ -4,4 +4,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ['jar.mn'] JAR_MANIFESTS += ["jar.mn"]

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше