DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (9767f3d2f79f)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
# -*- 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("**"):
    BUG_COMPONENT = ("Core", "DOM: Core & HTML")

TEST_DIRS += ['test']

XPIDL_SOURCES += [
    'nsIScriptError.idl'
]

XPIDL_MODULE = 'dom_bindings'

EXPORTS.ipc += [
    'ErrorIPCUtils.h',
]

EXPORTS.mozilla += [
    'ErrorResult.h',
    'RootedOwningNonNull.h',
    'RootedRefPtr.h',
]

EXPORTS.mozilla.dom += [
    'AtomList.h',
    'BindingDeclarations.h',
    'BindingUtils.h',
    'CallbackFunction.h',
    'CallbackInterface.h',
    'CallbackObject.h',
    'Date.h',
    'DOMJSClass.h',
    'DOMJSProxyHandler.h',
    'DOMString.h',
    'Errors.msg',
    'Exceptions.h',
    'FakeString.h',
    'IterableIterator.h',
    'JSSlots.h',
    'NonRefcountedDOMObject.h',
    'Nullable.h',
    'PrimitiveConversions.h',
    'ReadableStream.h',
    'Record.h',
    'RemoteObjectProxy.h',
    'RootedDictionary.h',
    'SimpleGlobalObject.h',
    'SpiderMonkeyInterface.h',
    'StructuredClone.h',
    'ToJSValue.h',
    'TypedArray.h',
    'UnionMember.h',
    'WebIDLGlobalNameHash.h',
    'XrayExpandoClass.h',
]

# Generated bindings reference *Binding.h, not mozilla/dom/*Binding.h. And,
# since we generate exported bindings directly to $(DIST)/include, we need
# to add that path to the search list.
#
# Ideally, binding generation uses the prefixed header file names.
# Bug 932082 tracks.
LOCAL_INCLUDES += [
    '!/dist/include/mozilla/dom',
]

LOCAL_INCLUDES += [
    '/dom/base',
    '/dom/battery',
    '/dom/canvas',
    '/dom/geolocation',
    '/dom/html',
    '/dom/indexedDB',
    '/dom/media/webaudio',
    '/dom/media/webspeech/recognition',
    '/dom/svg',
    '/dom/xbl',
    '/dom/xml',
    '/dom/xslt/base',
    '/dom/xslt/xpath',
    '/dom/xul',
    '/js/xpconnect/src',
    '/js/xpconnect/wrappers',
    '/layout/generic',
    '/layout/style',
    '/layout/xul/tree',
    '/media/mtransport',
    '/media/webrtc/',
    '/media/webrtc/signaling/src/common/time_profiling',
    '/media/webrtc/signaling/src/peerconnection',
    '/media/webrtc/trunk/',
]

LOCAL_INCLUDES += ['/third_party/msgpack/include']

DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
DEFINES['GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER'] = True

UNIFIED_SOURCES += [
    'BindingUtils.cpp',
    'CallbackInterface.cpp',
    'CallbackObject.cpp',
    'Date.cpp',
    'DOMJSProxyHandler.cpp',
    'Exceptions.cpp',
    'IterableIterator.cpp',
    'nsScriptError.cpp',
    'nsScriptErrorWithStack.cpp',
    'RemoteObjectProxy.cpp',
    'SimpleGlobalObject.cpp',
    'ToJSValue.cpp',
    'WebIDLGlobalNameHash.cpp',
]

SOURCES += [
    'StructuredClone.cpp',
]

# Some tests, including those for for maplike and setlike, require bindings
# to be built, which means they must be included in libxul. This breaks the
# "no test classes are exported" rule stated in the test/ directory, but it's
# the only way this will work. Test classes are only built in debug mode, and
# all tests requiring use of them are only run in debug mode.
if CONFIG['MOZ_DEBUG'] and CONFIG['ENABLE_TESTS']:
    EXPORTS.mozilla.dom += [
        "test/TestFunctions.h",
        "test/TestInterfaceIterableDouble.h",
        "test/TestInterfaceIterableDoubleUnion.h",
        "test/TestInterfaceIterableSingle.h",
        "test/TestInterfaceMaplike.h",
        "test/TestInterfaceMaplikeObject.h",
        "test/TestInterfaceSetlike.h",
        "test/TestInterfaceSetlikeNode.h",
        "test/WrapperCachedNonISupportsTestInterface.h",
        ]
    UNIFIED_SOURCES += [
        "test/TestFunctions.cpp",
        "test/TestInterfaceIterableDouble.cpp",
        "test/TestInterfaceIterableDoubleUnion.cpp",
        "test/TestInterfaceIterableSingle.cpp",
        "test/TestInterfaceMaplike.cpp",
        "test/TestInterfaceMaplikeObject.cpp",
        "test/TestInterfaceSetlike.cpp",
        "test/TestInterfaceSetlikeNode.cpp",
        "test/WrapperCachedNonISupportsTestInterface.cpp",
        ]

include('/ipc/chromium/chromium-config.mozbuild')

FINAL_LIBRARY = 'xul'

SPHINX_TREES['webidl'] = 'docs'

with Files('docs/**'):
    SCHEDULES.exclusive = ['docs']

SPHINX_PYTHON_PACKAGE_DIRS += ['mozwebidlcodegen']

with Files('mozwebidlcodegen/**.py'):
    SCHEDULES.inclusive += ['docs']

if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
    # This is needed for Window.webidl
    DEFINES['HAVE_SIDEBAR'] = True


PYTHON_UNITTEST_MANIFESTS += [
    'mozwebidlcodegen/test/python.ini',
]

if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
    CXXFLAGS += ['-Wno-error=shadow']
    # Suppress warnings in third-party code.
    CXXFLAGS += [
        '-Wno-maybe-uninitialized',
    ]

if CONFIG['COMPILE_ENVIRONMENT']:
    GENERATED_FILES += ['CSS2Properties.webidl']
    css_props = GENERATED_FILES['CSS2Properties.webidl']
    css_props.script = 'GenerateCSS2PropertiesWebIDL.py:generate'
    css_props.inputs = [
        '/dom/webidl/CSS2Properties.webidl.in',
        '!/layout/style/ServoCSSPropList.py',
    ]