1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 with Files("*Selection*"):
8 BUG_COMPONENT = ("Core", "DOM: Selection")
11 BUG_COMPONENT = ("Core", "DOM: Core & HTML")
16 if CONFIG["FUZZING_INTERFACES"]:
17 TEST_DIRS += ["fuzztest"]
19 # Add libFuzzer configuration directives
20 include("/tools/fuzzing/libfuzzer-config.mozbuild")
24 "nsIContentPolicy.idl",
25 "nsIDroppedLinkHandler.idl",
26 "nsIEventSourceEventService.idl",
27 "nsIImageLoadingContent.idl",
28 "nsIMessageManager.idl",
29 "nsIObjectLoadingContent.idl",
30 "nsIScriptableContentIterator.idl",
31 "nsIScriptChannel.idl",
32 "nsISelectionController.idl",
33 "nsISelectionDisplay.idl",
34 "nsISelectionListener.idl",
35 "nsISlowScriptDebug.idl",
42 "AutocompleteFieldList.h",
44 "HTMLSplitOnSpacesTokenizer.h",
45 "IframeSandboxKeywordList.h",
50 "nsAttrValueInlines.h",
52 "nsChildContentList.h",
53 "nsContentCreatorFunctions.h",
55 "nsContentListDeclarations.h",
56 "nsContentPermissionHelper.h",
57 "nsContentPolicyUtils.h",
59 "nsContentTypeParser.h",
62 "nsDeprecatedOperationList.h",
63 "nsDocElementCreatedNotificationRunner.h",
64 "nsDocumentWarningList.h",
65 "nsDOMAttributeMap.h",
68 "nsDOMMutationObserver.h",
69 "nsDOMNavigationTiming.h",
73 "nsFrameLoader.h", # Because binding headers include it.
74 "nsFrameLoaderOwner.h",
75 "nsFrameMessageManager.h",
76 "nsGlobalWindowInner.h", # Because binding headers include it.
77 "nsGlobalWindowOuter.h", # Because binding headers include it.
78 "nsIAnimationObserver.h",
80 "nsIContentInlines.h",
81 "nsIDocumentObserver.h",
83 "nsImageLoadingContent.h",
84 "nsIMutationObserver.h",
88 "nsIScriptGlobalObject.h",
89 "nsIScriptObjectPrincipal.h",
93 "nsNameSpaceManager.h",
94 "nsNodeInfoManager.h",
96 "nsPIDOMWindowInlines.h",
101 "nsStructuredCloneContainer.h",
102 "nsStubAnimationObserver.h",
103 "nsStubDocumentObserver.h",
104 "nsStubMutationObserver.h",
111 "nsWindowMemoryReporter.h",
114 "nsWrapperCacheInlines.h",
118 if CONFIG["MOZ_WEBRTC"]:
120 "nsDOMDataChannel.h",
121 "nsDOMDataChannelDeclarations.h",
129 "FullscreenChange.h",
130 "GlobalTeardownObserver.h",
131 "IdentifierMapEntry.h",
132 "PointerLockManager.h",
135 "ScriptableContentIterator.h",
136 "ScrollingMetrics.h",
137 "SelectionChangeEventDispatcher.h",
138 "TextInputProcessor.h",
142 EXPORTS.mozilla.dom += [
144 "!UseCounterWorkerList.h",
146 "AncestorIterator.h",
147 "AnimationFrameProvider.h",
148 "AnonymousContent.h",
150 "AutoPrintEventDispatcher.h",
151 "AutoSuppressEventHandlingAndSuspend.h",
156 "BorrowedAttrInfo.h",
160 "ChildProcessMessageManager.h",
161 "ChromeMessageBroadcaster.h",
162 "ChromeMessageSender.h",
166 "CompressionStream.h",
167 "ContentFrameMessageManager.h",
168 "ContentProcessMessageManager.h",
169 "CrossShadowBoundaryRange.h",
170 "CustomElementRegistry.h",
171 "DecompressionStream.h",
172 "DirectionalityUtils.h",
175 "DocumentFragment.h",
177 "DocumentOrShadowRoot.h",
181 "DOMImplementation.h",
182 "DOMIntersectionObserver.h",
184 "DOMMozPromiseRequestHolder.h",
190 "DOMTokenListSupportedTokens.h",
194 "EventSourceEventService.h",
196 "FilteredNodeIterator.h",
198 "FragmentDirective.h",
199 "FragmentOrElement.h",
201 "GeneratedImageContent.h",
203 "HighlightRegistry.h",
210 "JSExecutionContext.h",
215 "MaybeCrossOriginObject.h",
216 "MessageBroadcaster.h",
217 "MessageListenerManager.h",
218 "MessageManagerCallback.h",
219 "MessageManagerGlobal.h",
222 "MozQueryInterface.h",
223 "MutationObservers.h",
224 "NameSpaceConstants.h",
229 "ParentProcessMessageManager.h",
231 "PlacesBookmarkAddition.h",
232 "PlacesBookmarkChanged.h",
233 "PlacesBookmarkGuid.h",
234 "PlacesBookmarkKeyword.h",
235 "PlacesBookmarkMoved.h",
236 "PlacesBookmarkRemoved.h",
237 "PlacesBookmarkTags.h",
238 "PlacesBookmarkTime.h",
239 "PlacesBookmarkTitle.h",
240 "PlacesBookmarkUrl.h",
242 "PlacesEventCounts.h",
244 "PlacesHistoryCleared.h",
246 "PlacesPurgeCaches.h",
249 "PlacesVisitRemoved.h",
250 "PlacesVisitTitle.h",
251 "PlacesWeakCallbackWrapper.h",
255 "PostMessageEvent.h",
256 "ProcessMessageManager.h",
257 "RadioGroupContainer.h",
259 "ResponsiveImageSelector.h",
260 "SameProcessMessageQueue.h",
262 "ScreenOrientation.h",
264 "SerializedStackHolder.h",
265 "ShadowIncludingTreeIterator.h",
268 "StructuredCloneBlob.h",
269 "StructuredCloneHolder.h",
270 "StructuredCloneTags.h",
271 "StructuredCloneTester.h",
275 "SyncMessageSender.h",
282 "TreeOrderedArray.h",
283 "TreeOrderedArrayInlines.h",
285 "UIDirectionManager.h",
287 "UseCounterMetrics.h",
289 "ViewportMetaData.h",
292 "WindowProxyHolder.h",
295 if CONFIG["FUZZING"]:
296 EXPORTS.mozilla.dom += [
297 "FuzzingFunctions.h",
300 if CONFIG["COMPILE_ENVIRONMENT"]:
301 EXPORTS.mozilla.dom += [
302 "!fragmentdirectives_ffi_generated.h",
303 "!GeneratedElementDocumentState.h",
308 "GeneratedElementDocumentState.h",
313 "fragmentdirectives_ffi_generated.h",
314 inputs=["fragmentdirectives"],
318 "!UseCounterMetrics.cpp",
320 "AnimationFrameProvider.cpp",
321 "AnonymousContent.cpp",
328 "BorrowedAttrInfo.cpp",
332 "ChromeMessageBroadcaster.cpp",
333 "ChromeMessageSender.cpp",
334 "ChromeNodeList.cpp",
337 "ContentFrameMessageManager.cpp",
338 "ContentIterator.cpp",
339 "ContentProcessMessageManager.cpp",
340 "CrossShadowBoundaryRange.cpp",
342 "CustomElementRegistry.cpp",
343 "DirectionalityUtils.cpp",
346 "DocumentFragment.cpp",
347 "DocumentOrShadowRoot.cpp",
350 "DOMImplementation.cpp",
359 "EventSourceEventService.cpp",
362 "FragmentDirective.cpp",
363 "FragmentOrElement.cpp",
364 "GeneratedImageContent.cpp",
365 "GlobalTeardownObserver.cpp",
367 "HighlightRegistry.cpp",
373 "InProcessBrowserChildMessageManager.cpp",
375 "JSExecutionContext.cpp",
380 "MaybeCrossOriginObject.cpp",
381 "MessageBroadcaster.cpp",
382 "MessageListenerManager.cpp",
383 "MessageManagerGlobal.cpp",
386 "MozQueryInterface.cpp",
387 "MutationObservers.cpp",
391 "NodeUbiReporting.cpp",
393 "nsAttrValueOrString.cpp",
394 "nsCCUncollectableMarker.cpp",
395 "nsContentAreaDragDrop.cpp",
397 "nsContentPermissionHelper.cpp",
398 "nsContentPolicy.cpp",
400 "nsContentTypeParser.cpp",
402 "nsDataDocumentContentPolicy.cpp",
403 "nsDOMAttributeMap.cpp",
404 "nsDOMCaretPosition.cpp",
405 "nsDOMMutationObserver.cpp",
406 "nsDOMNavigationTiming.cpp",
407 "nsDOMTokenList.cpp",
408 "nsFocusManager.cpp",
410 "nsFrameLoaderOwner.cpp",
411 "nsGlobalWindowCommands.cpp",
413 "nsIGlobalObject.cpp",
415 "nsJSEnvironment.cpp",
418 "nsMimeTypeArray.cpp",
419 "nsNameSpaceManager.cpp",
420 "nsNoDataProtocolContentPolicy.cpp",
421 "nsNodeInfoManager.cpp",
422 "nsOpenURIInFrameParams.cpp",
423 "nsPropertyTable.cpp",
424 "nsQueryContentEventResult.cpp",
427 "nsStructuredCloneContainer.cpp",
428 "nsStubAnimationObserver.cpp",
429 "nsStubDocumentObserver.cpp",
430 "nsStubMutationObserver.cpp",
431 "nsStyledElement.cpp",
432 "nsSyncLoadService.cpp",
433 "nsTextFragment.cpp",
436 "nsTreeSanitizer.cpp",
437 "nsViewportInfo.cpp",
438 "nsWindowMemoryReporter.cpp",
440 "nsWrapperCache.cpp",
441 "ParentProcessMessageManager.cpp",
442 "PointerLockManager.cpp",
446 "PostMessageEvent.cpp",
447 "ProcessMessageManager.cpp",
448 "RadioGroupContainer.cpp",
450 "RemoteOuterWindowProxy.cpp",
451 "ResizeObserver.cpp",
452 "ResponsiveImageSelector.cpp",
453 "SameProcessMessageQueue.cpp",
454 "ScreenLuminance.cpp",
455 "ScreenOrientation.cpp",
456 "ScriptableContentIterator.cpp",
457 "ScrollingMetrics.cpp",
459 "SelectionChangeEventDispatcher.cpp",
460 "SerializedStackHolder.cpp",
463 "StorageAccessPermissionRequest.cpp",
464 "StructuredCloneBlob.cpp",
465 "StructuredCloneHolder.cpp",
466 "StructuredCloneTester.cpp",
468 "StyleSheetList.cpp",
472 "TextInputProcessor.cpp",
473 "ThirdPartyUtil.cpp",
475 "TimeoutBudgetManager.cpp",
476 "TimeoutExecutor.cpp",
477 "TimeoutHandler.cpp",
478 "TimeoutManager.cpp",
480 "UIDirectionManager.cpp",
481 "UserActivation.cpp",
482 "ViewportMetaData.cpp",
483 "VisualViewport.cpp",
484 "WindowDestroyedEvent.cpp",
485 "WindowFeatures.cpp",
486 "WindowNamedPropertiesHandler.cpp",
487 "XPathGenerator.cpp",
490 if CONFIG["MOZ_WEBRTC"]:
492 "nsDOMDataChannel.cpp",
495 if CONFIG["FUZZING"]:
497 "FuzzingFunctions.cpp",
500 if CONFIG["MOZ_PLACES"]:
503 "PlacesEventCounts.cpp",
504 "PlacesObservers.cpp",
505 "PlacesWeakCallbackWrapper.cpp",
508 # on win32 if we add these files to UNIFIED_SOURCES then the compiler generates
509 # larger stack frames for some recursive functions that cause us to hit stack
510 # overflows (see bug 1824565)
511 if CONFIG["OS_ARCH"] == "WINNT" and CONFIG["TARGET_CPU"] == "x86":
513 "CompressionStream.cpp",
514 "DecompressionStream.cpp",
518 "CompressionStream.cpp",
519 "DecompressionStream.cpp",
522 # these files couldn't be in UNIFIED_SOURCES for now for reasons given below:
524 # Several conflicts with other bindings.
525 "DOMIntersectionObserver.cpp",
526 # Because of OS X headers.
527 "nsContentUtils.cpp",
528 # this file doesn't like windows.h
529 "nsDOMWindowUtils.cpp",
530 # Conflicts with windows.h's definition of SendMessage.
531 "nsFrameMessageManager.cpp",
532 # These files have a #error "Never include unwrapped windows.h in this file!"
533 "nsGlobalWindowInner.cpp",
534 "nsGlobalWindowOuter.cpp",
535 # Conflicts with windows.h's definition of LoadImage.
536 "nsImageLoadingContent.cpp",
537 # Because of OS X headers.
538 "nsObjectLoadingContent.cpp",
539 # nsPluginArray.cpp includes npapi.h indirectly, and that includes a lot of system headers
543 # Are we targeting x86-32 or x86-64? If so, we want to include SSE2 code for
545 if CONFIG["INTEL_ARCHITECTURE"]:
546 SOURCES += ["nsTextFragmentSSE2.cpp"]
547 SOURCES["nsTextFragmentSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
549 # Are we targeting PowerPC? If so, we can enable a SIMD version for
550 # nsTextFragment.cpp as well.
551 if CONFIG["TARGET_CPU"].startswith("ppc"):
552 SOURCES += ["nsTextFragmentVMX.cpp"]
553 SOURCES["nsTextFragmentVMX.cpp"].flags += CONFIG["PPC_VMX_FLAGS"]
555 EXTRA_JS_MODULES += [
556 "ContentAreaDropListener.sys.mjs",
557 "IndexedDBHelper.sys.mjs",
558 "LocationHelper.sys.mjs",
559 "ProcessSelector.sys.mjs",
560 "SlowScriptDebug.sys.mjs",
584 "/extensions/spellcheck/src",
587 "/js/xpconnect/loader",
589 "/js/xpconnect/wrappers",
596 "/netwerk/protocol/http",
597 "/netwerk/url-classifier",
598 "/parser/htmlparser",
599 "/security/manager/ssl",
600 "/third_party/xsimd/include",
605 if CONFIG["MOZ_WEBRTC"]:
607 "/netwerk/sctp/datachannel",
610 include("/ipc/chromium/chromium-config.mozbuild")
612 FINAL_LIBRARY = "xul"
614 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
615 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
619 script="gen-usecounters.py",
620 entry_point="use_counter_list",
621 inputs=["UseCounters.conf"],
625 "UseCounterWorkerList.h",
626 script="gen-usecounters.py",
627 entry_point="use_counter_list",
628 inputs=["UseCountersWorker.conf"],
632 "UseCounterMetrics.cpp",
633 script="usecounters.py",
634 entry_point="metric_map",
637 "UseCountersWorker.conf",
638 "nsDeprecatedOperationList.h",
639 "!/layout/style/ServoCSSPropList.py",
640 "/servo/components/style/properties/counted_unknown_properties.py",