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 "nsIDOMRequestService.idl",
26 "nsIDroppedLinkHandler.idl",
27 "nsIEventSourceEventService.idl",
28 "nsIImageLoadingContent.idl",
29 "nsIMessageManager.idl",
30 "nsIObjectLoadingContent.idl",
31 "nsIScriptableContentIterator.idl",
32 "nsIScriptChannel.idl",
33 "nsISelectionController.idl",
34 "nsISelectionDisplay.idl",
35 "nsISelectionListener.idl",
36 "nsISlowScriptDebug.idl",
43 "AutocompleteFieldList.h",
45 "HTMLSplitOnSpacesTokenizer.h",
46 "IframeSandboxKeywordList.h",
51 "nsAttrValueInlines.h",
53 "nsChildContentList.h",
55 "nsContentCreatorFunctions.h",
57 "nsContentListDeclarations.h",
58 "nsContentPermissionHelper.h",
59 "nsContentPolicyUtils.h",
61 "nsContentTypeParser.h",
64 "nsDeprecatedOperationList.h",
65 "nsDocElementCreatedNotificationRunner.h",
66 "nsDocumentWarningList.h",
67 "nsDOMAttributeMap.h",
70 "nsDOMMutationObserver.h",
71 "nsDOMNavigationTiming.h",
75 "nsFrameLoader.h", # Because binding headers include it.
76 "nsFrameLoaderOwner.h",
77 "nsFrameMessageManager.h",
78 "nsGlobalWindowInner.h", # Because binding headers include it.
79 "nsGlobalWindowOuter.h", # Because binding headers include it.
80 "nsIAnimationObserver.h",
82 "nsIContentInlines.h",
83 "nsIDocumentObserver.h",
85 "nsImageLoadingContent.h",
86 "nsIMutationObserver.h",
90 "nsIScriptGlobalObject.h",
91 "nsIScriptObjectPrincipal.h",
95 "nsNameSpaceManager.h",
96 "nsNodeInfoManager.h",
98 "nsPIDOMWindowInlines.h",
103 "nsStructuredCloneContainer.h",
104 "nsStubAnimationObserver.h",
105 "nsStubDocumentObserver.h",
106 "nsStubMutationObserver.h",
113 "nsWindowMemoryReporter.h",
116 "nsWrapperCacheInlines.h",
120 if CONFIG["MOZ_WEBRTC"]:
122 "nsDOMDataChannel.h",
123 "nsDOMDataChannelDeclarations.h",
131 "FullscreenChange.h",
132 "GlobalTeardownObserver.h",
133 "IdentifierMapEntry.h",
134 "PointerLockManager.h",
137 "ScriptableContentIterator.h",
138 "ScrollingMetrics.h",
139 "SelectionChangeEventDispatcher.h",
140 "TextInputProcessor.h",
144 EXPORTS.mozilla.dom += [
146 "!UseCounterWorkerList.h",
148 "AncestorIterator.h",
149 "AnchorAreaFormRelValues.h",
150 "AnimationFrameProvider.h",
151 "AnonymousContent.h",
153 "AutoPrintEventDispatcher.h",
154 "AutoSuppressEventHandlingAndSuspend.h",
159 "BorrowedAttrInfo.h",
163 "ChildProcessMessageManager.h",
164 "ChromeMessageBroadcaster.h",
165 "ChromeMessageSender.h",
169 "CompressionStream.h",
170 "ContentFrameMessageManager.h",
171 "ContentProcessMessageManager.h",
172 "CustomElementRegistry.h",
173 "DecompressionStream.h",
174 "DirectionalityUtils.h",
177 "DocumentFragment.h",
179 "DocumentOrShadowRoot.h",
183 "DOMImplementation.h",
184 "DOMIntersectionObserver.h",
186 "DOMMozPromiseRequestHolder.h",
193 "DOMTokenListSupportedTokens.h",
197 "EventSourceEventService.h",
199 "FilteredNodeIterator.h",
201 "FragmentOrElement.h",
203 "GeneratedImageContent.h",
205 "HighlightRegistry.h",
212 "JSExecutionContext.h",
217 "MaybeCrossOriginObject.h",
218 "MessageBroadcaster.h",
219 "MessageListenerManager.h",
220 "MessageManagerCallback.h",
221 "MessageManagerGlobal.h",
224 "MozQueryInterface.h",
225 "MutationObservers.h",
226 "NameSpaceConstants.h",
231 "ParentProcessMessageManager.h",
233 "PlacesBookmarkAddition.h",
234 "PlacesBookmarkChanged.h",
235 "PlacesBookmarkGuid.h",
236 "PlacesBookmarkKeyword.h",
237 "PlacesBookmarkMoved.h",
238 "PlacesBookmarkRemoved.h",
239 "PlacesBookmarkTags.h",
240 "PlacesBookmarkTime.h",
241 "PlacesBookmarkTitle.h",
242 "PlacesBookmarkUrl.h",
245 "PlacesHistoryCleared.h",
247 "PlacesPurgeCaches.h",
250 "PlacesVisitRemoved.h",
251 "PlacesVisitTitle.h",
252 "PlacesWeakCallbackWrapper.h",
256 "PostMessageEvent.h",
257 "ProcessMessageManager.h",
258 "RadioGroupContainer.h",
260 "ResponsiveImageSelector.h",
261 "SameProcessMessageQueue.h",
263 "ScreenOrientation.h",
265 "SerializedStackHolder.h",
266 "ShadowIncludingTreeIterator.h",
269 "StructuredCloneBlob.h",
270 "StructuredCloneHolder.h",
271 "StructuredCloneTags.h",
272 "StructuredCloneTester.h",
276 "SyncMessageSender.h",
283 "TreeOrderedArray.h",
284 "TreeOrderedArrayInlines.h",
286 "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 "!GeneratedElementDocumentState.h",
307 "GeneratedElementDocumentState.h",
312 "!UseCounterMetrics.cpp",
314 "AnchorAreaFormRelValues.cpp",
315 "AnimationFrameProvider.cpp",
316 "AnonymousContent.cpp",
323 "BorrowedAttrInfo.cpp",
327 "ChromeMessageBroadcaster.cpp",
328 "ChromeMessageSender.cpp",
329 "ChromeNodeList.cpp",
332 "ContentFrameMessageManager.cpp",
333 "ContentIterator.cpp",
334 "ContentProcessMessageManager.cpp",
336 "CustomElementRegistry.cpp",
337 "DirectionalityUtils.cpp",
340 "DocumentFragment.cpp",
341 "DocumentOrShadowRoot.cpp",
344 "DOMImplementation.cpp",
354 "EventSourceEventService.cpp",
357 "FragmentOrElement.cpp",
358 "GeneratedImageContent.cpp",
359 "GlobalTeardownObserver.cpp",
361 "HighlightRegistry.cpp",
367 "InProcessBrowserChildMessageManager.cpp",
369 "JSExecutionContext.cpp",
374 "MaybeCrossOriginObject.cpp",
375 "MessageBroadcaster.cpp",
376 "MessageListenerManager.cpp",
377 "MessageManagerGlobal.cpp",
380 "MozQueryInterface.cpp",
381 "MutationObservers.cpp",
385 "NodeUbiReporting.cpp",
387 "nsAttrValueOrString.cpp",
388 "nsCCUncollectableMarker.cpp",
389 "nsContentAreaDragDrop.cpp",
391 "nsContentPermissionHelper.cpp",
392 "nsContentPolicy.cpp",
394 "nsContentTypeParser.cpp",
396 "nsDataDocumentContentPolicy.cpp",
397 "nsDOMAttributeMap.cpp",
398 "nsDOMCaretPosition.cpp",
399 "nsDOMMutationObserver.cpp",
400 "nsDOMNavigationTiming.cpp",
401 "nsDOMTokenList.cpp",
402 "nsFocusManager.cpp",
404 "nsFrameLoaderOwner.cpp",
405 "nsGlobalWindowCommands.cpp",
407 "nsIGlobalObject.cpp",
409 "nsJSEnvironment.cpp",
412 "nsMimeTypeArray.cpp",
413 "nsNameSpaceManager.cpp",
414 "nsNoDataProtocolContentPolicy.cpp",
415 "nsNodeInfoManager.cpp",
416 "nsOpenURIInFrameParams.cpp",
417 "nsPropertyTable.cpp",
418 "nsQueryContentEventResult.cpp",
421 "nsStructuredCloneContainer.cpp",
422 "nsStubAnimationObserver.cpp",
423 "nsStubDocumentObserver.cpp",
424 "nsStubMutationObserver.cpp",
425 "nsStyledElement.cpp",
426 "nsSyncLoadService.cpp",
427 "nsTextFragment.cpp",
430 "nsTreeSanitizer.cpp",
431 "nsViewportInfo.cpp",
432 "nsWindowMemoryReporter.cpp",
434 "nsWrapperCache.cpp",
435 "ParentProcessMessageManager.cpp",
436 "PointerLockManager.cpp",
440 "PostMessageEvent.cpp",
441 "ProcessMessageManager.cpp",
442 "RadioGroupContainer.cpp",
444 "RemoteOuterWindowProxy.cpp",
445 "ResizeObserver.cpp",
446 "ResponsiveImageSelector.cpp",
447 "SameProcessMessageQueue.cpp",
448 "ScreenLuminance.cpp",
449 "ScreenOrientation.cpp",
450 "ScriptableContentIterator.cpp",
451 "ScrollingMetrics.cpp",
453 "SelectionChangeEventDispatcher.cpp",
454 "SerializedStackHolder.cpp",
457 "StorageAccessPermissionRequest.cpp",
458 "StructuredCloneBlob.cpp",
459 "StructuredCloneHolder.cpp",
460 "StructuredCloneTester.cpp",
462 "StyleSheetList.cpp",
466 "TextInputProcessor.cpp",
467 "ThirdPartyUtil.cpp",
469 "TimeoutBudgetManager.cpp",
470 "TimeoutExecutor.cpp",
471 "TimeoutHandler.cpp",
472 "TimeoutManager.cpp",
474 "UIDirectionManager.cpp",
475 "UserActivation.cpp",
476 "ViewportMetaData.cpp",
477 "VisualViewport.cpp",
478 "WindowDestroyedEvent.cpp",
479 "WindowFeatures.cpp",
480 "WindowNamedPropertiesHandler.cpp",
481 "XPathGenerator.cpp",
484 if CONFIG["MOZ_WEBRTC"]:
486 "nsDOMDataChannel.cpp",
489 if CONFIG["FUZZING"]:
491 "FuzzingFunctions.cpp",
494 if CONFIG["MOZ_PLACES"]:
497 "PlacesObservers.cpp",
498 "PlacesWeakCallbackWrapper.cpp",
501 # on win32 if we add these files to UNIFIED_SOURCES then the compiler generates
502 # larger stack frames for some recursive functions that cause us to hit stack
503 # overflows (see bug 1824565)
504 if CONFIG["OS_ARCH"] == "WINNT" and CONFIG["TARGET_CPU"] == "x86":
506 "CompressionStream.cpp",
507 "DecompressionStream.cpp",
511 "CompressionStream.cpp",
512 "DecompressionStream.cpp",
515 # these files couldn't be in UNIFIED_SOURCES for now for reasons given below:
517 # Several conflicts with other bindings.
518 "DOMIntersectionObserver.cpp",
519 # Because of OS X headers.
520 "nsContentUtils.cpp",
521 # this file doesn't like windows.h
522 "nsDOMWindowUtils.cpp",
523 # Conflicts with windows.h's definition of SendMessage.
524 "nsFrameMessageManager.cpp",
525 # These files have a #error "Never include unwrapped windows.h in this file!"
526 "nsGlobalWindowInner.cpp",
527 "nsGlobalWindowOuter.cpp",
528 # Conflicts with windows.h's definition of LoadImage.
529 "nsImageLoadingContent.cpp",
530 # Because of OS X headers.
531 "nsObjectLoadingContent.cpp",
532 # nsPluginArray.cpp includes npapi.h indirectly, and that includes a lot of system headers
536 # Are we targeting x86-32 or x86-64? If so, we want to include SSE2 code for
538 if CONFIG["INTEL_ARCHITECTURE"]:
539 SOURCES += ["nsTextFragmentSSE2.cpp"]
540 SOURCES["nsTextFragmentSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
542 # Are we targeting PowerPC? If so, we can enable a SIMD version for
543 # nsTextFragment.cpp as well.
544 if CONFIG["TARGET_CPU"].startswith("ppc"):
545 SOURCES += ["nsTextFragmentVMX.cpp"]
546 SOURCES["nsTextFragmentVMX.cpp"].flags += CONFIG["PPC_VMX_FLAGS"]
548 EXTRA_JS_MODULES += [
549 "ContentAreaDropListener.sys.mjs",
550 "DOMRequestHelper.sys.mjs",
551 "IndexedDBHelper.sys.mjs",
552 "LocationHelper.sys.mjs",
553 "ProcessSelector.sys.mjs",
554 "SlowScriptDebug.sys.mjs",
578 "/extensions/spellcheck/src",
581 "/js/xpconnect/loader",
583 "/js/xpconnect/wrappers",
590 "/netwerk/protocol/http",
591 "/netwerk/url-classifier",
592 "/parser/htmlparser",
593 "/security/manager/ssl",
594 "/third_party/xsimd/include",
599 if CONFIG["MOZ_WEBRTC"]:
601 "/netwerk/sctp/datachannel",
604 include("/ipc/chromium/chromium-config.mozbuild")
606 FINAL_LIBRARY = "xul"
608 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
609 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
613 script="gen-usecounters.py",
614 entry_point="use_counter_list",
615 inputs=["UseCounters.conf"],
619 "UseCounterWorkerList.h",
620 script="gen-usecounters.py",
621 entry_point="use_counter_list",
622 inputs=["UseCountersWorker.conf"],
626 "UseCounterMetrics.cpp",
627 script="usecounters.py",
628 entry_point="metric_map",
631 "UseCountersWorker.conf",
632 "nsDeprecatedOperationList.h",
633 "!/layout/style/ServoCSSPropList.py",
634 "/servo/components/style/properties/counted_unknown_properties.py",