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 "IdentifierMapEntry.h",
133 "PointerLockManager.h",
136 "ScriptableContentIterator.h",
137 "ScrollingMetrics.h",
138 "SelectionChangeEventDispatcher.h",
139 "TextInputProcessor.h",
143 EXPORTS.mozilla.dom += [
145 "!UseCounterWorkerList.h",
147 "AncestorIterator.h",
148 "AnchorAreaFormRelValues.h",
149 "AnimationFrameProvider.h",
150 "AnonymousContent.h",
152 "AutoPrintEventDispatcher.h",
153 "AutoSuppressEventHandlingAndSuspend.h",
158 "BorrowedAttrInfo.h",
162 "ChildProcessMessageManager.h",
163 "ChromeMessageBroadcaster.h",
164 "ChromeMessageSender.h",
168 "CompressionStream.h",
169 "ContentFrameMessageManager.h",
170 "ContentProcessMessageManager.h",
171 "CustomElementRegistry.h",
172 "DecompressionStream.h",
173 "DirectionalityUtils.h",
176 "DocumentFragment.h",
178 "DocumentOrShadowRoot.h",
182 "DOMImplementation.h",
183 "DOMIntersectionObserver.h",
185 "DOMMozPromiseRequestHolder.h",
192 "DOMTokenListSupportedTokens.h",
196 "EventSourceEventService.h",
198 "FilteredNodeIterator.h",
200 "FragmentOrElement.h",
202 "GeneratedImageContent.h",
204 "HighlightRegistry.h",
211 "JSExecutionContext.h",
216 "MaybeCrossOriginObject.h",
217 "MessageBroadcaster.h",
218 "MessageListenerManager.h",
219 "MessageManagerCallback.h",
220 "MessageManagerGlobal.h",
223 "MozQueryInterface.h",
224 "MutationObservers.h",
225 "NameSpaceConstants.h",
230 "ParentProcessMessageManager.h",
232 "PlacesBookmarkAddition.h",
233 "PlacesBookmarkChanged.h",
234 "PlacesBookmarkGuid.h",
235 "PlacesBookmarkKeyword.h",
236 "PlacesBookmarkMoved.h",
237 "PlacesBookmarkRemoved.h",
238 "PlacesBookmarkTags.h",
239 "PlacesBookmarkTime.h",
240 "PlacesBookmarkTitle.h",
241 "PlacesBookmarkUrl.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 "ViewportMetaData.h",
290 "WindowProxyHolder.h",
293 if CONFIG["FUZZING"]:
294 EXPORTS.mozilla.dom += [
295 "FuzzingFunctions.h",
298 if CONFIG["COMPILE_ENVIRONMENT"]:
299 EXPORTS.mozilla.dom += [
300 "!GeneratedElementDocumentState.h",
305 "GeneratedElementDocumentState.h",
311 "AnchorAreaFormRelValues.cpp",
312 "AnimationFrameProvider.cpp",
313 "AnonymousContent.cpp",
320 "BorrowedAttrInfo.cpp",
324 "ChromeMessageBroadcaster.cpp",
325 "ChromeMessageSender.cpp",
326 "ChromeNodeList.cpp",
329 "ContentFrameMessageManager.cpp",
330 "ContentIterator.cpp",
331 "ContentProcessMessageManager.cpp",
333 "CustomElementRegistry.cpp",
334 "DirectionalityUtils.cpp",
337 "DocumentFragment.cpp",
338 "DocumentOrShadowRoot.cpp",
341 "DOMImplementation.cpp",
351 "EventSourceEventService.cpp",
354 "FragmentOrElement.cpp",
355 "GeneratedImageContent.cpp",
357 "HighlightRegistry.cpp",
363 "InProcessBrowserChildMessageManager.cpp",
365 "JSExecutionContext.cpp",
370 "MaybeCrossOriginObject.cpp",
371 "MessageBroadcaster.cpp",
372 "MessageListenerManager.cpp",
373 "MessageManagerGlobal.cpp",
376 "MozQueryInterface.cpp",
377 "MutationObservers.cpp",
381 "NodeUbiReporting.cpp",
383 "nsAttrValueOrString.cpp",
384 "nsCCUncollectableMarker.cpp",
385 "nsContentAreaDragDrop.cpp",
387 "nsContentPermissionHelper.cpp",
388 "nsContentPolicy.cpp",
390 "nsContentTypeParser.cpp",
392 "nsDataDocumentContentPolicy.cpp",
393 "nsDOMAttributeMap.cpp",
394 "nsDOMCaretPosition.cpp",
395 "nsDOMMutationObserver.cpp",
396 "nsDOMNavigationTiming.cpp",
397 "nsDOMTokenList.cpp",
398 "nsFocusManager.cpp",
400 "nsFrameLoaderOwner.cpp",
401 "nsGlobalWindowCommands.cpp",
403 "nsIGlobalObject.cpp",
405 "nsJSEnvironment.cpp",
408 "nsMimeTypeArray.cpp",
409 "nsNameSpaceManager.cpp",
410 "nsNoDataProtocolContentPolicy.cpp",
411 "nsNodeInfoManager.cpp",
412 "nsOpenURIInFrameParams.cpp",
413 "nsPropertyTable.cpp",
414 "nsQueryContentEventResult.cpp",
417 "nsStructuredCloneContainer.cpp",
418 "nsStubAnimationObserver.cpp",
419 "nsStubDocumentObserver.cpp",
420 "nsStubMutationObserver.cpp",
421 "nsStyledElement.cpp",
422 "nsSyncLoadService.cpp",
423 "nsTextFragment.cpp",
426 "nsTreeSanitizer.cpp",
427 "nsViewportInfo.cpp",
428 "nsWindowMemoryReporter.cpp",
430 "nsWrapperCache.cpp",
431 "ParentProcessMessageManager.cpp",
432 "PointerLockManager.cpp",
436 "PostMessageEvent.cpp",
437 "ProcessMessageManager.cpp",
438 "RadioGroupContainer.cpp",
440 "RemoteOuterWindowProxy.cpp",
441 "ResizeObserver.cpp",
442 "ResponsiveImageSelector.cpp",
443 "SameProcessMessageQueue.cpp",
444 "ScreenLuminance.cpp",
445 "ScreenOrientation.cpp",
446 "ScriptableContentIterator.cpp",
447 "ScrollingMetrics.cpp",
449 "SelectionChangeEventDispatcher.cpp",
450 "SerializedStackHolder.cpp",
453 "StorageAccessPermissionRequest.cpp",
454 "StructuredCloneBlob.cpp",
455 "StructuredCloneHolder.cpp",
456 "StructuredCloneTester.cpp",
458 "StyleSheetList.cpp",
462 "TextInputProcessor.cpp",
463 "ThirdPartyUtil.cpp",
465 "TimeoutBudgetManager.cpp",
466 "TimeoutExecutor.cpp",
467 "TimeoutHandler.cpp",
468 "TimeoutManager.cpp",
470 "UIDirectionManager.cpp",
471 "UserActivation.cpp",
472 "ViewportMetaData.cpp",
473 "VisualViewport.cpp",
474 "WindowDestroyedEvent.cpp",
475 "WindowFeatures.cpp",
476 "WindowNamedPropertiesHandler.cpp",
477 "XPathGenerator.cpp",
480 if CONFIG["MOZ_WEBRTC"]:
482 "nsDOMDataChannel.cpp",
485 if CONFIG["FUZZING"]:
487 "FuzzingFunctions.cpp",
490 if CONFIG["MOZ_PLACES"]:
493 "PlacesObservers.cpp",
494 "PlacesWeakCallbackWrapper.cpp",
497 # on win32 if we add these files to UNIFIED_SOURCES then the compiler generates
498 # larger stack frames for some recursive functions that cause us to hit stack
499 # overflows (see bug 1824565)
500 if CONFIG["OS_ARCH"] == "WINNT" and CONFIG["CPU_ARCH"] == "x86":
502 "CompressionStream.cpp",
503 "DecompressionStream.cpp",
507 "CompressionStream.cpp",
508 "DecompressionStream.cpp",
511 # these files couldn't be in UNIFIED_SOURCES for now for reasons given below:
513 # Several conflicts with other bindings.
514 "DOMIntersectionObserver.cpp",
515 # Because of OS X headers.
516 "nsContentUtils.cpp",
517 # this file doesn't like windows.h
518 "nsDOMWindowUtils.cpp",
519 # Conflicts with windows.h's definition of SendMessage.
520 "nsFrameMessageManager.cpp",
521 # These files have a #error "Never include unwrapped windows.h in this file!"
522 "nsGlobalWindowInner.cpp",
523 "nsGlobalWindowOuter.cpp",
524 # Conflicts with windows.h's definition of LoadImage.
525 "nsImageLoadingContent.cpp",
526 # Because of OS X headers.
527 "nsObjectLoadingContent.cpp",
528 # nsPluginArray.cpp includes npapi.h indirectly, and that includes a lot of system headers
532 # Are we targeting x86-32 or x86-64? If so, we want to include SSE2 code for
534 if CONFIG["INTEL_ARCHITECTURE"]:
535 SOURCES += ["nsTextFragmentSSE2.cpp"]
536 SOURCES["nsTextFragmentSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
538 # Are we targeting PowerPC? If so, we can enable a SIMD version for
539 # nsTextFragment.cpp as well.
540 if CONFIG["CPU_ARCH"].startswith("ppc"):
541 SOURCES += ["nsTextFragmentVMX.cpp"]
542 SOURCES["nsTextFragmentVMX.cpp"].flags += CONFIG["PPC_VMX_FLAGS"]
544 EXTRA_JS_MODULES += [
545 "ContentAreaDropListener.sys.mjs",
546 "DOMRequestHelper.sys.mjs",
547 "IndexedDBHelper.sys.mjs",
548 "LocationHelper.sys.mjs",
549 "ProcessSelector.sys.mjs",
550 "SlowScriptDebug.sys.mjs",
574 "/extensions/spellcheck/src",
577 "/js/xpconnect/loader",
579 "/js/xpconnect/wrappers",
586 "/netwerk/protocol/http",
587 "/netwerk/url-classifier",
588 "/parser/htmlparser",
589 "/security/manager/ssl",
590 "/third_party/xsimd/include",
595 if CONFIG["MOZ_WEBRTC"]:
597 "/netwerk/sctp/datachannel",
600 include("/ipc/chromium/chromium-config.mozbuild")
602 FINAL_LIBRARY = "xul"
604 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
605 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
609 script="gen-usecounters.py",
610 entry_point="use_counter_list",
611 inputs=["UseCounters.conf"],
615 "UseCounterWorkerList.h",
616 script="gen-usecounters.py",
617 entry_point="use_counter_list",
618 inputs=["UseCountersWorker.conf"],