/
githubmirror
/
servo
Обзор
Документация
Войти
/
githubmirror
/
servo
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
components/script_bindings/codegen/Bindings.conf
1 737 строк
38 KB
Narfinger
script: Move GPUAdapter, GPUSupportedFeatures, GPUSupportedLimits and WGSLLanguageFeatures to script_webgpu (#46964)
10 авг 2026, 21:29
Не верифицирован
10 авг 2026, 21:29
e4c9034
Код
Авторство
О чём код?
# 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 https://mozilla.org/MPL/2.0/. # DOM Bindings Configuration. # # The WebIDL interfaces are defined in dom/webidls. For each such interface, # there is a corresponding entry in the configuration table below. # The configuration table maps each interface name to a |descriptor|. # # Valid fields for all descriptors: # * outerObjectHook: string to use in place of default value for outerObject and thisObject # JS class hooks DOMInterfaces = { 'AbortController': { 'realm': ['Abort'], }, 'AbortSignal': { 'weakReferenceable': True, 'cx':['Abort', 'Any', 'ThrowIfAborted', 'Timeout'], }, 'AbstractRange': { 'weakReferenceable': True, }, 'ANGLEInstancedArrays': { 'cx': ['DrawArraysInstancedANGLE', 'DrawElementsInstancedANGLE', 'VertexAttribDivisorANGLE'] }, 'AnalyserNode': { 'no_gc': ['GetFloatFrequencyData', 'GetByteFrequencyData', 'GetFloatTimeDomainData', 'GetByteTimeDomainData'] }, 'Attr': { 'implicitCxSetters': True, }, 'AudioBuffer': { 'cx': ['CopyFromChannel', 'CopyToChannel', 'GetChannelData'], }, 'AudioBufferSourceNode': { 'cx': ['SetBuffer', 'Start'], }, 'AudioContext': { 'realm': ['Close', 'Suspend'], 'cx':['CreateMediaElementSource', 'CreateMediaStreamDestination', 'CreateMediaStreamSource', 'CreateMediaStreamTrackSource'], }, 'BaseAudioContext': { 'cx': ['CreateBuffer', 'CreateGain', 'CreateOscillator', 'CreatePanner', 'CreateStereoPanner', 'CreateBiquadFilter', 'CreateIIRFilter', 'CreateAnalyser', 'CreateConstantSource', 'CreateChannelMerger', 'CreateChannelSplitter', 'CreateBufferSource', 'Destination', 'Listener'], 'realm': ['DecodeAudioData', 'Resume'], }, 'Blob': { 'weakReferenceable': True, 'realm': ['ArrayBuffer', 'Bytes', 'Text'], 'cx': ['Stream', 'Slice', 'TextStream'] }, 'Bluetooth': { 'realm': ['GetAvailability', 'RequestDevice'], }, 'BluetoothDevice': { 'realm': ['WatchAdvertisements'], 'cx': ['GetGatt'], }, 'BluetoothRemoteGATTCharacteristic': { 'realm': ['ReadValue', 'StartNotifications', 'StopNotifications', 'WriteValue', 'GetDescriptor', 'GetDescriptors'], }, 'BluetoothRemoteGATTDescriptor': { 'realm': ['ReadValue', 'WriteValue'], }, 'BluetoothRemoteGATTServer': { 'realm': ['Connect', 'GetPrimaryService', 'GetPrimaryServices'], 'cx': ['Disconnect'], }, 'BluetoothRemoteGATTService': { 'realm': ['GetCharacteristic', 'GetCharacteristics', 'GetIncludedService', 'GetIncludedServices'] }, 'BroadcastChannel': { 'cx': ['PostMessage'], }, 'ByteLengthQueuingStrategy': { 'cx': ['GetSize'], }, 'CacheStorage': { 'cx': ['Has'], }, 'CanvasRenderingContext2D': { 'cx': ['GetTransform', 'MeasureText', 'CreateLinearGradient', 'CreatePattern', 'CreateRadialGradient', 'CreateImageData', 'GetImageData', 'CreateImageData_'], 'no_gc': ['PutImageData', 'PutImageData_'] }, 'CharacterData': { 'cx': ['After', 'AppendData', 'Before', 'DeleteData', 'InsertData', 'Remove', 'ReplaceData', 'ReplaceWith', 'SetData'], }, 'Client': { 'cx': ['PostMessage', 'PostMessage_'], }, 'Clipboard': { 'realm': ['ReadText', 'WriteText'] }, 'ClipboardItem': { 'cx': ['Types'], 'realm': ['GetType'] }, 'console': { 'cx': ['Assert', 'Count', 'CountReset', 'Debug', 'Dir', 'Error', 'Group', 'GroupCollapsed', 'Info', 'Log', 'Time', 'TimeEnd', 'TimeLog', 'Trace', 'Warn'], }, 'CookieStore': { 'cx': ['Set', 'Set_', 'Get', 'Get_', 'GetAll', 'GetAll_', 'Delete', 'Delete_'], }, 'CountQueuingStrategy': { 'cx': ['GetSize'], }, 'Credential': { 'realm': ['IsConditionalMediationAvailable', 'WillRequestConditionalCreation'], }, 'CSS': { 'cx': ['PaintWorklet'], }, 'CSSFontFeatureValuesRule': { 'cx': ['Annotation', 'Ornaments', 'Stylistic', 'Swash', 'CharacterVariant', 'Styleset', 'HistoricalForms'], }, 'CSSGroupingRule': { 'cx': ['CssRules', 'InsertRule', 'DeleteRule'], }, 'CSSKeyframeRule': { 'cx': ['Style'], }, 'CSSKeyframesRule': { 'cx': ['CssRules', 'DeleteRule', 'FindRule'], 'no_gc': ['AppendRule', 'SetName'], }, 'CSSLayerStatementRule': { 'cx': ['NameList'], }, 'CSSMediaRule': { 'cx': ['Media'], }, 'CSSNestedDeclarations': { 'cx': ['Style'], }, 'CSSRuleList': { 'cx': ['Item', 'IndexedGetter'], }, 'CSSStyleRule': { 'cx': ['Style'], 'no_gc': ['SetSelectorText'], }, 'CSSStyleSheet': { 'realm': ['Replace'], 'cx': [ 'AddRule', 'DeleteRule', 'GetCssRules', 'GetRules', 'InsertRule', 'RemoveRule' ], 'no_gc': ['ReplaceSync'], }, 'Crypto': { 'cx': ['Subtle'], 'no_gc': ['GetRandomValues'] }, 'CSSStyleDeclaration': { 'implicitCxSetters': True, 'cx': ['RemoveProperty', 'SetProperty', 'Style'] }, 'CustomElementRegistry': { 'cx': ['Define', 'Get'], 'realm': ['WhenDefined'], 'cx_no_gc': ['Initialize', 'Upgrade'] }, 'DataTransfer': { 'cx': ['Files', 'Types'] }, 'DataTransferItem': { 'cx': ['GetAsFile', 'WebkitGetAsEntry'] }, 'DataTransferItemList': { 'cx': ['Add', 'Add_', 'IndexedGetter'] }, 'DebuggerGlobalScope': { 'additionalTraits': ["crate::interfaces::HasOrigin"], 'useSystemCompartment': True, }, 'DedicatedWorkerGlobalScope': { 'additionalTraits': ["crate::interfaces::HasOrigin"], 'cx': ['PostMessage', 'PostMessage_'], }, 'Document': { 'additionalTraits': ["crate::interfaces::DocumentHelpers"], 'cx': [ 'AdoptedStyleSheets', 'AdoptNode', 'Anchors', 'Append', 'Applets', 'Children', 'Close', 'CreateAttribute', 'CreateAttributeNS', 'CreateCDATASection', 'CreateComment', 'CreateDocumentFragment', 'CreateElement', 'CreateElementNS', 'CreateEvent', 'CreateExpression', 'CreateNSResolver', 'CreateNodeIterator', 'CreateProcessingInstruction', 'CreateRange', 'CreateTreeWalker', 'CreateTextNode', 'Embeds', 'Evaluate', 'ExecCommand', 'Fonts', 'Forms', 'GetElementsByClassName', 'GetElementsByName', 'GetElementsByTagName', 'GetElementsByTagNameNS', 'GetLocation', 'GetSelection', 'Images', 'Implementation', 'ImportNode', 'Links', 'MoveBefore', 'NamedGetter', 'Open', 'Open_', 'ParseHTML', 'ParseHTMLUnsafe', 'Plugins', 'Prepend', 'QueryCommandEnabled', 'QueryCommandIndeterm', 'QueryCommandState', 'QueryCommandValue', 'QuerySelector', 'QuerySelectorAll', 'ReplaceChildren', 'Scripts', 'SetAdoptedStyleSheets', 'SetBgColor', 'SetBody', 'SetFgColor', 'SetTitle', 'StyleSheets', 'Write', 'Writeln', ], 'cx_no_gc': ['GetElementById'], 'realm': ['ExitFullscreen'], }, 'DissimilarOriginWindow': { 'additionalTraits': ["crate::interfaces::HasOrigin"], 'cx': ['Location', 'PostMessage', 'PostMessage_', 'SetOpener', 'Opener'] }, 'DocumentFragment': { 'cx': [ 'Append', 'Children', 'MoveBefore', 'Prepend', 'QuerySelector', 'QuerySelectorAll', 'ReplaceChildren' ], 'cx_no_gc': ['GetElementById'], 'no_gc': ['ChildElementCount'] }, 'DocumentType': { 'cx': ['After', 'Before', 'Remove', 'ReplaceWith'] }, 'DOMImplementation': { 'cx': ['CreateDocument', 'CreateDocumentType', 'CreateHTMLDocument'], }, 'DOMMatrix': { 'cx': ['FromMatrix', 'FromFloat32Array', 'FromFloat64Array'], }, 'DOMMatrixReadOnly': { 'cx': ['Stringifier', 'TransformPoint', 'Multiply', 'Inverse', 'Scale', 'Translate', 'Rotate', 'RotateFromVector', 'FlipY', 'ScaleNonUniform', 'Scale3d', 'RotateAxisAngle', 'SkewX', 'SkewY', 'FlipX', 'FromFloat32Array', 'FromFloat64Array', 'FromMatrix', 'ToFloat32Array', 'ToFloat64Array'], }, 'DOMParser': { 'cx': ['ParseFromString'], }, 'DOMPoint': { 'cx': ['FromPoint'], }, 'DOMPointReadOnly': { 'cx': ['FromPoint', 'MatrixTransform'], }, 'DOMQuad': { 'cx': ['FromRect', 'FromQuad', 'GetBounds'], }, 'DOMRect': { 'cx': ['FromRect'], }, 'DOMRectReadOnly': { 'cx': ['FromRect'], }, 'DOMStringMap': { 'cx': ['NamedDeleter', 'NamedSetter'] }, "DOMTokenList": { 'cx': ['SetValue', 'Add', 'Remove', 'Toggle', 'Replace'], }, 'Element': { 'cx': [ 'After', 'Animate', 'Append', 'AttachShadow', 'Attributes', 'Before', 'Children', 'ClassList', 'GetAttribute', 'GetAttributeNS', 'GetAttributeNode', 'GetAttributeNodeNS', 'GetBoundingClientRect', 'GetClientRects', 'GetElementsByClassName', 'GetElementsByTagName', 'GetElementsByTagNameNS', 'GetHTML', 'GetInnerHTML', 'GetOuterHTML', 'HasAttribute', 'HasAttributeNS', 'InsertAdjacentElement', 'InsertAdjacentHTML', 'InsertAdjacentText', 'MoveBefore', 'Part', 'Prepend', 'QuerySelector', 'QuerySelectorAll', 'Remove', 'RemoveAttribute', 'RemoveAttributeNS', 'RemoveAttributeNode', 'ReplaceChildren', 'ReplaceWith', 'Scroll', 'ScrollBy', 'ScrollBy_', 'ScrollIntoView', 'ScrollTo', 'ScrollTo_', 'Scroll_', 'SetAttribute', 'SetAttributeNS', 'SetAttributeNode', 'SetAttributeNodeNS', 'SetHTML', 'SetHTMLUnsafe', 'ToggleAttribute', ], 'realm': ['RequestFullscreen'], 'cx_no_gc': ['GetAssignedSlot'], 'no_gc': ['ClientTop', 'ClientLeft', 'ClientWidth', 'ClientHeight'], }, 'ElementInternals': { 'cx': ['CheckValidity', 'GetValidity', 'GetLabels', 'ReportValidity', 'SetValidity', 'States'], }, 'Event': { 'cx': ['TimeStamp'], }, 'EventSource': { 'weakReferenceable': True, }, 'EventTarget': { 'cx': ['DispatchEvent'], }, 'ExtendableMessageEvent': { 'cx': ['Data', 'Ports'], }, 'FakeXRDevice': { 'cx': ['SimulateInputSourceConnection'], 'realm': ['Disconnect'], }, 'File': { 'weakReferenceable': True, }, 'FileSystemDirectoryEntry': { 'cx': ['CreateReader'], }, 'FileReader': { 'cx': ['Abort', 'ReadAsArrayBuffer', 'ReadAsBinaryString', 'ReadAsDataURL', 'ReadAsText'], }, 'FileReaderSync': { 'cx': ['ReadAsArrayBuffer'], }, 'FontFace': { 'cx': ['Load'], }, 'FontFaceSet': { 'cx': ['Add', 'Load', 'Ready', 'Clear', 'Size'], }, 'FormData': { 'cx': ['Append', 'Append_', 'Set', 'Set_'], }, 'Gamepad': { 'cx': ['Axes', 'Buttons'] }, 'GamepadHapticActuator': { 'cx': ['Effects'], 'realm': ['PlayEffect', 'Reset'], }, 'Geolocation': { 'cx': ['GetCurrentPosition', 'WatchPosition'], }, 'GlobalScope': { 'additionalTraits': ['crate::interfaces::GlobalScopeHelpers<Self>'], }, 'GPU': { 'realm': ['RequestAdapter'], 'cx': ['WgslLanguageFeatures'], }, 'GPUAdapter': { 'realm': ['RequestDevice'], }, 'GPUBindGroup': { 'no_gc': ['SetLabel'], }, 'GPUBindGroupLayout': { 'no_gc': ['SetLabel'], }, 'GPUBuffer': { 'realm': ['MapAsync'], 'cx': ['Destroy', 'GetMappedRange', 'Unmap', 'PopErrorScope'], 'no_gc': ['SetLabel'], }, 'GPUCanvasContext': { 'weakReferenceable': True, 'cx': ['GetCurrentTexture'], }, 'GPUCommandEncoder': { 'cx': ['BeginComputePass', 'BeginRenderPass', 'Finish'], 'no_gc': ['SetLabel'], }, 'GPUCommandBuffer': { 'no_gc': ['SetLabel'], }, 'GPUCompilationInfo': { 'cx': ['Messages'], }, 'GPUComputePipeline': { 'cx': ['GetBindGroupLayout'], 'no_gc': ['SetLabel'], }, 'GPUComputePassEncoder': { 'no_gc': ['SetLabel'], }, 'GPUDevice': { 'realm': ['CreateComputePipelineAsync', 'CreateRenderPipelineAsync', 'CreateShaderModule', # create promise for compilation info 'PopErrorScope', ], 'cx': [ 'CreateBuffer', 'CreateBindGroup', 'CreateBindGroupLayout', 'CreatePipelineLayout', 'CreateComputePipeline', 'CreateCommandEncoder', 'CreateTexture', 'CreateSampler', 'CreateRenderPipeline', 'CreateRenderBundleEncoder', 'CreateQuerySet', 'ImportExternalTexture', ], 'weakReferenceable': True, # for usage in GlobalScope https://github.com/servo/servo/issues/32519 'no_gc': ['SetLabel'], }, 'GPUQueue': { 'cx': ['CopyExternalImageToTexture', 'OnSubmittedWorkDone', 'WriteBuffer', 'WriteTexture'], 'no_gc': ['SetLabel'], }, 'GPUPipelineLayout': { 'no_gc': ['SetLabel'], }, 'GPUQuerySet': { 'no_gc': ['SetLabel'], }, 'GPURenderBundleEncoder': { 'cx': ['Finish'], 'no_gc': [ 'SetLabel', ], }, 'GPURenderBundle': { 'no_gc': ['SetLabel'], }, 'GPURenderPipeline': { 'cx': ['GetBindGroupLayout'], 'no_gc': ['SetLabel'], }, 'GPURenderPassEncoder': { 'no_gc': ['SetLabel'], }, 'GPUSampler': { 'no_gc': ['SetLabel'], }, 'GPUShaderModule': { 'no_gc': ['SetLabel'], }, 'GPUTexture': { 'cx': ['CreateView'], 'no_gc': ['SetLabel'], }, 'GPUTextureView': { 'no_gc': ['SetLabel'], }, 'History': { 'cx': ['PushState', 'ReplaceState', 'GetState', 'Go'] }, "HTMLAnchorElement": { "cx": ['RelList'], }, "HTMLAreaElement": { "cx": ['RelList'], }, "HTMLAudioElement": { 'cx': ['Audio'], 'weakReferenceable': True, }, 'HTMLButtonElement': { 'cx': ['CheckValidity', 'ReportValidity', 'SetCustomValidity', 'Validity', 'ValidationMessage', 'Labels'], }, 'HTMLCollection': { 'cx_no_gc': ['Length', 'Item', 'IndexedGetter', 'NamedGetter', 'NamedItem'], }, 'HTMLCanvasElement': { 'cx': ['CaptureStream', 'GetContext', 'TransferControlToOffscreen'], 'weakReferenceable': True, }, 'HTMLDataListElement': { "cx": ["Options"] }, 'HTMLDialogElement': { 'cx': ['Close', 'Show', 'ShowModal'], }, 'HTMLDocument': { 'cx': ['GetLocation', 'NamedGetter'], }, 'HTMLElement': { 'cx': [ 'AttachInternals', 'Blur', 'Click', 'Dataset', 'Focus', 'GetOnblur', 'GetOnerror', 'GetOnfocus', 'GetOnload', 'GetOnresize', 'GetOnscroll', 'Style', ], }, 'HTMLFieldSetElement': { 'cx': ['CheckValidity', 'Elements', 'ReportValidity', 'SetCustomValidity', 'Validity', 'ValidationMessage'], }, 'HTMLFormControlsCollection': { 'cx': ['NamedGetter', 'NamedItem'], 'cx_no_gc': ['IndexedGetter', 'Length'], }, 'HTMLFormElement': { 'cx': ['CheckValidity', 'ReportValidity', 'RequestSubmit', 'Submit', 'Reset', 'Elements', 'IndexedGetter', 'Length', 'NamedGetter', 'RelList'], }, 'HTMLIFrameElement': { 'cx': ['Sandbox'], }, 'HTMLImageElement': { 'cx': ['Decode', 'Image', 'ReportValidity'], }, 'HTMLInputElement': { 'cx': [ 'CheckValidity', 'GetLabels', 'GetValueAsDate', 'ReportValidity', 'SetCustomValidity', 'StepDown', 'StepUp', 'ValidationMessage', 'Validity', ], }, 'HTMLLinkElement': { 'cx': ['Blocking', 'GetSheet', 'RelList'], }, 'HTMLMapElement': { 'cx': ['Areas'], }, 'HTMLMediaElement': { 'realm': ['Play'], 'weakReferenceable': True, 'cx': ['AddTextTrack', 'AudioTracks', 'Buffered', 'Played', 'Seekable', 'TextTracks', 'Load', 'Pause', 'VideoTracks'], }, 'HTMLMeterElement': { 'cx': ['CheckValidity', 'ReportValidity', 'Labels'], }, 'HTMLObjectElement': { 'cx': ['CheckValidity', 'ReportValidity', 'SetCustomValidity', 'Validity', 'ValidationMessage'], }, 'HTMLOptionElement': { 'cx': ['Option'], 'cx_no_gc': ['Index'], }, 'HTMLOptionsCollection': { 'cx': ['Add', 'IndexedSetter', 'Remove', 'SetLength', 'SetSelectedIndex'], 'cx_no_gc': ['Length', 'NamedGetter', 'IndexedGetter', 'SelectedIndex'], }, 'HTMLOutputElement': { 'cx': ['CheckValidity', 'ReportValidity', 'SetCustomValidity', 'Validity', 'ValidationMessage', 'Labels'], }, 'HTMLProgressElement': { 'cx': ['Labels'] }, 'HTMLScriptElement': { 'cx': ['Blocking'], }, 'HTMLSelectElement': { 'cx': ['Add', 'CheckValidity', 'Item', 'IndexedGetter', 'Length', 'IndexedSetter', 'NamedItem', 'Options', 'Remove', 'Remove_', 'ReportValidity', 'SelectedOptions', 'SetCustomValidity', 'Validity', 'ValidationMessage', 'Labels'], 'cx_no_gc': [ 'SelectedIndex', 'Value'], }, 'HTMLSlotElement': { 'cx_no_gc': ['AssignedNodes', 'AssignedElements', 'Assign'] }, 'HTMLStyleElement': { 'cx': ['GetSheet', 'Disabled', 'Blocking'], }, 'HTMLTableElement': { 'cx': [ 'CreateCaption', 'CreateTBody', 'CreateTFoot', 'CreateTHead', 'DeleteCaption', 'DeleteRow', 'DeleteTFoot', 'DeleteTHead', 'InsertRow', 'Rows', 'TBodies', ], }, 'HTMLTableRowElement': { 'cx': ['Cells', 'DeleteCell', 'InsertCell', 'RowIndex', 'SectionRowIndex'], }, 'HTMLTableSectionElement': { 'cx': ['DeleteRow', 'InsertRow', 'Rows'] }, 'HTMLTemplateElement': { 'cx': ['Content'], }, 'HTMLTextAreaElement': { 'cx': ['CheckValidity', 'ReportValidity', 'SetCustomValidity', 'Validity', 'ValidationMessage', 'Labels'], }, 'HTMLVideoElement': { 'weakReferenceable': True, }, 'IDBCursor': { 'cx': ['Key', 'PrimaryKey'] }, 'IDBCursorWithValue': { 'cx': ['Value'] }, 'IDBDatabase': { 'cx': ['CreateObjectStore', 'ObjectStoreNames', 'Transaction'], }, 'IDBFactory': { 'cx': ['Cmp', 'Databases', 'DeleteDatabase', 'Open'], }, 'IDBIndex': { 'cx': ['KeyPath'], }, 'IDBKeyRange': { 'cx': ['Lower', 'Upper', 'Only', 'LowerBound', 'UpperBound', 'Bound', 'Includes'] }, 'IDBObjectStore': { 'cx': ['CreateIndex', 'IndexNames', 'Put', 'Add', 'Delete', 'Clear', 'Get', 'GetKey', 'GetAll', 'GetAllKeys', 'Count', 'OpenCursor', 'OpenKeyCursor', 'KeyPath'], }, 'IDBRequest': { 'cx': ['GetResult'], }, 'IDBTransaction': { 'cx': ['Abort', 'ObjectStore', 'ObjectStoreNames'], }, 'IntersectionObserver': { 'cx': ['Thresholds'], 'no_gc': ['Disconnect', 'Observe', 'Unobserve'], }, 'KeyframeEffect': { 'cx': ['GetKeyframes', 'SetKeyframes'] }, 'LargestContentfulPaint': { 'cx': ['LoadTime', 'RenderTime'], }, 'LayoutResult': { 'cx': ['Phases'] }, 'Location': { 'cx': ['Assign', 'Reload', 'Replace'], 'implicitCxSetters': True, }, 'MediaDevices': { 'realm': ['GetUserMedia'], 'cx': ['EnumerateDevices'], }, 'MediaList': { 'no_gc': ['AppendMedium', 'DeleteMedium', 'SetMediaText'], }, 'MediaQueryList': { 'weakReferenceable': True, }, 'MediaSession': { 'cx': ['GetMetadata'], }, 'MediaStreamTrack': { 'cx': ['Clone'], }, 'MediaStream': { 'cx': ['Clone'], }, 'MessagePort': { 'weakReferenceable': True, 'cx': ['Close', 'PostMessage', 'PostMessage_', 'SetOnmessage', 'Start'] }, 'MessageEvent': { 'cx': ['Data', 'InitMessageEvent', 'Ports'], }, 'MutationRecord': { 'cx': ['AddedNodes', 'RemovedNodes'], }, 'NamedNodeMap': { 'cx': [ 'GetNamedItem', 'GetNamedItemNS', 'Item', 'IndexedGetter', 'NamedGetter', 'RemoveAttribute', 'RemoveNamedItem', 'RemoveNamedItemNS', 'SetNamedItem', 'SetNamedItemNS', ], }, 'NavigationPreloadManager': { 'realm': ['Disable', 'Enable', 'GetState', 'SetHeaderValue'], }, 'Navigator': { 'cx': ['Bluetooth', 'Credentials', 'Clipboard', 'Geolocation', 'Gpu', 'MimeTypes', 'Languages', 'SendBeacon', 'ServiceWorker', 'Servo', 'Storage', 'Plugins', 'UserActivation', 'WakeLock', 'Xr', 'MediaDevices', 'MediaSession', 'Permissions', 'GetGamepads'], }, 'CredentialsContainer': { 'realm': ['Get', 'Store', 'Create', 'PreventSilentAccess'], }, 'WakeLock': { 'realm': ['Request'], }, 'Node': { 'cx': ['AppendChild', 'ChildNodes', 'CloneNode', 'InsertBefore', 'Normalize', 'RemoveChild', 'ReplaceChild', 'SetNodeValue', 'SetTextContent'] }, 'NodeIterator': { 'cx': ['NextNode', 'PreviousNode'], }, 'NodeList': { 'no_gc': ['Item', 'IndexedGetter'], }, 'Notification': { 'cx': ['Actions', 'RequestPermission', 'Vibrate'] }, 'OESVertexArrayObject': { 'cx': ['CreateVertexArrayOES', 'DeleteVertexArrayOES'] }, 'OfflineAudioContext': { 'realm': ['StartRendering'], }, 'OffscreenCanvas': { 'cx': ['ConvertToBlob', 'GetContext', 'SetHeight', 'SetWidth', 'TransferToImageBitmap'], }, 'OffscreenCanvasRenderingContext2D': { 'cx': ['CreateImageData', 'CreateImageData_', 'GetImageData', 'GetTransform', 'MeasureText', 'CreateLinearGradient', 'CreatePattern', 'CreateRadialGradient'], 'no_gc': ['PutImageData', 'PutImageData_'] }, 'PaintRenderingContext2D': { 'cx': ['CreateLinearGradient', 'CreatePattern', 'CreateRadialGradient', 'GetTransform'], }, 'PaintWorkletGlobalScope': { 'additionalTraits': ["crate::interfaces::HasOrigin"], 'cx': ['RegisterPaint'], }, 'Performance': { 'cx': ['Mark', 'Measure'], }, 'PerformanceEntry': { 'cx': ['StartTime'], }, 'PerformanceNavigationTiming': { 'cx': ['UnloadEventStart', 'UnloadEventEnd', 'DomInteractive', 'DomContentLoadedEventStart', 'DomContentLoadedEventEnd', 'DomComplete', 'LoadEventStart', 'LoadEventEnd', 'TopLevelDomComplete'], }, 'PerformanceObserver': { 'cx': ['Observe', 'SupportedEntryTypes', 'Disconnect'], }, 'PerformanceResourceTiming': { 'cx': ['DomainLookupStart', 'DomainLookupEnd', 'SecureConnectionStart', 'RequestStart', 'RedirectStart', 'RedirectEnd', 'ResponseStart', 'FetchStart', 'ConnectStart', 'ConnectEnd', 'ResponseEnd'], }, 'Permissions': { 'realm': ['Query', 'Request', 'Revoke'], }, 'Promise': { 'spiderMonkeyInterface': True, 'additionalTraits': ["js::conversions::FromJSValConvertibleRc"], 'allowDropImpl': True, }, 'RadioNodeList': { 'cx': ['SetValue'], 'cx_no_gc': ['Length'], 'no_gc': ['Value', 'IndexedGetter'], }, 'Range': { 'weakReferenceable': True, 'cx': ['CloneContents', 'CloneRange', 'CreateContextualFragment', 'DeleteContents', 'ExtractContents', 'GetBoundingClientRect', 'GetClientRects', 'InsertNode', 'SurroundContents'], 'no_gc': ['Stringifier'], }, 'Request': { 'cx': ['Headers', 'Clone', 'Text', 'Blob', 'FormData', 'Json', 'ArrayBuffer', 'Bytes', 'TextStream'], }, 'Response': { 'cx': ['CreateFromJson', 'Clone', 'Error', 'Redirect', 'Text', 'Blob', 'FormData', 'Json', 'ArrayBuffer', 'Bytes', 'Headers', 'TextStream'], }, 'RTCPeerConnection': { 'realm': ['AddIceCandidate', 'CreateAnswer', 'CreateOffer', 'SetLocalDescription', 'SetRemoteDescription'], 'cx': ['AddTransceiver', 'Close', 'CreateDataChannel',], 'weakReferenceable': True, }, 'RTCRtpSender': { 'cx': ['SetParameters'], }, 'Sanitizer': { 'cx': ['AllowElement'], }, 'Selection': { 'cx': ['Collapse', 'CollapseToEnd', 'CollapseToStart', 'DeleteFromDocument', 'Extend', 'SelectAllChildren', 'SetBaseAndExtent', 'SetPosition'], 'no_gc': ['Stringifier'], }, 'ServiceWorker': { 'cx': ['PostMessage', 'PostMessage_'], }, 'ServiceWorkerContainer': { 'realm': ['GetRegistration', 'Register'], }, 'ServiceWorkerGlobalScope': { 'additionalTraits': ["crate::interfaces::HasOrigin"], }, 'ServiceWorkerRegistration': { 'cx': ['NavigationPreload', 'Unregister'], }, 'ServoInternals': { 'cx': ['DefaultPreferenceValue', 'GetPreference'], 'realm': ['ReportMemory'], 'additionalTraits': ['crate::interfaces::ServoInternalsHelpers'], }, 'ServoTestUtils': { 'cx': ['ForceLayout', 'ForceAccessibilityUpdate'], 'no_gc': ['AdvanceClock'], }, 'ShadowRoot': { 'cx': [ 'AdoptedStyleSheets', 'GetHTML', 'GetInnerHTML', 'SetAdoptedStyleSheets', 'SetHTMLUnsafe', 'SetHTML', 'SetInnerHTML', 'StyleSheets', ], }, 'StaticRange': { 'weakReferenceable': True, }, 'StorageManager': { 'realm': ['Persisted', 'Persist', 'Estimate'], }, 'StyleSheet': { 'cx': ['Media'], 'no_gc': ['SetDisabled'], }, 'StyleSheetList': { 'cx': ['Item', 'IndexedGetter'], }, 'SubtleCrypto': { 'realm': ['Encrypt', 'Decrypt', 'Sign', 'Verify', 'GenerateKey', 'DeriveKey', 'DeriveBits', 'Digest', 'ImportKey', 'ExportKey', 'WrapKey', 'UnwrapKey', 'EncapsulateKey', 'EncapsulateBits', 'DecapsulateKey', 'DecapsulateBits', 'GetPublicKey'], 'cx': ['Supports', 'Supports_'], }, 'SVGElement': { 'cx': ['Blur', 'Focus', 'Style'], }, #FIXME(jdm): This should be 'register': False, but then we don't generate enum types 'TestBinding': { 'additionalTraits': ['crate::interfaces::TestBindingHelpers'], 'cx': [ 'ArrayAttribute', 'GetDictionaryWithTypedArray', 'GetInterfaceAttributeNullable', 'InterfaceAttribute', 'ObjectAttribute', 'PromiseRejectNative', 'PromiseRejectWithTypeError', 'PromiseResolveNative', 'ReceiveInterface', 'ReceiveInterfaceSequence', 'ReceiveNullableInterface', 'ReceiveObject', 'ReceiveObjectSequence', 'ResolvePromiseDelayed', 'ReturnRejectedPromise', 'ReturnResolvedPromise', ], 'realm': ['PromiseAttribute', 'PromiseNativeHandler'], }, 'TestBindingMaplikeWithInterface': { 'cx': ['SetInternal', 'ClearInternal', 'DeleteInternal', 'HasInternal', 'Size'] }, 'TestBindingMaplikeWithPrimitive': { 'cx': ['SetInternal', 'ClearInternal', 'DeleteInternal', 'HasInternal', 'Size'] }, 'TestNS': { 'cx': ['TestAttribute'], }, 'TestUtils': { 'cx': ['Gc'], }, 'TestWorklet': { 'realm': ['AddModule'], }, 'TestWorkletGlobalScope': { 'additionalTraits': ["crate::interfaces::HasOrigin"], }, 'Text': { 'cx': ['SplitText'], 'cx_no_gc': ['WholeText', 'GetAssignedSlot'] }, 'TextDecoder': { 'cx': ['Decode'] }, 'TextEncoder': { 'cx': ['Encode'], 'no_gc': ['EncodeInto'] }, 'TextTrack': { 'cx': ['GetCues', 'GetActiveCues', 'AddCue', 'RemoveCue', 'SetMode'] }, 'TreeWalker': { 'cx': ['ParentNode', 'PreviousNode', 'NextNode', 'FirstChild', 'LastChild', 'PreviousSibling', 'NextSibling'] }, 'TrustedTypePolicy': { 'cx': ['CreateHTML', 'CreateScript', 'CreateScriptURL'] }, 'TrustedTypePolicyFactory': { 'cx': ['CreatePolicy', 'EmptyHTML', 'EmptyScript', 'IsHTML', 'IsScript', 'IsScriptURL'], }, 'URL': { 'weakReferenceable': True, 'cx': ['Parse', 'SearchParams'], }, 'VisibilityStateEntry': { 'cx': ['StartTime'], }, 'VTTCue': { 'cx': ['GetCueAsHTML'], }, 'WebGLRenderingContext': { 'no_gc': [ 'CompressedTexImage2D', 'CompressedTexSubImage2D', 'ReadPixels', 'TexImage2D', 'TexImage2D_', 'TexSubImage2D', 'TexSubImage2D_', ], 'cx': [ 'GetExtension', 'MakeXRCompatible', 'GetBufferParameter', 'GetParameter', 'GetTexParameter', 'BindBuffer', 'BufferData_', 'BufferData', 'BufferSubData', 'CreateBuffer', 'CreateFramebuffer', 'CreateRenderbuffer', 'CreateTexture', 'CreateProgram', 'CreateShader', 'DeleteBuffer', 'DrawArrays', 'DrawElements', 'EnableVertexAttribArray', 'DisableVertexAttribArray', 'GetActiveUniform', 'GetActiveAttrib', 'GetFramebufferAttachmentParameter', 'GetRenderbufferParameter', 'GetProgramParameter', 'GetShaderParameter', 'GetShaderPrecisionFormat', 'GetUniformLocation', 'GetUniform', 'GetVertexAttrib', 'GetVertexAttribOffset', 'VertexAttrib1f', 'VertexAttrib1fv', 'VertexAttrib2f', 'VertexAttrib2fv', 'VertexAttrib3f', 'VertexAttrib3fv', 'VertexAttrib4f', 'VertexAttrib4fv', 'VertexAttribPointer', ], 'weakReferenceable': True, }, 'WebGL2RenderingContext': { 'no_gc': [ 'CompressedTexImage2D', 'CompressedTexSubImage2D', 'ReadPixels', 'ReadPixels_', 'ReadPixels__', 'TexImage2D', 'TexImage2D_', 'TexImage2D__', 'TexImage2D___', 'TexImage2D____', 'TexSubImage2D', 'TexSubImage2D_', 'TexImage3D', ], 'cx': [ 'GetExtension', 'MakeXRCompatible', 'GetBufferParameter', 'GetTexParameter', 'GetUniform', 'DrawArraysInstanced', 'DrawElementsInstanced', 'DrawRangeElements', 'VertexAttribDivisor', 'CreateQuery', 'CreateSampler', 'GetQueryParameter', 'FenceSync', 'GetSyncParameter', 'GetSamplerParameter', 'CreateTransformFeedback', 'GetBufferParameter', 'GetParameter', 'GetTexParameter', 'BindBuffer', 'BufferData_', 'BufferData', 'BufferData__', 'BufferSubData', 'BufferSubData_', 'CopyBufferSubData', 'GetBufferSubData', 'CreateBuffer', 'CreateFramebuffer', 'CreateRenderbuffer', 'CreateTexture', 'CreateProgram', 'CreateShader', 'CreateVertexArray', 'DeleteBuffer', 'DeleteVertexArray', 'DrawArrays', 'DrawElements', 'EnableVertexAttribArray', 'DisableVertexAttribArray', 'GetActiveUniform', 'GetActiveAttrib', 'GetFramebufferAttachmentParameter', 'GetRenderbufferParameter', 'GetProgramParameter', 'GetShaderParameter', 'GetShaderPrecisionFormat', 'GetIndexedParameter', 'GetUniformLocation', 'GetVertexAttrib', 'GetVertexAttribOffset', 'VertexAttrib1f', 'VertexAttrib1fv', 'VertexAttrib2f', 'VertexAttrib2fv', 'VertexAttrib3f', 'VertexAttrib3fv', 'VertexAttrib4f', 'VertexAttrib4fv', 'VertexAttribI4i', 'VertexAttribI4iv', 'VertexAttribI4ui', 'VertexAttribI4uiv', 'VertexAttribPointer', 'VertexAttribIPointer', 'GetTransformFeedbackVarying', 'GetActiveUniforms', 'GetActiveUniformBlockParameter', 'GetInternalformatParameter' ], 'additionalTraits': ['crate::interfaces::WebGL2RenderingContextHelpers'], }, 'WebGLShader': { 'weakReferenceable': True, }, 'WindowClient': { 'cx': ['Focus', 'Navigate'], }, 'Window': { 'additionalTraits': ['crate::interfaces::WindowHelpers', 'crate::interfaces::HasOrigin'], 'realm': ['CreateImageBitmap', 'CreateImageBitmap_', 'WebdriverCallback', 'GetOpener', 'Fetch'], 'cx': [ 'ClientInformation', 'Caches', 'Close', 'CookieStore', 'CustomElements', 'Crypto', 'Event', 'Focus', 'FetchLater', 'GetComputedStyle', 'GetLocalStorage', 'GetSelection', 'GetSessionStorage', 'GetVisualViewport', 'History', 'Location', 'MatchMedia', 'NamedGetter', 'Navigator', 'Open', 'Performance', 'PostMessage', 'PostMessage_', 'ReportError', 'Screen', 'Scroll', 'Scroll_', 'ScrollBy', 'ScrollBy_', 'ScrollTo', 'ScrollTo_', 'SetInterval', 'SetOpener', 'SetTimeout', 'Stop', 'StructuredClone', 'TestRunner', 'TrustedTypes', 'WebdriverException', 'IndexedDB', ], 'cx_no_gc': ['QueueMicrotask'], }, 'WindowProxy' : { 'path': 'crate::dom::windowproxy::WindowProxy', 'register': False, }, 'SharedWorkerGlobalScope': { 'additionalTraits': ["crate::interfaces::HasOrigin"], }, 'Worker': { 'cx': ['PostMessage', 'PostMessage_'], }, 'WorkerGlobalScope': { 'cx': ['Caches', 'Crypto', 'ImportScripts', 'ReportError', 'SetInterval', 'SetTimeout', 'TrustedTypes', 'StructuredClone', 'IndexedDB', 'QueueMicrotask', 'Location', 'Navigator', 'Performance'], 'realm': ['CreateImageBitmap', 'CreateImageBitmap_', 'Fetch'], }, 'WorkerNavigator': { 'cx': ['Gpu', 'Languages', 'Storage', 'Permissions'], }, 'Worklet': { 'realm': ['AddModule'], }, 'XMLDocument': { 'cx': ['GetLocation', 'NamedGetter'], }, 'XMLHttpRequest': { 'cx': ['Abort', 'Open', 'Open_', 'Send', 'GetResponseXML', 'Response'], }, 'XPathEvaluator': { 'cx': ['CreateExpression', 'Evaluate'], }, 'XPathExpression': { 'cx': ['Evaluate'], }, 'Origin': { 'cx': ['From'], }, 'XRBoundedReferenceSpace': { 'cx': ['BoundsGeometry'], }, 'XRFrame': { 'cx': ['GetViewerPose', 'GetPose', 'GetHitTestResults', 'GetJointPose'], }, 'XRHitTestResult': { 'cx': ['GetPose'], }, 'XRInputSource': { 'cx': ['GetHand', 'GetGripSpace', 'TargetRaySpace'], }, 'XRRay': { 'cx': ['Origin', 'Direction', 'Matrix'], }, 'XRReferenceSpace': { 'cx': ['GetOffsetReferenceSpace'], }, 'XRRenderState': { 'cx': ['Layers'], }, 'XRRigidTransform': { 'cx': ['Inverse', 'Matrix', 'Orientation', 'Position'], }, 'XRSession': { 'cx': ['EnabledFeatures', 'GetSupportedFrameRates', 'UpdateRenderState'], 'realm': ['End', 'RequestHitTestSource', 'RequestReferenceSpace', 'UpdateTargetFrameRate'], 'weakReferenceable': True, }, 'XRSystem': { 'cx': ['Test'], 'realm': ['IsSessionSupported', 'RequestSession'], }, 'XRTest': { 'realm': ['SimulateDeviceConnection', 'DisconnectAllDevices'], 'cx': ['SimulateUserActivation'] }, 'XRView': { 'cx': ['ProjectionMatrix'], }, 'XRWebGLLayer': { 'cx': ['GetViewport'], }, 'ReadableStream': { 'realm': ['PipeTo', 'PipeThrough'], 'cx': ['Cancel', 'GetReader', 'Tee'] }, "ReadableStreamDefaultController": { "cx": ["Close", "Enqueue", "Error"] }, "ReadableByteStreamController": { "cx": ["Enqueue", "Close", "Error", "GetByobRequest"] }, "ReadableStreamBYOBRequest": { "cx": ["Respond", "RespondWithNewView"] }, "ReadableStreamBYOBReader": { "cx": ["Cancel", "Read", "ReleaseLock"] }, "ReadableStreamDefaultReader": { "cx": ["Cancel", "Read", "ReleaseLock"] }, 'ResizeObserverEntry': { 'cx': ['BorderBoxSize', 'ContentBoxSize', 'DevicePixelContentBoxSize'], }, 'VisibilityStateEntry': { 'cx': ['StartTime'], }, 'WebSocket': { 'weakReferenceable': True, }, 'WritableStream': { 'realm': ['Abort', 'Close', 'GetWriter'] }, 'WritableStreamDefaultController': { 'realm': ['Error'] }, 'WritableStreamDefaultWriter': { 'cx': ['ReleaseLock'], 'realm': ['Abort', 'Close', 'Constructor', 'Write'], }, 'TransformStreamDefaultController': { 'cx': ['Enqueue', 'Error', 'Terminate'] }, } Dictionaries = { 'AudioNodeOptions': { 'derives': ['Clone', 'Copy'], }, 'ChannelMergerOptions': { 'derives': ['Clone', 'Copy'], }, 'ConstantSourceOptions': { 'derives': ['Clone', 'Copy'], }, 'CSPViolationReportBody': { 'derives': ['Clone', 'MallocSizeOf'], }, 'EventListenerOptions': { 'derives': ['Clone', 'MallocSizeOf'], }, 'FocusOptions': { 'derives': ['Clone', 'Copy', 'MallocSizeOf'] }, 'FontFaceDescriptors': { 'derives': ['Clone', 'MallocSizeOf'] }, 'GainOptions': { 'derives': ['Clone', 'Copy'], }, 'GPUCanvasConfiguration': { 'derives': ['Clone'] }, 'GPUExtent3DDict': { 'derives': ["MallocSizeOf"], }, 'GPUObjectDescriptorBase': { 'derives': ['MallocSizeOf'] }, 'GPUTextureDescriptor': { 'derives': ["MallocSizeOf"], }, 'HeadersInit': { 'derives': ["Clone"], }, 'IIRFilterOptions': { 'derives': ['Clone'], }, 'JsonWebKey': { 'derives': ['zeroize::Zeroize', 'zeroize::ZeroizeOnDrop'], }, 'RecommendedBreakpointLocation': { 'derives': ['Debug'], }, 'RsaOtherPrimesInfo': { 'derives': ['zeroize::Zeroize', 'zeroize::ZeroizeOnDrop'], }, 'PauseFrameResult': { 'derives': ['Debug'], }, 'Report': { 'derives': ['Clone', 'MallocSizeOf'], }, 'ReportBody': { 'derives': ['Clone', 'MallocSizeOf'], }, 'SanitizerAttributeNamespace': { 'derives': ['Clone', 'MallocSizeOf', 'PartialEq'] }, 'SanitizerConfig': { 'derives': ['Clone', 'MallocSizeOf'] }, 'SanitizerElementNamespace': { 'derives': ['Clone', 'MallocSizeOf', 'PartialEq'], }, 'SanitizerElementNamespaceWithAttributes': { 'derives': ['Clone', 'MallocSizeOf', 'PartialEq'], }, 'SanitizerProcessingInstruction': { 'derives': ['Clone', 'MallocSizeOf', 'PartialEq'], }, 'ScrollOptions': { 'derives': ['Clone'], }, 'ScrollToOptions': { 'derives': ['Clone'], }, 'StereoPannerOptions': { 'derives': ['Clone', 'Copy'], }, 'URLPatternInit': { 'derives': ['Clone'], }, 'XRWebGLLayerInit': { 'derives': ['Clone', 'Copy'], }, } Enums = { 'GPUFeatureName': { 'derives': ['Eq', 'Hash', ] }, 'KeyUsage': { 'derives': ['Eq', 'PartialOrd', 'Ord'] }, 'PermissionName': { 'derives': ['Eq', 'Hash'] } } Unions = { 'ByteStringSequenceSequenceOrByteStringByteStringRecord': { 'derives': ['Clone'] }, 'ElementOrDocument': { 'derives': ['Clone', 'MallocSizeOf', 'PartialEq'] }, 'HTMLCanvasElementOrOffscreenCanvas': { 'derives': ['Clone', 'MallocSizeOf'] }, 'SanitizerOrSanitizerConfigOrSanitizerPresets': { 'derives': ['Clone'], }, 'StringOrSanitizerAttributeNamespace': { 'derives': ['Clone', 'MallocSizeOf', 'PartialEq'], }, 'StringOrSanitizerElementNamespace': { 'derives': ['Clone', 'MallocSizeOf', 'PartialEq'], }, 'StringOrSanitizerElementNamespaceWithAttributes': { 'derives': ['Clone', 'MallocSizeOf', 'PartialEq'], }, 'StringOrSanitizerProcessingInstruction': { 'derives': ['Clone', 'MallocSizeOf', 'PartialEq'], }, 'RangeEnforcedUnsignedLongSequenceOrGPUExtent3DDict': { 'derives': ['MallocSizeOf'] }, 'StringOrUnsignedLong': { 'derives': ['Clone'], }, } SubCrates = { 'script_webgpu': ['GPUAdapter', 'GPUAdapterInfo', 'GPUBufferUsage', 'GPUCommandBuffer', 'GPUCompilationInfo', 'GPUCompilationMessage', 'GPUDeviceLostInfo', 'GPUMapMode', 'GPURenderBundle', 'GPUShaderStage', 'GPUSupportedLimits', 'GPUSupportedFeatures', 'GPUTextureUsage', 'WGSLLanguageFeatures'], }