From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- dom/base/moz.build | 634 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 634 insertions(+) create mode 100644 dom/base/moz.build (limited to 'dom/base/moz.build') diff --git a/dom/base/moz.build b/dom/base/moz.build new file mode 100644 index 0000000000..14c9f9dd96 --- /dev/null +++ b/dom/base/moz.build @@ -0,0 +1,634 @@ +# -*- 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("*Selection*"): + BUG_COMPONENT = ("Core", "DOM: Selection") + +with Files("**"): + BUG_COMPONENT = ("Core", "DOM: Core & HTML") + +TEST_DIRS += ["test"] + +if CONFIG["FUZZING"]: + if CONFIG["FUZZING_INTERFACES"]: + TEST_DIRS += ["fuzztest"] + +# Add libFuzzer configuration directives +include("/tools/fuzzing/libfuzzer-config.mozbuild") + +XPIDL_SOURCES += [ + "mozIDOMWindow.idl", + "nsIContentPolicy.idl", + "nsIDOMRequestService.idl", + "nsIDroppedLinkHandler.idl", + "nsIEventSourceEventService.idl", + "nsIImageLoadingContent.idl", + "nsIMessageManager.idl", + "nsIObjectLoadingContent.idl", + "nsIScriptableContentIterator.idl", + "nsIScriptChannel.idl", + "nsISelectionController.idl", + "nsISelectionDisplay.idl", + "nsISelectionListener.idl", + "nsISlowScriptDebug.idl", +] + +XPIDL_MODULE = "dom" + +EXPORTS += [ + "AttrArray.h", + "AutocompleteFieldList.h", + "Crypto.h", + "HTMLSplitOnSpacesTokenizer.h", + "IframeSandboxKeywordList.h", + "mozAutoDocUpdate.h", + "NodeUbiReporting.h", + "nsAttrName.h", + "nsAttrValue.h", + "nsAttrValueInlines.h", + "nsCaseTreatment.h", + "nsChildContentList.h", + "nsContentCID.h", + "nsContentCreatorFunctions.h", + "nsContentList.h", + "nsContentListDeclarations.h", + "nsContentPermissionHelper.h", + "nsContentPolicyUtils.h", + "nsContentSink.h", + "nsContentTypeParser.h", + "nsContentUtils.h", + "nsCopySupport.h", + "nsDeprecatedOperationList.h", + "nsDocElementCreatedNotificationRunner.h", + "nsDocumentWarningList.h", + "nsDOMAttributeMap.h", + "nsDOMCID.h", + "nsDOMJSUtils.h", + "nsDOMMutationObserver.h", + "nsDOMNavigationTiming.h", + "nsDOMString.h", + "nsDOMTokenList.h", + "nsFocusManager.h", + "nsFrameLoader.h", # Because binding headers include it. + "nsFrameLoaderOwner.h", + "nsFrameMessageManager.h", + "nsGlobalWindowInner.h", # Because binding headers include it. + "nsGlobalWindowOuter.h", # Because binding headers include it. + "nsIAnimationObserver.h", + "nsIContent.h", + "nsIContentInlines.h", + "nsIDocumentObserver.h", + "nsIGlobalObject.h", + "nsImageLoadingContent.h", + "nsIMutationObserver.h", + "nsINode.h", + "nsINodeList.h", + "nsIScriptContext.h", + "nsIScriptGlobalObject.h", + "nsIScriptObjectPrincipal.h", + "nsJSEnvironment.h", + "nsJSUtils.h", + "nsLineBreaker.h", + "nsNameSpaceManager.h", + "nsNodeInfoManager.h", + "nsPIDOMWindow.h", + "nsPIDOMWindowInlines.h", + "nsPIWindowRoot.h", + "nsPropertyTable.h", + "nsRange.h", + "nsSandboxFlags.h", + "nsStructuredCloneContainer.h", + "nsStubAnimationObserver.h", + "nsStubDocumentObserver.h", + "nsStubMutationObserver.h", + "nsStyledElement.h", + "nsTextFragment.h", + "nsTextNode.h", + "nsTraversal.h", + "nsTreeSanitizer.h", + "nsViewportInfo.h", + "nsWindowMemoryReporter.h", + "nsWindowSizes.h", + "nsWrapperCache.h", + "nsWrapperCacheInlines.h", + "XPathGenerator.h", +] + +if CONFIG["MOZ_WEBRTC"]: + EXPORTS += [ + "nsDOMDataChannel.h", + "nsDOMDataChannelDeclarations.h", + ] + +EXPORTS.mozilla += [ + "CallState.h", + "ContentIterator.h", + "CORSMode.h", + "FlushType.h", + "FullscreenChange.h", + "GlobalTeardownObserver.h", + "IdentifierMapEntry.h", + "PointerLockManager.h", + "RangeBoundary.h", + "RangeUtils.h", + "ScriptableContentIterator.h", + "ScrollingMetrics.h", + "SelectionChangeEventDispatcher.h", + "TextInputProcessor.h", + "UseCounter.h", +] + +EXPORTS.mozilla.dom += [ + "!UseCounterList.h", + "!UseCounterWorkerList.h", + "AbstractRange.h", + "AncestorIterator.h", + "AnimationFrameProvider.h", + "AnonymousContent.h", + "Attr.h", + "AutoPrintEventDispatcher.h", + "AutoSuppressEventHandlingAndSuspend.h", + "BarProps.h", + "BindContext.h", + "BodyConsumer.h", + "BodyUtil.h", + "BorrowedAttrInfo.h", + "CCGCScheduler.h", + "CharacterData.h", + "ChildIterator.h", + "ChildProcessMessageManager.h", + "ChromeMessageBroadcaster.h", + "ChromeMessageSender.h", + "ChromeNodeList.h", + "ChromeUtils.h", + "Comment.h", + "CompressionStream.h", + "ContentFrameMessageManager.h", + "ContentProcessMessageManager.h", + "CustomElementRegistry.h", + "DecompressionStream.h", + "DirectionalityUtils.h", + "DocGroup.h", + "Document.h", + "DocumentFragment.h", + "DocumentInlines.h", + "DocumentOrShadowRoot.h", + "DocumentType.h", + "DOMArena.h", + "DOMException.h", + "DOMImplementation.h", + "DOMIntersectionObserver.h", + "DOMMatrix.h", + "DOMMozPromiseRequestHolder.h", + "DOMParser.h", + "DOMPoint.h", + "DOMQuad.h", + "DOMRect.h", + "DOMRequest.h", + "DOMStringList.h", + "DOMTokenListSupportedTokens.h", + "Element.h", + "ElementInlines.h", + "EventSource.h", + "EventSourceEventService.h", + "External.h", + "FilteredNodeIterator.h", + "FormData.h", + "FragmentOrElement.h", + "FromParser.h", + "GeneratedImageContent.h", + "Highlight.h", + "HighlightRegistry.h", + "IdleDeadline.h", + "IdleRequest.h", + "IDTracker.h", + "ImageEncoder.h", + "ImageTracker.h", + "IntlUtils.h", + "JSExecutionContext.h", + "Link.h", + "LinkStyle.h", + "Location.h", + "LocationBase.h", + "MaybeCrossOriginObject.h", + "MessageBroadcaster.h", + "MessageListenerManager.h", + "MessageManagerCallback.h", + "MessageManagerGlobal.h", + "MessageSender.h", + "MimeType.h", + "MozQueryInterface.h", + "MutationObservers.h", + "NameSpaceConstants.h", + "Navigator.h", + "NodeInfo.h", + "NodeInfoInlines.h", + "NodeIterator.h", + "ParentProcessMessageManager.h", + "PlacesBookmark.h", + "PlacesBookmarkAddition.h", + "PlacesBookmarkChanged.h", + "PlacesBookmarkGuid.h", + "PlacesBookmarkKeyword.h", + "PlacesBookmarkMoved.h", + "PlacesBookmarkRemoved.h", + "PlacesBookmarkTags.h", + "PlacesBookmarkTime.h", + "PlacesBookmarkTitle.h", + "PlacesBookmarkUrl.h", + "PlacesEvent.h", + "PlacesFavicon.h", + "PlacesHistoryCleared.h", + "PlacesObservers.h", + "PlacesPurgeCaches.h", + "PlacesRanking.h", + "PlacesVisit.h", + "PlacesVisitRemoved.h", + "PlacesVisitTitle.h", + "PlacesWeakCallbackWrapper.h", + "PopoverData.h", + "PopupBlocker.h", + "Pose.h", + "PostMessageEvent.h", + "ProcessMessageManager.h", + "RadioGroupContainer.h", + "ResizeObserver.h", + "ResponsiveImageSelector.h", + "SameProcessMessageQueue.h", + "ScreenLuminance.h", + "ScreenOrientation.h", + "Selection.h", + "SerializedStackHolder.h", + "ShadowIncludingTreeIterator.h", + "ShadowRoot.h", + "StaticRange.h", + "StructuredCloneBlob.h", + "StructuredCloneHolder.h", + "StructuredCloneTags.h", + "StructuredCloneTester.h", + "StyledRange.h", + "StyleSheetList.h", + "SubtleCrypto.h", + "SyncMessageSender.h", + "TestUtils.h", + "Text.h", + "Timeout.h", + "TimeoutHandler.h", + "TimeoutManager.h", + "TreeIterator.h", + "TreeOrderedArray.h", + "TreeOrderedArrayInlines.h", + "TreeWalker.h", + "UIDirectionManager.h", + "UseCounterMetrics.h", + "UserActivation.h", + "ViewportMetaData.h", + "VisualViewport.h", + "WindowFeatures.h", + "WindowProxyHolder.h", +] + +if CONFIG["FUZZING"]: + EXPORTS.mozilla.dom += [ + "FuzzingFunctions.h", + ] + +if CONFIG["COMPILE_ENVIRONMENT"]: + EXPORTS.mozilla.dom += [ + "!GeneratedElementDocumentState.h", + "RustTypes.h", + ] + + CbindgenHeader( + "GeneratedElementDocumentState.h", + inputs=["rust"], + ) + +UNIFIED_SOURCES += [ + "!UseCounterMetrics.cpp", + "AbstractRange.cpp", + "AnimationFrameProvider.cpp", + "AnonymousContent.cpp", + "Attr.cpp", + "AttrArray.cpp", + "BarProps.cpp", + "BindContext.cpp", + "BodyConsumer.cpp", + "BodyUtil.cpp", + "BorrowedAttrInfo.cpp", + "CCGCScheduler.cpp", + "CharacterData.cpp", + "ChildIterator.cpp", + "ChromeMessageBroadcaster.cpp", + "ChromeMessageSender.cpp", + "ChromeNodeList.cpp", + "ChromeUtils.cpp", + "Comment.cpp", + "ContentFrameMessageManager.cpp", + "ContentIterator.cpp", + "ContentProcessMessageManager.cpp", + "Crypto.cpp", + "CustomElementRegistry.cpp", + "DirectionalityUtils.cpp", + "DocGroup.cpp", + "Document.cpp", + "DocumentFragment.cpp", + "DocumentOrShadowRoot.cpp", + "DocumentType.cpp", + "DOMException.cpp", + "DOMImplementation.cpp", + "DOMMatrix.cpp", + "DOMParser.cpp", + "DOMPoint.cpp", + "DOMQuad.cpp", + "DOMRect.cpp", + "DOMRequest.cpp", + "DOMStringList.cpp", + "Element.cpp", + "EventSource.cpp", + "EventSourceEventService.cpp", + "External.cpp", + "FormData.cpp", + "FragmentOrElement.cpp", + "GeneratedImageContent.cpp", + "GlobalTeardownObserver.cpp", + "Highlight.cpp", + "HighlightRegistry.cpp", + "IdleDeadline.cpp", + "IdleRequest.cpp", + "IDTracker.cpp", + "ImageEncoder.cpp", + "ImageTracker.cpp", + "InProcessBrowserChildMessageManager.cpp", + "IntlUtils.cpp", + "JSExecutionContext.cpp", + "Link.cpp", + "LinkStyle.cpp", + "Location.cpp", + "LocationBase.cpp", + "MaybeCrossOriginObject.cpp", + "MessageBroadcaster.cpp", + "MessageListenerManager.cpp", + "MessageManagerGlobal.cpp", + "MessageSender.cpp", + "MimeType.cpp", + "MozQueryInterface.cpp", + "MutationObservers.cpp", + "Navigator.cpp", + "NodeInfo.cpp", + "NodeIterator.cpp", + "NodeUbiReporting.cpp", + "nsAttrValue.cpp", + "nsAttrValueOrString.cpp", + "nsCCUncollectableMarker.cpp", + "nsContentAreaDragDrop.cpp", + "nsContentList.cpp", + "nsContentPermissionHelper.cpp", + "nsContentPolicy.cpp", + "nsContentSink.cpp", + "nsContentTypeParser.cpp", + "nsCopySupport.cpp", + "nsDataDocumentContentPolicy.cpp", + "nsDOMAttributeMap.cpp", + "nsDOMCaretPosition.cpp", + "nsDOMMutationObserver.cpp", + "nsDOMNavigationTiming.cpp", + "nsDOMTokenList.cpp", + "nsFocusManager.cpp", + "nsFrameLoader.cpp", + "nsFrameLoaderOwner.cpp", + "nsGlobalWindowCommands.cpp", + "nsHistory.cpp", + "nsIGlobalObject.cpp", + "nsINode.cpp", + "nsJSEnvironment.cpp", + "nsJSUtils.cpp", + "nsLineBreaker.cpp", + "nsMimeTypeArray.cpp", + "nsNameSpaceManager.cpp", + "nsNoDataProtocolContentPolicy.cpp", + "nsNodeInfoManager.cpp", + "nsOpenURIInFrameParams.cpp", + "nsPropertyTable.cpp", + "nsQueryContentEventResult.cpp", + "nsRange.cpp", + "nsScreen.cpp", + "nsStructuredCloneContainer.cpp", + "nsStubAnimationObserver.cpp", + "nsStubDocumentObserver.cpp", + "nsStubMutationObserver.cpp", + "nsStyledElement.cpp", + "nsSyncLoadService.cpp", + "nsTextFragment.cpp", + "nsTextNode.cpp", + "nsTraversal.cpp", + "nsTreeSanitizer.cpp", + "nsViewportInfo.cpp", + "nsWindowMemoryReporter.cpp", + "nsWindowRoot.cpp", + "nsWrapperCache.cpp", + "ParentProcessMessageManager.cpp", + "PointerLockManager.cpp", + "PopoverData.cpp", + "PopupBlocker.cpp", + "Pose.cpp", + "PostMessageEvent.cpp", + "ProcessMessageManager.cpp", + "RadioGroupContainer.cpp", + "RangeUtils.cpp", + "RemoteOuterWindowProxy.cpp", + "ResizeObserver.cpp", + "ResponsiveImageSelector.cpp", + "SameProcessMessageQueue.cpp", + "ScreenLuminance.cpp", + "ScreenOrientation.cpp", + "ScriptableContentIterator.cpp", + "ScrollingMetrics.cpp", + "Selection.cpp", + "SelectionChangeEventDispatcher.cpp", + "SerializedStackHolder.cpp", + "ShadowRoot.cpp", + "StaticRange.cpp", + "StorageAccessPermissionRequest.cpp", + "StructuredCloneBlob.cpp", + "StructuredCloneHolder.cpp", + "StructuredCloneTester.cpp", + "StyledRange.cpp", + "StyleSheetList.cpp", + "SubtleCrypto.cpp", + "TestUtils.cpp", + "Text.cpp", + "TextInputProcessor.cpp", + "ThirdPartyUtil.cpp", + "Timeout.cpp", + "TimeoutBudgetManager.cpp", + "TimeoutExecutor.cpp", + "TimeoutHandler.cpp", + "TimeoutManager.cpp", + "TreeWalker.cpp", + "UIDirectionManager.cpp", + "UserActivation.cpp", + "ViewportMetaData.cpp", + "VisualViewport.cpp", + "WindowDestroyedEvent.cpp", + "WindowFeatures.cpp", + "WindowNamedPropertiesHandler.cpp", + "XPathGenerator.cpp", +] + +if CONFIG["MOZ_WEBRTC"]: + UNIFIED_SOURCES += [ + "nsDOMDataChannel.cpp", + ] + +if CONFIG["FUZZING"]: + UNIFIED_SOURCES += [ + "FuzzingFunctions.cpp", + ] + +if CONFIG["MOZ_PLACES"]: + UNIFIED_SOURCES += [ + "PlacesEvent.cpp", + "PlacesObservers.cpp", + "PlacesWeakCallbackWrapper.cpp", + ] + +# on win32 if we add these files to UNIFIED_SOURCES then the compiler generates +# larger stack frames for some recursive functions that cause us to hit stack +# overflows (see bug 1824565) +if CONFIG["OS_ARCH"] == "WINNT" and CONFIG["TARGET_CPU"] == "x86": + SOURCES += [ + "CompressionStream.cpp", + "DecompressionStream.cpp", + ] +else: + UNIFIED_SOURCES += [ + "CompressionStream.cpp", + "DecompressionStream.cpp", + ] + +# these files couldn't be in UNIFIED_SOURCES for now for reasons given below: +SOURCES += [ + # Several conflicts with other bindings. + "DOMIntersectionObserver.cpp", + # Because of OS X headers. + "nsContentUtils.cpp", + # this file doesn't like windows.h + "nsDOMWindowUtils.cpp", + # Conflicts with windows.h's definition of SendMessage. + "nsFrameMessageManager.cpp", + # These files have a #error "Never include unwrapped windows.h in this file!" + "nsGlobalWindowInner.cpp", + "nsGlobalWindowOuter.cpp", + # Conflicts with windows.h's definition of LoadImage. + "nsImageLoadingContent.cpp", + # Because of OS X headers. + "nsObjectLoadingContent.cpp", + # nsPluginArray.cpp includes npapi.h indirectly, and that includes a lot of system headers + "nsPluginArray.cpp", +] + +# Are we targeting x86-32 or x86-64? If so, we want to include SSE2 code for +# nsTextFragment.cpp +if CONFIG["INTEL_ARCHITECTURE"]: + SOURCES += ["nsTextFragmentSSE2.cpp"] + SOURCES["nsTextFragmentSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"] + +# Are we targeting PowerPC? If so, we can enable a SIMD version for +# nsTextFragment.cpp as well. +if CONFIG["TARGET_CPU"].startswith("ppc"): + SOURCES += ["nsTextFragmentVMX.cpp"] + SOURCES["nsTextFragmentVMX.cpp"].flags += CONFIG["PPC_VMX_FLAGS"] + +EXTRA_JS_MODULES += [ + "ContentAreaDropListener.sys.mjs", + "DOMRequestHelper.sys.mjs", + "IndexedDBHelper.sys.mjs", + "LocationHelper.sys.mjs", + "ProcessSelector.sys.mjs", + "SlowScriptDebug.sys.mjs", +] + +XPCOM_MANIFESTS += [ + "components.conf", +] + +LOCAL_INCLUDES += [ + "../battery", + "../events", + "../media", + "../network", + "/caps", + "/docshell/base", + "/dom/base", + "/dom/file", + "/dom/geolocation", + "/dom/html", + "/dom/ipc", + "/dom/storage", + "/dom/svg", + "/dom/xml", + "/dom/xslt/xpath", + "/dom/xul", + "/extensions/spellcheck/src", + "/gfx/2d", + "/image", + "/js/xpconnect/loader", + "/js/xpconnect/src", + "/js/xpconnect/wrappers", + "/layout/base", + "/layout/forms", + "/layout/generic", + "/layout/style", + "/layout/xul", + "/netwerk/base", + "/netwerk/protocol/http", + "/netwerk/url-classifier", + "/parser/htmlparser", + "/security/manager/ssl", + "/third_party/xsimd/include", + "/widget", + "/xpcom/ds", +] + +if CONFIG["MOZ_WEBRTC"]: + LOCAL_INCLUDES += [ + "/netwerk/sctp/datachannel", + ] + +include("/ipc/chromium/chromium-config.mozbuild") + +FINAL_LIBRARY = "xul" + +if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": + CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] + +GeneratedFile( + "UseCounterList.h", + script="gen-usecounters.py", + entry_point="use_counter_list", + inputs=["UseCounters.conf"], +) + +GeneratedFile( + "UseCounterWorkerList.h", + script="gen-usecounters.py", + entry_point="use_counter_list", + inputs=["UseCountersWorker.conf"], +) + +GeneratedFile( + "UseCounterMetrics.cpp", + script="usecounters.py", + entry_point="metric_map", + inputs=[ + "UseCounters.conf", + "UseCountersWorker.conf", + "nsDeprecatedOperationList.h", + "!/layout/style/ServoCSSPropList.py", + "/servo/components/style/properties/counted_unknown_properties.py", + ], +) -- cgit v1.2.3