Bug 1855531 - Part 2: Add InstrumentedProps for DOM core interfaces r=webidl,emilio

This covers things supported by WebKit and Blink but not in Gecko, and then manually picked for easier review. Mostly automated by https://github.com/saschanaz/gecko-webidl-frustrated.

Depends on D189411

Differential Revision: https://phabricator.services.mozilla.com/D189412
This commit is contained in:
Kagami Sascha Rosylight 2023-09-28 19:40:50 +00:00
Родитель 214ade08c6
Коммит 60da6db818
16 изменённых файлов: 90 добавлений и 14 удалений

Просмотреть файл

@ -148,6 +148,10 @@ custom PercentageStrokeWidthInSVGText whether percentage stroke-width is used in
// Missing-property use counters. We claim these are "method" use
// counters, because we don't need a separate description string for
// them and we only need one use counter, not a getter/setter pair.
method Clipboard.read
method Clipboard.readText
method Clipboard.write
method DataTransferItem.webkitGetAsEntry
method Document.caretRangeFromPoint
method Document.exitPictureInPicture
method Document.featurePolicy
@ -176,6 +180,42 @@ method Document.webkitVisibilityState
method Document.xmlEncoding
method Document.xmlStandalone
method Document.xmlVersion
method Element.computedStyleMap
method Element.onmousewheel
method Element.scrollIntoViewIfNeeded
method HTMLButtonElement.popoverTargetAction
method HTMLButtonElement.popoverTargetElement
method HTMLElement.attributeStyleMap
method HTMLElement.hidePopover
method HTMLElement.popover
method HTMLElement.showPopover
method HTMLElement.togglePopover
method HTMLIFrameElement.loading
method HTMLInputElement.capture
method HTMLInputElement.incremental
method HTMLInputElement.onsearch
method HTMLInputElement.popoverTargetAction
method HTMLInputElement.popoverTargetElement
method HTMLInputElement.webkitdirectory
method HTMLInputElement.webkitEntries
method HTMLMediaElement.disableRemotePlayback
method HTMLMediaElement.remote
method HTMLVideoElement.cancelVideoFrameCallback
method HTMLVideoElement.disablePictureInPicture
method HTMLVideoElement.onenterpictureinpicture
method HTMLVideoElement.onleavepictureinpicture
method HTMLVideoElement.playsInline
method HTMLVideoElement.requestPictureInPicture
method HTMLVideoElement.requestVideoFrameCallback
method ImageData.colorSpace
method Location.ancestorOrigins
method Navigator.canShare
method Navigator.clearAppBadge
method Navigator.setAppBadge
method Navigator.share
method Navigator.userActivation
method Navigator.wakeLock
method ShadowRoot.pictureInPictureElement
method Window.AbsoluteOrientationSensor
method Window.Accelerometer
method Window.BackgroundFetchManager
@ -254,9 +294,11 @@ method Window.offscreenBuffering
method Window.onbeforeinstallprompt
method Window.oncancel
method Window.onmousewheel
method Window.onorientationchange
method Window.onsearch
method Window.onselectionchange
method Window.openDatabase
method Window.orientation
method Window.OrientationSensor
method Window.OverconstrainedError
method Window.PasswordCredential
@ -337,6 +379,7 @@ method Window.webkitSpeechRecognition
method Window.webkitSpeechRecognitionError
method Window.webkitSpeechRecognitionEvent
method Window.webkitStorageInfo
method WorkerNavigator.permissions
// Gecko-specific command usage of `Document.execCommand`
custom DocumentExecCommandContentReadOnly calls execCommand with contentReadOnly

Просмотреть файл

@ -12,7 +12,9 @@
typedef sequence<ClipboardItem> ClipboardItems;
[SecureContext, Exposed=Window]
[SecureContext,
Exposed=Window,
InstrumentedProps=(read,readText,write)]
interface Clipboard : EventTarget {
[Pref="dom.events.asyncClipboard.clipboardItem", NewObject, NeedsSubjectPrincipal]
Promise<ClipboardItems> read();

Просмотреть файл

@ -8,7 +8,7 @@
* https://wicg.github.io/entries-api/#idl-index
*/
[Exposed=Window]
[InstrumentedProps=(webkitGetAsEntry),Exposed=Window]
interface DataTransferItem {
readonly attribute DOMString kind;
readonly attribute DOMString type;

Просмотреть файл

@ -15,7 +15,8 @@
interface nsIScreen;
[Exposed=Window]
[Exposed=Window,
InstrumentedProps=(computedStyleMap,onmousewheel,scrollIntoViewIfNeeded)]
interface Element : Node {
[Constant]
readonly attribute DOMString? namespaceURI;

Просмотреть файл

@ -11,7 +11,8 @@
*/
// http://www.whatwg.org/specs/web-apps/current-work/#the-button-element
[Exposed=Window]
[Exposed=Window,
InstrumentedProps=(popoverTargetAction,popoverTargetElement)]
interface HTMLButtonElement : HTMLElement {
[HTMLConstructor] constructor();

Просмотреть файл

@ -12,7 +12,8 @@
* and create derivative works of this document.
*/
[Exposed=Window]
[Exposed=Window,
InstrumentedProps=(attributeStyleMap,hidePopover,popover,showPopover,togglePopover)]
interface HTMLElement : Element {
[HTMLConstructor] constructor();

Просмотреть файл

@ -13,7 +13,8 @@
* and create derivative works of this document.
*/
[Exposed=Window]
[Exposed=Window,
InstrumentedProps=(loading)]
interface HTMLIFrameElement : HTMLElement {
[HTMLConstructor] constructor();

Просмотреть файл

@ -22,7 +22,14 @@ enum SelectionMode {
interface XULControllers;
[Exposed=Window]
[Exposed=Window,
InstrumentedProps=(capture,
incremental,
onsearch,
popoverTargetAction,
popoverTargetElement,
webkitEntries,
webkitdirectory)]
interface HTMLInputElement : HTMLElement {
[HTMLConstructor] constructor();

Просмотреть файл

@ -11,7 +11,8 @@
* and create derivative works of this document.
*/
[Exposed=Window]
[Exposed=Window,
InstrumentedProps=(disableRemotePlayback,remote)]
interface HTMLMediaElement : HTMLElement {
// error state

Просмотреть файл

@ -11,7 +11,14 @@
* and create derivative works of this document.
*/
[Exposed=Window]
[Exposed=Window,
InstrumentedProps=(cancelVideoFrameCallback,
disablePictureInPicture,
onenterpictureinpicture,
onleavepictureinpicture,
playsInline,
requestPictureInPicture,
requestVideoFrameCallback)]
interface HTMLVideoElement : HTMLMediaElement {
[HTMLConstructor] constructor();

Просмотреть файл

@ -11,7 +11,8 @@
*/
[Exposed=(Window,Worker),
Serializable]
Serializable,
InstrumentedProps=(colorSpace)]
interface ImageData {
[Throws]
constructor(unsigned long sw, unsigned long sh);

Просмотреть файл

@ -12,7 +12,8 @@
*/
[LegacyUnforgeable,
Exposed=Window]
Exposed=Window,
InstrumentedProps=(ancestorOrigins)]
interface Location {
[Throws, CrossOriginWritable, NeedsSubjectPrincipal]
stringifier attribute USVString href;

Просмотреть файл

@ -28,7 +28,13 @@ interface URI;
// https://html.spec.whatwg.org/#the-navigator-object
[HeaderFile="Navigator.h",
Exposed=Window]
Exposed=Window,
InstrumentedProps=(canShare,
clearAppBadge,
setAppBadge,
share,
userActivation,
wakeLock)]
interface Navigator {
// objects implementing this interface also implement the interfaces given below
};

Просмотреть файл

@ -19,7 +19,8 @@ enum ShadowRootMode {
enum SlotAssignmentMode { "manual", "named" };
// https://dom.spec.whatwg.org/#shadowroot
[Exposed=Window]
[Exposed=Window,
InstrumentedProps=(pictureInPictureElement)]
interface ShadowRoot : DocumentFragment
{
// Shadow DOM v1

Просмотреть файл

@ -109,9 +109,11 @@ interface nsIPrintSettings;
onbeforeinstallprompt,
oncancel,
onmousewheel,
onorientationchange,
onsearch,
onselectionchange,
openDatabase,
orientation,
OrientationSensor,
OverconstrainedError,
PasswordCredential,

Просмотреть файл

@ -3,7 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
[Exposed=Worker]
[Exposed=Worker,
InstrumentedProps=(permissions)]
interface WorkerNavigator {
};