Files
servo/components/script_bindings/webidls/DocumentOrShadowRoot.webidl
Onur Şahin fb9bef66fd script: Implement DocumentOrShadowRoot.FullscreenDocument (#42401)
Implement
[DocumentOrShadowRoot.FullscreenDocument](https://fullscreen.spec.whatwg.org/#dom-document-fullscreenelement).

## Changes
- Update IDL definition by removing `Document.fullscreenElement` and
declaring it in `DocumentOrShadowRoot` mixin as per the
[spec](https://fullscreen.spec.whatwg.org/#api)
- Implement [fullscreenElement
getter](https://fullscreen.spec.whatwg.org/#dom-document-fullscreenelement)
as a method in `DocumentOrShadowroot.get_fullscreen_element` which is
used by `Document` and `ShadowRoot`.
- Changedbubble and composed flags for fullscreen enter and exit events
to true.
- Delete `shadowroot-fullscreen-element.html.ini` since the test now
passes.

## Testing
Enable `shadowroot-fullscreen-element.html` WPT test.

Passing WPT run: https://github.com/onsah/servo/actions/runs/21872882492

## Fixes
https://github.com/servo/servo/issues/42234

Signed-off-by: Onur Sahin <sahinonur2000@hotmail.com>
2026-02-12 09:55:11 +00:00

30 lines
1.2 KiB
Plaintext

/* 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/. */
/*
* The origin of this IDL file is
* https://dom.spec.whatwg.org/#documentorshadowroot
* https://w3c.github.io/webcomponents/spec/shadow/#extensions-to-the-documentorshadowroot-mixin
* https://fullscreen.spec.whatwg.org/#api
*/
interface mixin DocumentOrShadowRoot {
// Selection? getSelection();
Element? elementFromPoint (double x, double y);
sequence<Element> elementsFromPoint (double x, double y);
// CaretPosition? caretPositionFromPoint (double x, double y);
readonly attribute Element? activeElement;
readonly attribute StyleSheetList styleSheets;
};
partial interface mixin DocumentOrShadowRoot {
// TODO(37902): Use ObservableArray Array when available
[Pref="dom_adoptedstylesheet_enabled", SetterThrows]
attribute /* ObservableArray<CSSStyleSheet> */ any adoptedStyleSheets;
};
// https://fullscreen.spec.whatwg.org/#api
partial interface mixin DocumentOrShadowRoot {
[LegacyLenientSetter] readonly attribute Element? fullscreenElement;
};