tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 7c3fe85c3af707fd08ae8abb417be11bb8080cad
parent e5c691fd077ad362c7b77fba6735c5838708458d
Author: Mark Banner <standard8@mozilla.com>
Date:   Wed,  5 Nov 2025 10:53:22 +0000

Bug 1996979 - Change mozIPlacesAutoComplete.idl to use cenums to make it easier to use them as types. r=places-reviewers,daisuke

Differential Revision: https://phabricator.services.mozilla.com/D270411

Diffstat:
Mtoolkit/components/places/mozIPlacesAutoComplete.idl | 155++++++++++++++++++++++++++++++++++++-------------------------------------------
Mtools/@types/generated/lib.gecko.darwin.d.ts | 4----
Mtools/@types/generated/lib.gecko.dom.d.ts | 37++++++++++++++++++++++++++++++++++---
Mtools/@types/generated/lib.gecko.glean.d.ts | 46++++++++++++++++++++++++----------------------
Mtools/@types/generated/lib.gecko.nsresult.d.ts | 14++++++++++++++
Mtools/@types/generated/lib.gecko.xpcom.d.ts | 102+++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------
6 files changed, 211 insertions(+), 147 deletions(-)

diff --git a/toolkit/components/places/mozIPlacesAutoComplete.idl b/toolkit/components/places/mozIPlacesAutoComplete.idl @@ -22,92 +22,79 @@ interface mozIPlacesAutoComplete : nsISupports // A few of these are not used in Firefox, but are still referenced in // comm-central. - /** - * Match anywhere in each searchable term. - */ - const long MATCH_ANYWHERE = 0; - - /** - * Match first on word boundaries, and if we do not get enough results, then - * match anywhere in each searchable term. - */ - const long MATCH_BOUNDARY_ANYWHERE = 1; - - /** - * Match on word boundaries in each searchable term. - */ - const long MATCH_BOUNDARY = 2; - - /** - * Match only the beginning of each search term. - */ - const long MATCH_BEGINNING = 3; - - /** - * Match anywhere in each searchable term without doing any transformation - * or stripping on the underlying data. - */ - const long MATCH_ANYWHERE_UNMODIFIED = 4; - - /** - * Match only the beginning of each search term using a case sensitive - * comparator. - */ - const long MATCH_BEGINNING_CASE_SENSITIVE = 5; + cenum MatchBehaviors : 8 { + /** + * Match anywhere in each searchable term. + */ + MATCH_ANYWHERE = 0, + + /** + * Match on word boundaries in each searchable term. + */ + MATCH_BOUNDARY = 2, + + /** + * Match anywhere in each searchable term without doing any transformation + * or stripping on the underlying data. + */ + MATCH_ANYWHERE_UNMODIFIED = 4, + }; ////////////////////////////////////////////////////////////////////////////// //// Search Behavior Constants - /** - * Search through history. - */ - const long BEHAVIOR_HISTORY = 1 << 0; - - /** - * Search though bookmarks. - */ - const long BEHAVIOR_BOOKMARK = 1 << 1; - - /** - * Search through tags. - */ - const long BEHAVIOR_TAG = 1 << 2; - - /** - * Search the title of pages. - */ - const long BEHAVIOR_TITLE = 1 << 3; - - /** - * Search the URL of pages. - */ - const long BEHAVIOR_URL = 1 << 4; - - /** - * Search for typed pages. - * No more supported by Firefox, it is still being used by comm-central clients. - */ - const long BEHAVIOR_TYPED = 1 << 5; - - /** - * Search javascript: URLs. - */ - const long BEHAVIOR_JAVASCRIPT = 1 << 6; - - /** - * Search for pages that have been marked as being opened, such as a tab - * in a tabbrowser. - */ - const long BEHAVIOR_OPENPAGE = 1 << 7; - - /** - * Use intersection between history, typed, bookmark, tag and openpage - * instead of union, when the restrict bit is set. - */ - const long BEHAVIOR_RESTRICT = 1 << 8; - - /** - * Include search suggestions from the currently selected search provider. - */ - const long BEHAVIOR_SEARCH = 1 << 9; + cenum SearchBehaviors : 16 { + /** + * Search through history. + */ + BEHAVIOR_HISTORY = 1 << 0, + + /** + * Search though bookmarks. + */ + BEHAVIOR_BOOKMARK = 1 << 1, + + /** + * Search through tags. + */ + BEHAVIOR_TAG = 1 << 2, + + /** + * Search the title of pages. + */ + BEHAVIOR_TITLE = 1 << 3, + + /** + * Search the URL of pages. + */ + BEHAVIOR_URL = 1 << 4, + + /** + * Search for typed pages. + * No more supported by Firefox, it is still being used by comm-central clients. + */ + BEHAVIOR_TYPED = 1 << 5, + + /** + * Search javascript: URLs. + */ + BEHAVIOR_JAVASCRIPT = 1 << 6, + + /** + * Search for pages that have been marked as being opened, such as a tab + * in a tabbrowser. + */ + BEHAVIOR_OPENPAGE = 1 << 7, + + /** + * Use intersection between history, typed, bookmark, tag and openpage + * instead of union, when the restrict bit is set. + */ + BEHAVIOR_RESTRICT = 1 << 8, + + /** + * Include search suggestions from the currently selected search provider. + */ + BEHAVIOR_SEARCH = 1 << 9, + }; }; diff --git a/tools/@types/generated/lib.gecko.darwin.d.ts b/tools/@types/generated/lib.gecko.darwin.d.ts @@ -169,13 +169,9 @@ interface nsIMacPreferencesReader extends nsISupports { // https://searchfox.org/mozilla-central/source/xpcom/io/nsILocalFileMac.idl interface nsILocalFileMac extends nsIFile { - readonly fileSizeWithResFork: i64; launchWithDoc(aDocToLoad: nsIFile, aLaunchInBackground: boolean): void; - openDocWithApp(aAppToOpenWith: nsIFile, aLaunchInBackground: boolean): void; isPackage(): boolean; readonly bundleDisplayName: string; - readonly bundleIdentifier: string; - readonly bundleContentsLastModifiedTime: i64; hasXAttr(aAttrName: string): boolean; getXAttr(aAttrName: string): u8[]; setXAttr(aAttrName: string, aAttrValue: u8[]): void; diff --git a/tools/@types/generated/lib.gecko.dom.d.ts b/tools/@types/generated/lib.gecko.dom.d.ts @@ -1869,6 +1869,7 @@ interface LoadURIOptions { forceMediaDocument?: ForceMediaDocument; hasValidUserGestureActivation?: boolean; headers?: InputStream | null; + isCaptivePortalTab?: boolean; loadFlags?: number; policyContainer?: PolicyContainer | null; postData?: InputStream | null; @@ -2427,6 +2428,7 @@ interface NavigationCurrentEntryChangeEventInit extends EventInit { interface NavigationInterceptOptions { focusReset?: NavigationFocusReset; handler?: NavigationInterceptHandler; + precommitHandler?: NavigationPrecommitHandler; scroll?: NavigationScrollBehavior; } @@ -3014,6 +3016,7 @@ interface PublicKeyCredentialCreationOptions { challenge: BufferSource; excludeCredentials?: PublicKeyCredentialDescriptor[]; extensions?: AuthenticationExtensionsClientInputs; + hints?: string[]; pubKeyCredParams: PublicKeyCredentialParameters[]; rp: PublicKeyCredentialRpEntity; timeout?: number; @@ -3059,6 +3062,7 @@ interface PublicKeyCredentialRequestOptions { allowCredentials?: PublicKeyCredentialDescriptor[]; challenge: BufferSource; extensions?: AuthenticationExtensionsClientInputs; + hints?: string[]; rpId?: string; timeout?: number; userVerification?: string; @@ -3066,8 +3070,6 @@ interface PublicKeyCredentialRequestOptions { interface PublicKeyCredentialRequestOptionsJSON { allowCredentials?: PublicKeyCredentialDescriptorJSON[]; - attestation?: string; - attestationFormats?: string[]; challenge: Base64URLString; extensions?: AuthenticationExtensionsClientInputsJSON; hints?: string[]; @@ -3655,6 +3657,7 @@ interface RedirectBlockedEventInit extends EventInit { interface RegistrationOptions { scope?: string; + type?: WorkerType; updateViaCache?: ServiceWorkerUpdateViaCache; } @@ -5720,6 +5723,17 @@ declare var CSSCounterStyleRule: { isInstance: IsInstance<CSSCounterStyleRule>; }; +interface CSSCustomMediaRule extends CSSRule { + readonly name: string; + readonly query: CustomMediaQuery; +} + +declare var CSSCustomMediaRule: { + prototype: CSSCustomMediaRule; + new(): CSSCustomMediaRule; + isInstance: IsInstance<CSSCustomMediaRule>; +}; + interface CSSCustomPropertyRegisteredEvent extends Event { readonly propertyDefinition: InspectorCSSPropertyDefinition; } @@ -6824,11 +6838,11 @@ interface CSSStyleProperties extends CSSStyleDeclaration { textCombineUpright: string; textDecoration: string; textDecorationColor: string; + textDecorationInset: string; textDecorationLine: string; textDecorationSkipInk: string; textDecorationStyle: string; textDecorationThickness: string; - textDecorationTrim: string; textEmphasis: string; textEmphasisColor: string; textEmphasisPosition: string; @@ -15616,6 +15630,16 @@ declare var NavigationHistoryEntry: { isInstance: IsInstance<NavigationHistoryEntry>; }; +interface NavigationPrecommitController { + redirect(url: string | URL, options?: NavigationNavigateOptions): void; +} + +declare var NavigationPrecommitController: { + prototype: NavigationPrecommitController; + new(): NavigationPrecommitController; + isInstance: IsInstance<NavigationPrecommitController>; +}; + /** Available only in secure contexts. */ interface NavigationPreloadManager { disable(): Promise<void>; @@ -15631,6 +15655,7 @@ declare var NavigationPreloadManager: { }; interface NavigationTransition { + readonly committed: Promise<void>; readonly finished: Promise<void>; readonly from: NavigationHistoryEntry; readonly navigationType: NavigationType; @@ -25935,6 +25960,7 @@ declare namespace FuzzingFunctions { function enableAccessibility(): void; function garbageCollect(): void; function garbageCollectCompacting(): void; + function killGPUProcess(): void; function memoryPressure(): void; function signalIPCReady(): void; function spinEventLoopFor(aMilliseconds: number): void; @@ -26296,6 +26322,10 @@ interface NavigationInterceptHandler { (): void | PromiseLike<void>; } +interface NavigationPrecommitHandler { + (controller: NavigationPrecommitController): void | PromiseLike<void>; +} + interface NavigatorUserMediaErrorCallback { (error: MediaStreamError): void; } @@ -26947,6 +26977,7 @@ type ConstrainLong = number | ConstrainLongRange; type ContentSecurityPolicy = nsIContentSecurityPolicy; type Cookie = nsICookie; type CookieList = CookieListItem[]; +type CustomMediaQuery = MediaList | boolean; type DOMHighResTimeStamp = number; type DOMTimeStamp = number; type EpochTimeStamp = number; diff --git a/tools/@types/generated/lib.gecko.glean.d.ts b/tools/@types/generated/lib.gecko.glean.d.ts @@ -180,10 +180,6 @@ interface GleanImpl { proxyInfoType: Record<"direct"|"http"|"https"|"socks4"|"socks4a"|"socks5"|"socks5h"|"unknown", GleanCounter>; residualCacheFolderCount: GleanCounter; residualCacheFolderRemoval: Record<"failure"|"success", GleanCounter>; - setCookie: GleanDenominator; - setCookieForeign: GleanNumerator; - setCookieForeignPartitioned: GleanNumerator; - setCookiePartitioned: GleanNumerator; speculativeConnectOutcome: Record<"aborted_https_not_enabled"|"aborted_socket_fail"|"aborted_socket_limit"|"successful", GleanCounter>; sqliteCookiesBlockMainThread: GleanTimingDistribution; sqliteCookiesTimeToBlockMainThread: GleanTimingDistribution; @@ -288,11 +284,15 @@ interface GleanImpl { } browserBackup: { + archiveDisabledReason: GleanString; + archiveEnabled: GleanBoolean; + backupStart: GleanEventWithExtras<{ reason?: string }>; + backupThrottled: GleanEventNoExtras; browserExtensionDataSize: GleanQuantity; changeLocation: GleanEventNoExtras; compressedArchiveSize: GleanMemoryDistribution; cookiesSize: GleanQuantity; - created: GleanEventNoExtras; + created: GleanEventWithExtras<{ encrypted?: string, location?: string, size?: string }>; credentialsDataSize: GleanQuantity; enabled: GleanBoolean; error: GleanEventWithExtras<{ backup_step?: string, error_code?: string }>; @@ -313,13 +313,15 @@ interface GleanImpl { preferencesSize: GleanQuantity; profDDiskSpace: GleanQuantity; pswdEncrypted: GleanBoolean; + restoreDisabledReason: GleanString; + restoreEnabled: GleanBoolean; schedulerEnabled: GleanBoolean; securityDataSize: GleanQuantity; sessionStoreBackupsDirectorySize: GleanQuantity; sessionStoreSize: GleanQuantity; storageSyncSize: GleanQuantity; toggleOff: GleanEventNoExtras; - toggleOn: GleanEventNoExtras; + toggleOn: GleanEventWithExtras<{ encrypted?: string, location?: string }>; totalBackupSize: GleanMemoryDistribution; totalBackupTime: GleanTimingDistribution; } @@ -605,8 +607,6 @@ interface GleanImpl { eventDisclaimerAcked: GleanEventWithExtras<{ action_position?: string, addon_version?: string, page?: string, session_id?: string, user_prefs?: string, value?: string }>; eventDrag: GleanEventWithExtras<{ action_position?: string, addon_version?: string, page?: string, session_id?: string, user_prefs?: string, value?: string }>; eventDrop: GleanEventWithExtras<{ action_position?: string, addon_version?: string, page?: string, session_id?: string, user_prefs?: string, value?: string }>; - eventFakespotCategory: GleanEventWithExtras<{ action_position?: string, addon_version?: string, page?: string, session_id?: string, user_prefs?: string, value?: string }>; - eventFakespotClick: GleanEventWithExtras<{ action_position?: string, addon_version?: string, page?: string, session_id?: string, user_prefs?: string, value?: string }>; eventHidePersonalize: GleanEventWithExtras<{ action_position?: string, addon_version?: string, page?: string, session_id?: string, user_prefs?: string, value?: string }>; eventImpression: GleanEventWithExtras<{ action_position?: string, addon_version?: string, page?: string, session_id?: string, user_prefs?: string, value?: string }>; eventMenuAddSearch: GleanEventWithExtras<{ action_position?: string, addon_version?: string, page?: string, session_id?: string, user_prefs?: string, value?: string }>; @@ -772,11 +772,11 @@ interface GleanImpl { topsites: { add: GleanEventWithExtras<{ advertiser_name?: string, is_sponsored?: string, newtab_visit_id?: string, position?: string, tile_id?: string }>; - click: GleanEventWithExtras<{ advertiser_name?: string, is_pinned?: string, is_sponsored?: string, newtab_visit_id?: string, position?: string, tile_id?: string, visible_topsites?: string }>; + click: GleanEventWithExtras<{ advertiser_name?: string, is_pinned?: string, is_sponsored?: string, newtab_visit_id?: string, position?: string, smart_scores?: string, smart_weights?: string, tile_id?: string, visible_topsites?: string }>; dismiss: GleanEventWithExtras<{ advertiser_name?: string, content_redacted?: string, is_sponsored?: string, newtab_visit_id?: string, position?: string, tile_id?: string }>; edit: GleanEventWithExtras<{ advertiser_name?: string, has_title_changed?: string, has_url_changed?: string, is_sponsored?: string, newtab_visit_id?: string, position?: string, tile_id?: string }>; enabled: GleanBoolean; - impression: GleanEventWithExtras<{ advertiser_name?: string, is_pinned?: string, is_sponsored?: string, newtab_visit_id?: string, position?: string, tile_id?: string, visible_topsites?: string }>; + impression: GleanEventWithExtras<{ advertiser_name?: string, is_pinned?: string, is_sponsored?: string, newtab_visit_id?: string, position?: string, smart_scores?: string, smart_weights?: string, tile_id?: string, visible_topsites?: string }>; pin: GleanEventWithExtras<{ advertiser_name?: string, is_sponsored?: string, newtab_visit_id?: string, position?: string, tile_id?: string }>; prefChanged: GleanEventWithExtras<{ new_value?: string, pref_name?: string }>; rows: GleanQuantity; @@ -1298,7 +1298,6 @@ interface GleanImpl { prefSuggestSponsored: GleanBoolean; prefSuggestTopsites: GleanBoolean; prefSwitchTabsSearchAllContainers: GleanBoolean; - quickSuggestContextualOptIn: GleanEventWithExtras<{ interaction?: string, say_hello?: string, top_position?: string }>; } urlbarMerino: { @@ -2157,11 +2156,11 @@ interface GleanImpl { cssTextCombineUpright: GleanCounter; cssTextDecoration: GleanCounter; cssTextDecorationColor: GleanCounter; + cssTextDecorationInset: GleanCounter; cssTextDecorationLine: GleanCounter; cssTextDecorationSkipInk: GleanCounter; cssTextDecorationStyle: GleanCounter; cssTextDecorationThickness: GleanCounter; - cssTextDecorationTrim: GleanCounter; cssTextEmphasis: GleanCounter; cssTextEmphasisColor: GleanCounter; cssTextEmphasisPosition: GleanCounter; @@ -2864,11 +2863,11 @@ interface GleanImpl { cssTextCombineUpright: GleanCounter; cssTextDecoration: GleanCounter; cssTextDecorationColor: GleanCounter; + cssTextDecorationInset: GleanCounter; cssTextDecorationLine: GleanCounter; cssTextDecorationSkipInk: GleanCounter; cssTextDecorationStyle: GleanCounter; cssTextDecorationThickness: GleanCounter; - cssTextDecorationTrim: GleanCounter; cssTextEmphasis: GleanCounter; cssTextEmphasisColor: GleanCounter; cssTextEmphasisPosition: GleanCounter; @@ -3379,6 +3378,8 @@ interface GleanImpl { svgsvgelementGetelementbyid: GleanCounter; textDirectiveNotCreated: GleanCounter; textDirectivePages: GleanCounter; + webgpuRenderOutput: GleanCounter; + webgpuRequestAdapter: GleanCounter; windowAbsoluteorientationsensor: GleanCounter; windowAccelerometer: GleanCounter; windowBackgroundfetchmanager: GleanCounter; @@ -3737,6 +3738,8 @@ interface GleanImpl { svgsvgelementGetelementbyid: GleanCounter; textDirectiveNotCreated: GleanCounter; textDirectivePages: GleanCounter; + webgpuRenderOutput: GleanCounter; + webgpuRequestAdapter: GleanCounter; windowAbsoluteorientationsensor: GleanCounter; windowAccelerometer: GleanCounter; windowBackgroundfetchmanager: GleanCounter; @@ -3960,6 +3963,7 @@ interface GleanImpl { pushmanagerSubscribe: GleanCounter; pushsubscriptionUnsubscribe: GleanCounter; schedulerPosttask: GleanCounter; + webgpuRequestAdapter: GleanCounter; } useCounterWorkerService: { @@ -4016,6 +4020,7 @@ interface GleanImpl { pushmanagerSubscribe: GleanCounter; pushsubscriptionUnsubscribe: GleanCounter; schedulerPosttask: GleanCounter; + webgpuRequestAdapter: GleanCounter; } useCounterWorkerShared: { @@ -4072,6 +4077,7 @@ interface GleanImpl { pushmanagerSubscribe: GleanCounter; pushsubscriptionUnsubscribe: GleanCounter; schedulerPosttask: GleanCounter; + webgpuRequestAdapter: GleanCounter; } canvas: { @@ -4521,7 +4527,6 @@ interface GleanImpl { supportsHdr: GleanBoolean; adapters: GleanObject; contentBackend: GleanString; - d2dEnabled: GleanBoolean; dwriteEnabled: GleanBoolean; headless: GleanBoolean; monitors: GleanObject; @@ -5951,6 +5956,7 @@ interface GleanImpl { os: GleanObject; primaryResolution: GleanObject; profileAgeCreated: GleanQuantity; + profileGroupProfileCount: GleanQuantity; region: GleanString; totalBookmarksCount: GleanQuantity; userMonthlyActivity: GleanObject; @@ -5960,8 +5966,8 @@ interface GleanImpl { } nimbusTargetingEnvironment: { - attrEvalErrors: Record<"activeExperiments"|"activeRollouts"|"addonsInfo"|"addressesSaved"|"archBits"|"attributionData"|"browserSettings"|"buildId"|"currentDate"|"defaultPDFHandler"|"distributionId"|"doesAppNeedPin"|"enrollmentsMap"|"firefoxVersion"|"hasActiveEnterprisePolicies"|"hasPinnedTabs"|"homePageSettings"|"isDefaultBrowser"|"isDefaultHandler"|"isFirstStartup"|"isFxAEnabled"|"isFxASignedIn"|"isMSIX"|"locale"|"memoryMB"|"os"|"primaryResolution"|"profileAgeCreated"|"region"|"totalBookmarksCount"|"userMonthlyActivity"|"userPrefersReducedMotion"|"usesFirefoxSync"|"version", GleanCounter>; - prefTypeErrors: Record<"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons"|"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features"|"browser.newtabpage.activity-stream.feeds.section.highlights"|"browser.newtabpage.activity-stream.feeds.section.topstories"|"browser.newtabpage.activity-stream.feeds.topsites"|"browser.newtabpage.activity-stream.showSearch"|"browser.newtabpage.activity-stream.showSponsoredTopSites"|"browser.newtabpage.enabled"|"browser.startup.page"|"browser.toolbars.bookmarks.visibility"|"browser.urlbar.lastUrlbarSearchSeconds"|"browser.urlbar.quicksuggest.dataCollection.enabled"|"browser.urlbar.showSearchSuggestionsFirst"|"browser.urlbar.suggest.quicksuggest.sponsored"|"media.videocontrols.picture-in-picture.enabled"|"media.videocontrols.picture-in-picture.video-toggle.enabled"|"media.videocontrols.picture-in-picture.video-toggle.has-used"|"messaging-system-action.testday"|"network.trr.mode"|"nimbus.qa.pref-1"|"nimbus.qa.pref-2"|"security.sandbox.content.level"|"trailhead.firstrun.didSeeAboutWelcome", GleanCounter>; + attrEvalErrors: Record<"activeExperiments"|"activeRollouts"|"addonsInfo"|"addressesSaved"|"archBits"|"attributionData"|"browserSettings"|"buildId"|"currentDate"|"defaultPDFHandler"|"distributionId"|"doesAppNeedPin"|"enrollmentsMap"|"firefoxVersion"|"hasActiveEnterprisePolicies"|"hasPinnedTabs"|"homePageSettings"|"isDefaultBrowser"|"isDefaultHandler"|"isFirstStartup"|"isFxAEnabled"|"isFxASignedIn"|"isMSIX"|"locale"|"memoryMB"|"os"|"primaryResolution"|"profileAgeCreated"|"profileGroupProfileCount"|"region"|"totalBookmarksCount"|"userMonthlyActivity"|"userPrefersReducedMotion"|"usesFirefoxSync"|"version", GleanCounter>; + prefTypeErrors: Record<"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons"|"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features"|"browser.newtabpage.activity-stream.feeds.section.highlights"|"browser.newtabpage.activity-stream.feeds.section.topstories"|"browser.newtabpage.activity-stream.feeds.topsites"|"browser.newtabpage.activity-stream.showSearch"|"browser.newtabpage.activity-stream.showSponsoredTopSites"|"browser.newtabpage.enabled"|"browser.profiles.created"|"browser.startup.page"|"browser.toolbars.bookmarks.visibility"|"browser.urlbar.lastUrlbarSearchSeconds"|"browser.urlbar.quicksuggest.dataCollection.enabled"|"browser.urlbar.showSearchSuggestionsFirst"|"browser.urlbar.suggest.quicksuggest.sponsored"|"media.videocontrols.picture-in-picture.enabled"|"media.videocontrols.picture-in-picture.video-toggle.enabled"|"media.videocontrols.picture-in-picture.video-toggle.has-used"|"messaging-system-action.testday"|"network.trr.mode"|"nimbus.qa.pref-1"|"nimbus.qa.pref-2"|"security.sandbox.content.level"|"termsofuse.acceptedDate"|"trailhead.firstrun.didSeeAboutWelcome", GleanCounter>; prefValues: GleanObject; targetingContextValue: GleanText; userSetPrefs: GleanObject; @@ -6100,10 +6106,6 @@ interface GleanImpl { sidebar: GleanEventWithExtras<{ comments_count?: string }>; } - pdfjsDigitalSignature: { - certificate: Record<"adbe_pkcs7_detached"|"adbe_pkcs7_sha1"|"adbe_x509_rsa_sha1"|"etsi_cades_detached"|"etsi_rfc3161"|"unsupported", GleanCounter>; - } - pdfjsEditingHighlight: { color: Record<"blue"|"green"|"pink"|"red"|"yellow", GleanCounter>; colorChanged: GleanCounter; @@ -6809,8 +6811,9 @@ interface GleanImpl { } translations: { - enginePerformance: GleanEventWithExtras<{ average_words_per_request?: string, average_words_per_second?: string, flow_id?: string, from_language?: string, to_language?: string, total_completed_requests?: string, total_inference_seconds?: string, total_translated_words?: string }>; + enginePerformance: GleanEventWithExtras<{ average_words_per_request?: string, average_words_per_second?: string, from_language?: string, to_language?: string, total_completed_requests?: string, total_inference_seconds?: string, total_translated_words?: string }>; error: GleanEventWithExtras<{ flow_id?: string, reason?: string }>; + identifyPageLanguage: GleanEventWithExtras<{ confident?: string, extracted_code_units?: string, extraction_time?: string, html_lang_attribute?: string, identification_time?: string, identified_language?: string, is_lang_attribute_valid?: string, lang_tags_match?: string, total_time?: string }>; requestCount: Record<"full_page"|"select", GleanCounter>; restorePage: GleanEventWithExtras<{ flow_id?: string }>; translationRequest: GleanEventWithExtras<{ auto_translate?: string, document_language?: string, flow_id?: string, from_language?: string, request_target?: string, source_text_code_units?: string, source_text_word_count?: string, to_language?: string, top_preferred_language?: string }>; @@ -7237,7 +7240,6 @@ interface GleanImpl { gfxFeatures: { compositor: GleanString; - d2d: GleanObject; d3d11: GleanObject; gpuProcess: GleanObject; hwCompositing: GleanObject; diff --git a/tools/@types/generated/lib.gecko.nsresult.d.ts b/tools/@types/generated/lib.gecko.nsresult.d.ts @@ -568,6 +568,20 @@ interface nsIXPCComponents_Results { /** The PKCS#7 information is not signed. */ NS_ERROR_CMS_VERIFY_NOT_SIGNED: 0x805a0400; + // Codes related to pdf signature verification + + /** The PKCS#7 parsing has failed. */ + NS_ERROR_CMS_VERIFY_ERROR_PROCESSING: 0x805a0408; + + /** The PKCS#7 certificate verification was cancelled. */ + NS_ERROR_CMS_VERIFY_NOT_YET_ATTEMPTED: 0x805a040f; + + /** Invalid signature. */ + NS_ERROR_CMS_VERIFY_BAD_SIGNATURE: 0x805a0409; + + /** No certificate was found. */ + NS_ERROR_CMS_VERIFY_NOCERT: 0x805a0404; + // Codes related to signed manifests /** The signed app manifest or signature file is invalid. */ diff --git a/tools/@types/generated/lib.gecko.xpcom.d.ts b/tools/@types/generated/lib.gecko.xpcom.d.ts @@ -1485,6 +1485,14 @@ interface mozIGeckoMediaPluginService extends nsISupports { RunPluginCrashCallbacks(pluginId: u32, pluginName: string): void; } +// https://searchfox.org/mozilla-central/source/toolkit/components/dap/nsIDAPTelemetry.idl + +interface nsIDAPTelemetry extends nsISupports { + GetReportPrioSum(leaderHpkeConfig: u8[], helperHpkeConfig: u8[], measurement: u32, task_id: u8[], bits: u32, time_precision: u64, report: OutParam<u8[]>): void; + GetReportPrioSumVec(leaderHpkeConfig: u8[], helperHpkeConfig: u8[], measurement: u32[], task_id: u8[], bits: u32, time_precision: u64, report: OutParam<u8[]>): void; + GetReportPrioHistogram(leaderHpkeConfig: u8[], helperHpkeConfig: u8[], measurement: u32, task_id: u8[], length: u32, time_precision: u64, report: OutParam<u8[]>): void; +} + // https://searchfox.org/mozilla-central/source/docshell/base/nsIDocShell.idl } // global @@ -7644,7 +7652,8 @@ interface nsICacheEntry extends nsISupports { readonly CONTENT_TYPE_MEDIA?: 4; readonly CONTENT_TYPE_STYLESHEET?: 5; readonly CONTENT_TYPE_WASM?: 6; - readonly CONTENT_TYPE_LAST?: 7; + readonly CONTENT_TYPE_DICTIONARY?: 7; + readonly CONTENT_TYPE_LAST?: 8; readonly NO_EXPIRATION_TIME?: 4294967295; readonly key: string; @@ -7670,6 +7679,7 @@ interface nsICacheEntry extends nsISupports { asyncDoom(listener: nsICacheEntryDoomCallback): void; getMetaDataElement(key: string): string; setMetaDataElement(key: string, value: string): void; + readonly isEmpty: boolean; visitMetaData(visitor: nsICacheEntryMetaDataVisitor): void; metaDataReady(): void; setValid(): void; @@ -9596,6 +9606,12 @@ type nsIOpenSignedAppFileCallback = Callable<{ openSignedAppFileFinished(rv: nsresult, aZipReader: nsIZipReader, aSignatureInfos: nsIAppSignatureInfo[]): void; }> +interface nsIPDFVerificationResult extends nsISupports { + readonly signatureResult: nsresult; + readonly certificateResult: nsresult; + readonly signerCertificate: nsIX509Cert; +} + type nsICertVerificationCallback = Callable<{ verifyCertFinished(aPRErrorCode: i32, aVerifiedChain: nsIX509Cert[], aHasEVPolicy: boolean): void; }> @@ -9612,13 +9628,25 @@ declare enum nsIX509CertDB_VerifyUsage { verifyUsageEmailCA = 7, } +declare enum nsIX509CertDB_QWACType { + OneQWAC = 0, + TwoQWAC = 1, +} + +declare enum nsIX509CertDB_PDFSignatureAlgorithm { + ADBE_PKCS7_DETACHED = 0, + ADBE_PKCS7_SHA1 = 1, +} + declare global { namespace nsIX509CertDB { type VerifyUsage = nsIX509CertDB_VerifyUsage; + type QWACType = nsIX509CertDB_QWACType; + type PDFSignatureAlgorithm = nsIX509CertDB_PDFSignatureAlgorithm; } -interface nsIX509CertDB extends nsISupports, Enums<typeof nsIX509CertDB_VerifyUsage> { +interface nsIX509CertDB extends nsISupports, Enums<typeof nsIX509CertDB_VerifyUsage & typeof nsIX509CertDB_QWACType & typeof nsIX509CertDB_PDFSignatureAlgorithm> { readonly UNTRUSTED?: 0; readonly TRUSTED_SSL?: 1; readonly TRUSTED_EMAIL?: 2; @@ -9658,7 +9686,8 @@ interface nsIX509CertDB extends nsISupports, Enums<typeof nsIX509CertDB_VerifyUs getCerts(): nsIX509Cert[]; asPKCS7Blob(certList: nsIX509Cert[]): string; getAndroidCertificateFromAlias(alias: string): nsIX509Cert; - asyncVerify1QWAC(cert: nsIX509Cert, collectedCerts: nsIX509Cert[]): Promise<any>; + asyncVerifyQWAC(type: nsIX509CertDB.QWACType, cert: nsIX509Cert, hostname: string, collectedCerts: nsIX509Cert[]): Promise<any>; + asyncVerifyPKCS7Object(pkcs7: u8[], data: u8[][], signatureType: nsIX509CertDB.PDFSignatureAlgorithm): Promise<any>; } // https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIX509CertValidity.idl @@ -9706,23 +9735,35 @@ interface mozIAsyncHistory extends nsISupports { // https://searchfox.org/mozilla-central/source/toolkit/components/places/mozIPlacesAutoComplete.idl -interface mozIPlacesAutoComplete extends nsISupports { - readonly MATCH_ANYWHERE?: 0; - readonly MATCH_BOUNDARY_ANYWHERE?: 1; - readonly MATCH_BOUNDARY?: 2; - readonly MATCH_BEGINNING?: 3; - readonly MATCH_ANYWHERE_UNMODIFIED?: 4; - readonly MATCH_BEGINNING_CASE_SENSITIVE?: 5; - readonly BEHAVIOR_HISTORY?: 1; - readonly BEHAVIOR_BOOKMARK?: 2; - readonly BEHAVIOR_TAG?: 4; - readonly BEHAVIOR_TITLE?: 8; - readonly BEHAVIOR_URL?: 16; - readonly BEHAVIOR_TYPED?: 32; - readonly BEHAVIOR_JAVASCRIPT?: 64; - readonly BEHAVIOR_OPENPAGE?: 128; - readonly BEHAVIOR_RESTRICT?: 256; - readonly BEHAVIOR_SEARCH?: 512; +} // global + +declare enum mozIPlacesAutoComplete_MatchBehaviors { + MATCH_ANYWHERE = 0, + MATCH_BOUNDARY = 2, + MATCH_ANYWHERE_UNMODIFIED = 4, +} + +declare enum mozIPlacesAutoComplete_SearchBehaviors { + BEHAVIOR_HISTORY = 1, + BEHAVIOR_BOOKMARK = 2, + BEHAVIOR_TAG = 4, + BEHAVIOR_TITLE = 8, + BEHAVIOR_URL = 16, + BEHAVIOR_TYPED = 32, + BEHAVIOR_JAVASCRIPT = 64, + BEHAVIOR_OPENPAGE = 128, + BEHAVIOR_RESTRICT = 256, + BEHAVIOR_SEARCH = 512, +} + +declare global { + +namespace mozIPlacesAutoComplete { + type MatchBehaviors = mozIPlacesAutoComplete_MatchBehaviors; + type SearchBehaviors = mozIPlacesAutoComplete_SearchBehaviors; +} + +interface mozIPlacesAutoComplete extends nsISupports, Enums<typeof mozIPlacesAutoComplete_MatchBehaviors & typeof mozIPlacesAutoComplete_SearchBehaviors> { } // https://searchfox.org/mozilla-central/source/toolkit/components/places/mozIPlacesPendingOperation.idl @@ -10285,7 +10326,7 @@ interface mozISandboxSettings extends nsISupports { // https://searchfox.org/mozilla-central/source/toolkit/components/satchel/nsIFormFillController.idl interface nsIFormFillController extends nsISupports { - readonly focusedElement: Element; + controlledElement: Element; readonly passwordPopupAutomaticallyOpened: boolean; markAsAutoCompletableField(aElement: Element): void; showPopup(): void; @@ -10431,6 +10472,8 @@ interface nsISHEntry extends nsISupports { GetChildAt(aIndex: i32): nsISHEntry; readonly bfcacheID: u64; wireframe: any; + navigationKey: nsID; + navigationId: nsID; } // https://searchfox.org/mozilla-central/source/docshell/shistory/nsISHistory.idl @@ -10829,14 +10872,6 @@ interface nsITelemetry extends nsISupports { gatherMemory(): Promise<any>; } -// https://searchfox.org/mozilla-central/source/toolkit/components/telemetry/dap/nsIDAPTelemetry.idl - -interface nsIDAPTelemetry extends nsISupports { - GetReportPrioSum(leaderHpkeConfig: u8[], helperHpkeConfig: u8[], measurement: u32, task_id: u8[], bits: u32, time_precision: u64, report: OutParam<u8[]>): void; - GetReportPrioSumVec(leaderHpkeConfig: u8[], helperHpkeConfig: u8[], measurement: u32[], task_id: u8[], bits: u32, time_precision: u64, report: OutParam<u8[]>): void; - GetReportPrioHistogram(leaderHpkeConfig: u8[], helperHpkeConfig: u8[], measurement: u32, task_id: u8[], length: u32, time_precision: u64, report: OutParam<u8[]>): void; -} - // https://searchfox.org/mozilla-central/source/netwerk/test/httpserver/nsIHttpServer.idl interface nsIHttpServer extends nsISupports { @@ -13103,13 +13138,11 @@ namespace nsIGfxInfo { } interface nsIGfxInfo extends nsISupports, Enums<typeof nsIGfxInfo_FontVisibilityDeviceDetermination> { - readonly D2DEnabled: boolean; readonly DWriteEnabled: boolean; readonly EmbeddedInFirefoxReality: boolean; readonly AzureCanvasBackend: string; readonly AzureContentBackend: string; readonly usingGPUProcess: boolean; - readonly usingRemoteCanvas: boolean; readonly usingAcceleratedCanvas: boolean; readonly hasBattery: boolean; readonly DWriteVersion: string; @@ -15508,6 +15541,7 @@ interface nsIXPCComponents_Interfaces { nsIEventListenerService: nsJSIID<nsIEventListenerService>; mozIGeckoMediaPluginChromeService: nsJSIID<mozIGeckoMediaPluginChromeService>; mozIGeckoMediaPluginService: nsJSIID<mozIGeckoMediaPluginService>; + nsIDAPTelemetry: nsJSIID<nsIDAPTelemetry>; nsIDocShell: nsJSIID<nsIDocShell, typeof nsIDocShell_DocShellEnumeratorDirection & typeof nsIDocShell_AppType & typeof nsIDocShell_BusyFlags & typeof nsIDocShell_LoadCommand>; nsIDocShellTreeItem: nsJSIID<nsIDocShellTreeItem>; nsIDocShellTreeOwner: nsJSIID<nsIDocShellTreeOwner>; @@ -16113,15 +16147,16 @@ interface nsIXPCComponents_Interfaces { nsIX509Cert: nsJSIID<nsIX509Cert>; nsIAppSignatureInfo: nsJSIID<nsIAppSignatureInfo, typeof nsIAppSignatureInfo_SignatureAlgorithm>; nsIOpenSignedAppFileCallback: nsJSIID<nsIOpenSignedAppFileCallback>; + nsIPDFVerificationResult: nsJSIID<nsIPDFVerificationResult>; nsICertVerificationCallback: nsJSIID<nsICertVerificationCallback>; - nsIX509CertDB: nsJSIID<nsIX509CertDB, typeof nsIX509CertDB_VerifyUsage>; + nsIX509CertDB: nsJSIID<nsIX509CertDB, typeof nsIX509CertDB_VerifyUsage & typeof nsIX509CertDB_QWACType & typeof nsIX509CertDB_PDFSignatureAlgorithm>; nsIX509CertValidity: nsJSIID<nsIX509CertValidity>; mozIVisitInfo: nsJSIID<mozIVisitInfo>; mozIPlaceInfo: nsJSIID<mozIPlaceInfo>; mozIVisitInfoCallback: nsJSIID<mozIVisitInfoCallback>; mozIVisitedStatusCallback: nsJSIID<mozIVisitedStatusCallback>; mozIAsyncHistory: nsJSIID<mozIAsyncHistory>; - mozIPlacesAutoComplete: nsJSIID<mozIPlacesAutoComplete>; + mozIPlacesAutoComplete: nsJSIID<mozIPlacesAutoComplete, typeof mozIPlacesAutoComplete_MatchBehaviors & typeof mozIPlacesAutoComplete_SearchBehaviors>; mozIPlacesPendingOperation: nsJSIID<mozIPlacesPendingOperation>; mozISyncedBookmarksMirrorProgressListener: nsJSIID<mozISyncedBookmarksMirrorProgressListener>; mozISyncedBookmarksMirrorCallback: nsJSIID<mozISyncedBookmarksMirrorCallback>; @@ -16193,7 +16228,6 @@ interface nsIXPCComponents_Interfaces { mozIStorageValueArray: nsJSIID<mozIStorageValueArray>; nsIFetchTelemetryDataCallback: nsJSIID<nsIFetchTelemetryDataCallback>; nsITelemetry: nsJSIID<nsITelemetry>; - nsIDAPTelemetry: nsJSIID<nsIDAPTelemetry>; nsIHttpServer: nsJSIID<nsIHttpServer>; nsIHttpServerStoppedCallback: nsJSIID<nsIHttpServerStoppedCallback>; nsIHttpServerIdentity: nsJSIID<nsIHttpServerIdentity>;