mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
02a7b4ebdf
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
189 lines
4.4 KiB
Python
189 lines
4.4 KiB
Python
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
|
# vim: set filetype=python:
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
with Files("Restyle*"):
|
|
BUG_COMPONENT = ("Core", "CSS Parsing and Computation")
|
|
|
|
with Files("nsStyle*"):
|
|
BUG_COMPONENT = ("Core", "CSS Parsing and Computation")
|
|
|
|
with Files("nsChangeHint.h"):
|
|
BUG_COMPONENT = ("Core", "CSS Parsing and Computation")
|
|
|
|
with Files("nsBidi*"):
|
|
BUG_COMPONENT = ("Core", "Layout: Text and Fonts")
|
|
|
|
with Files("AccessibleCaret*"):
|
|
BUG_COMPONENT = ("Core", "DOM: Selection")
|
|
|
|
XPIDL_SOURCES += [
|
|
"nsILayoutHistoryState.idl",
|
|
"nsIPreloadedStyleSheet.idl",
|
|
"nsIStyleSheetService.idl",
|
|
]
|
|
|
|
if CONFIG["MOZ_DEBUG"]:
|
|
UNIFIED_SOURCES += [
|
|
"nsAutoLayoutPhase.cpp",
|
|
]
|
|
|
|
XPIDL_MODULE = "layout_base"
|
|
|
|
EXPORTS += [
|
|
"CaretAssociationHint.h",
|
|
"FrameProperties.h",
|
|
"LayoutConstants.h",
|
|
"LayoutLogging.h",
|
|
"MobileViewportManager.h",
|
|
"nsAutoLayoutPhase.h",
|
|
"nsBidi.h",
|
|
"nsBidiPresUtils.h",
|
|
"nsCaret.h",
|
|
"nsChangeHint.h",
|
|
"nsCompatibility.h",
|
|
"nsCounterManager.h",
|
|
"nsCSSFrameConstructor.h",
|
|
"nsFrameManager.h",
|
|
"nsFrameTraversal.h",
|
|
"nsGenConList.h",
|
|
"nsIFrameTraversal.h",
|
|
"nsIPercentBSizeObserver.h",
|
|
"nsIReflowCallback.h",
|
|
"nsLayoutUtils.h",
|
|
"nsPresArena.h",
|
|
"nsPresArenaObjectList.h",
|
|
"nsPresContext.h",
|
|
"nsPresContextInlines.h",
|
|
"nsQuoteList.h",
|
|
"nsRefreshDriver.h",
|
|
"nsRefreshObservers.h",
|
|
"nsStyleChangeList.h",
|
|
"nsStyleSheetService.h",
|
|
"StackArena.h",
|
|
"TouchManager.h",
|
|
"Units.h",
|
|
"UnitTransforms.h",
|
|
"WordMovementType.h",
|
|
"ZoomConstraintsClient.h",
|
|
]
|
|
|
|
EXPORTS.mozilla += [
|
|
"AccessibleCaretEventHub.h",
|
|
"ArenaObjectID.h",
|
|
"DisplayPortUtils.h",
|
|
"GeckoMVMContext.h",
|
|
"GeometryUtils.h",
|
|
"MediaEmulationData.h",
|
|
"MotionPathUtils.h",
|
|
"MVMContext.h",
|
|
"OverflowChangedTracker.h",
|
|
"PositionedEventTargeting.h",
|
|
"PresShell.h",
|
|
"PresShellForwards.h",
|
|
"PresShellInlines.h",
|
|
"RelativeTo.h",
|
|
"RestyleManager.h",
|
|
"ScrollStyles.h",
|
|
"ScrollTypes.h",
|
|
"ShapeUtils.h",
|
|
"StaticPresData.h",
|
|
"SurfaceFromElementResult.h",
|
|
"ViewportUtils.h",
|
|
]
|
|
|
|
EXPORTS.mozilla.layout += [
|
|
"LayoutTelemetryTools.h",
|
|
]
|
|
|
|
UNIFIED_SOURCES += [
|
|
"AccessibleCaret.cpp",
|
|
"AccessibleCaretEventHub.cpp",
|
|
"AccessibleCaretManager.cpp",
|
|
"DisplayPortUtils.cpp",
|
|
"GeckoMVMContext.cpp",
|
|
"GeometryUtils.cpp",
|
|
"LayoutLogging.cpp",
|
|
"LayoutTelemetryTools.cpp",
|
|
"MobileViewportManager.cpp",
|
|
"MotionPathUtils.cpp",
|
|
"nsBidi.cpp",
|
|
"nsBidiPresUtils.cpp",
|
|
"nsCaret.cpp",
|
|
"nsCounterManager.cpp",
|
|
"nsCSSColorUtils.cpp",
|
|
"nsCSSFrameConstructor.cpp",
|
|
"nsDocumentViewer.cpp",
|
|
"nsFrameManager.cpp",
|
|
"nsFrameTraversal.cpp",
|
|
"nsGenConList.cpp",
|
|
"nsLayoutDebugger.cpp",
|
|
"nsLayoutHistoryState.cpp",
|
|
"nsLayoutUtils.cpp",
|
|
"nsPresArena.cpp",
|
|
"nsPresContext.cpp",
|
|
"nsQuoteList.cpp",
|
|
"nsRefreshObservers.cpp",
|
|
"nsStyleChangeList.cpp",
|
|
"nsStyleSheetService.cpp",
|
|
"PositionedEventTargeting.cpp",
|
|
"PresShell.cpp",
|
|
"RestyleManager.cpp",
|
|
"ScrollStyles.cpp",
|
|
"ShapeUtils.cpp",
|
|
"StackArena.cpp",
|
|
"StaticPresData.cpp",
|
|
"TouchManager.cpp",
|
|
"ViewportUtils.cpp",
|
|
"ZoomConstraintsClient.cpp",
|
|
]
|
|
|
|
# nsRefreshDriver.cpp needs to be built separately because of name clashes in the OS X headers
|
|
SOURCES += [
|
|
"nsRefreshDriver.cpp",
|
|
]
|
|
|
|
if CONFIG["ENABLE_TESTS"]:
|
|
DIRS += ["gtest"]
|
|
|
|
include("/ipc/chromium/chromium-config.mozbuild")
|
|
|
|
LOCAL_INCLUDES += [
|
|
"../forms",
|
|
"../generic",
|
|
"../mathml",
|
|
"../painting",
|
|
"../printing",
|
|
"../style",
|
|
"../tables",
|
|
"../xul",
|
|
"../xul/tree/",
|
|
"/docshell/base",
|
|
"/dom/base",
|
|
"/dom/html",
|
|
"/dom/svg",
|
|
"/dom/xul",
|
|
"/view",
|
|
]
|
|
|
|
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
|
|
LOCAL_INCLUDES += [
|
|
"/widget/android",
|
|
]
|
|
|
|
IPDL_SOURCES += [
|
|
"PresState.ipdlh",
|
|
]
|
|
|
|
FINAL_LIBRARY = "xul"
|
|
|
|
BROWSER_CHROME_MANIFESTS += ["tests/browser.ini"]
|
|
MARIONETTE_LAYOUT_MANIFESTS += ["tests/marionette/manifest.ini"]
|
|
MOCHITEST_MANIFESTS += ["tests/mochitest.ini"]
|
|
MOCHITEST_CHROME_MANIFESTS += ["tests/chrome/chrome.ini"]
|
|
|
|
if CONFIG["CC_TYPE"] in ("clang", "gcc"):
|
|
CXXFLAGS += ["-Wno-error=shadow"]
|