2024-03-27 12:30:54 -03:00
|
|
|
[Exposed=Nobody]
|
|
|
|
|
interface Internals {
|
2023-07-21 06:59:49 -03:00
|
|
|
|
2025-03-18 13:37:32 -03:00
|
|
|
undefined signalTestIsDone(DOMString text);
|
2024-12-19 11:16:05 -03:00
|
|
|
undefined setTestTimeout(double milliseconds);
|
2025-07-16 05:24:15 -03:00
|
|
|
undefined loadReferenceTestMetadata();
|
2024-12-19 11:16:05 -03:00
|
|
|
|
2025-06-25 17:32:24 -03:00
|
|
|
DOMString setTimeZone(DOMString timeZone);
|
|
|
|
|
|
2023-07-21 06:59:49 -03:00
|
|
|
undefined gc();
|
2026-04-04 01:20:26 -03:00
|
|
|
Promise<undefined> gcAsync();
|
2026-05-16 11:32:16 -03:00
|
|
|
// Clears a named environment binding and forces its current cell to be treated as garbage.
|
|
|
|
|
// This does not work for values stored only in optimized locals or registers.
|
|
|
|
|
undefined markAsGarbage(DOMString variableName);
|
2023-08-08 17:44:52 -03:00
|
|
|
object hitTest(double x, double y);
|
2023-11-30 14:54:30 -03:00
|
|
|
|
2024-10-09 19:47:44 -03:00
|
|
|
const unsigned short MOD_NONE = 0;
|
|
|
|
|
const unsigned short MOD_ALT = 1;
|
|
|
|
|
const unsigned short MOD_CTRL = 2;
|
|
|
|
|
const unsigned short MOD_SHIFT = 4;
|
|
|
|
|
const unsigned short MOD_SUPER = 8;
|
|
|
|
|
const unsigned short MOD_KEYPAD = 16;
|
|
|
|
|
|
2026-02-05 07:47:32 -03:00
|
|
|
const unsigned short BUTTON_LEFT = 0;
|
|
|
|
|
const unsigned short BUTTON_MIDDLE = 1;
|
|
|
|
|
const unsigned short BUTTON_RIGHT = 2;
|
|
|
|
|
|
2024-10-09 19:47:44 -03:00
|
|
|
undefined sendText(HTMLElement target, DOMString text, optional unsigned short modifiers = 0);
|
|
|
|
|
undefined sendKey(HTMLElement target, DOMString keyName, optional unsigned short modifiers = 0);
|
2025-09-18 10:18:54 -03:00
|
|
|
undefined paste(HTMLElement target, Utf16DOMString text);
|
2023-11-30 14:54:30 -03:00
|
|
|
undefined commitText();
|
|
|
|
|
|
2026-02-05 07:47:32 -03:00
|
|
|
// Low-level mouse primitives
|
2026-03-07 03:06:07 -03:00
|
|
|
undefined mouseDown(double x, double y, optional unsigned short clickCount = 1, optional unsigned short button = 0, optional unsigned short modifiers = 0);
|
2026-02-05 07:47:32 -03:00
|
|
|
undefined mouseUp(double x, double y, optional unsigned short button = 0, optional unsigned short modifiers = 0);
|
|
|
|
|
undefined mouseMove(double x, double y, optional unsigned short modifiers = 0);
|
2026-05-26 19:32:28 -03:00
|
|
|
undefined mouseLeave();
|
2026-02-05 07:47:32 -03:00
|
|
|
|
|
|
|
|
// High-level mouse conveniences
|
|
|
|
|
undefined click(double x, double y, optional unsigned short clickCount = 1, optional unsigned short button = 0, optional unsigned short modifiers = 0);
|
|
|
|
|
undefined clickAndHold(double x, double y, optional unsigned short clickCount = 1, optional unsigned short button = 0, optional unsigned short modifiers = 0);
|
2026-05-15 11:21:30 -03:00
|
|
|
Promise<undefined> wheel(double x, double y, double deltaX, double deltaY);
|
2026-05-26 23:04:15 -03:00
|
|
|
undefined pinch(double x, double y, double scaleDelta, optional unsigned short modifiers = 0);
|
2023-12-03 11:54:26 -03:00
|
|
|
|
2025-12-02 11:11:24 -03:00
|
|
|
DOMString currentCursor();
|
|
|
|
|
|
2026-05-28 06:58:12 -03:00
|
|
|
// Returns the text that would be placed on the clipboard if the user copied the current selection now.
|
|
|
|
|
// Excludes nodes whose used value of user-select is 'none' — mirroring what browsers actually copy.
|
|
|
|
|
DOMString selectedTextForClipboard();
|
|
|
|
|
|
2026-05-28 11:48:50 -03:00
|
|
|
// Drive marked/preedit-text composition via the same path platform input methods use. setMarkedTextFromInputMethod
|
|
|
|
|
// updates the inline preedit — replacing any previous preedit. commitText finalizes the composition with the given
|
|
|
|
|
// text. unmarkText finalizes the composition — leaving the current preedit in place. Each fires an InputEvent with
|
|
|
|
|
// inputType = "insertText" on the focused editable. All are no-ops if nothing editable is focused.
|
|
|
|
|
undefined setMarkedTextFromInputMethod(Utf16DOMString text);
|
|
|
|
|
undefined commitTextFromInputMethod(Utf16DOMString text);
|
|
|
|
|
undefined unmarkTextFromInputMethod();
|
|
|
|
|
|
|
|
|
|
// Returns the bounds of the current text caret in viewport-relative CSS pixels — or null if no editable element is
|
|
|
|
|
// focused. Used for verifying the data the platform UI feeds into IME overlay positioning.
|
|
|
|
|
DOMRect? currentCaretRect();
|
|
|
|
|
|
2024-02-24 18:28:53 -03:00
|
|
|
boolean dispatchUserActivatedEvent(EventTarget target, Event event);
|
2024-09-15 00:16:46 -03:00
|
|
|
undefined spoofCurrentURL(USVString url);
|
2023-07-21 06:59:49 -03:00
|
|
|
|
2026-06-16 20:06:17 -03:00
|
|
|
// Loads a URL in the top-level traversable — deferred so it starts outside the calling task and can land between
|
|
|
|
|
// session-history traversal-queue steps, as can one requested by ConnectionFromClient::load_url in the UI process.
|
|
|
|
|
undefined loadURL(USVString url);
|
|
|
|
|
|
2024-03-27 12:30:54 -03:00
|
|
|
InternalAnimationTimeline createInternalAnimationTimeline();
|
2024-08-17 14:29:55 -03:00
|
|
|
|
|
|
|
|
undefined simulateDragStart(double x, double y, DOMString mimeType, DOMString contents);
|
|
|
|
|
undefined simulateDragMove(double x, double y);
|
|
|
|
|
undefined simulateDrop(double x, double y);
|
2024-10-13 09:56:46 -03:00
|
|
|
|
|
|
|
|
undefined expireCookiesWithTimeOffset(long long seconds);
|
2026-06-10 12:37:14 -03:00
|
|
|
Promise<undefined> deleteAllCookies();
|
2024-10-29 14:35:14 -03:00
|
|
|
|
2025-11-18 12:40:00 -03:00
|
|
|
boolean setHttpMemoryCacheEnabled(boolean enabled);
|
2026-05-21 13:35:49 -03:00
|
|
|
undefined setContentBlockers(DOMString patterns);
|
|
|
|
|
undefined setContentBlockingEnabled(boolean enabled);
|
2026-06-09 13:55:09 -03:00
|
|
|
undefined setAutoplayPolicy(DOMString policy);
|
2025-11-18 12:40:00 -03:00
|
|
|
|
2024-12-06 04:29:11 -03:00
|
|
|
DOMString getComputedRole(Element element);
|
2024-10-29 14:35:14 -03:00
|
|
|
DOMString getComputedLabel(Element element);
|
2025-10-10 12:25:49 -03:00
|
|
|
DOMString getComputedAriaLevel(Element element);
|
2024-12-02 22:43:51 -03:00
|
|
|
unsigned short getEchoServerPort();
|
2024-12-09 18:53:31 -03:00
|
|
|
|
2026-03-26 14:12:19 -03:00
|
|
|
undefined setHSTSPolicy(DOMString domain, unsigned long long maxAge, boolean includeSubDomains);
|
|
|
|
|
undefined ingestHSTSHeader(USVString url, DOMString headerValue);
|
|
|
|
|
boolean isKnownHSTSHost(DOMString domain);
|
|
|
|
|
|
2024-12-23 18:15:06 -03:00
|
|
|
undefined setBrowserZoom(double factor);
|
2026-02-05 14:02:28 -03:00
|
|
|
undefined setDevicePixelRatio(double ratio);
|
2024-12-23 18:15:06 -03:00
|
|
|
|
2024-12-09 18:53:31 -03:00
|
|
|
readonly attribute boolean headless;
|
2025-07-09 21:05:28 -03:00
|
|
|
|
|
|
|
|
DOMString dumpDisplayList();
|
2026-05-28 15:20:05 -03:00
|
|
|
DOMString dumpAccessibilityTree();
|
2026-02-09 16:23:05 -03:00
|
|
|
DOMString dumpLayoutTree(Node node);
|
2026-02-15 00:32:47 -03:00
|
|
|
DOMString dumpPaintableTree(Node node);
|
2026-01-28 12:40:49 -03:00
|
|
|
DOMString dumpStackingContextTree();
|
2025-11-03 22:49:40 -03:00
|
|
|
DOMString dumpGCGraph();
|
2026-04-03 15:02:18 -03:00
|
|
|
DOMString dumpSessionHistory();
|
2026-06-13 11:06:49 -03:00
|
|
|
DOMString dumpUIProcessSessionHistory();
|
2026-06-13 11:06:58 -03:00
|
|
|
Promise<undefined> flushSessionHistoryTraversalQueue();
|
2025-08-07 11:23:55 -03:00
|
|
|
|
2026-06-16 01:28:27 -03:00
|
|
|
// Test-only: deterministically reproduce the navigation-vs-traversal race in Navigable::begin_navigation by
|
|
|
|
|
// re-stamping the next navigation's ongoing navigation with a traversal during its unload check.
|
|
|
|
|
undefined clobberNextNavigationWithATraversal();
|
|
|
|
|
|
2025-08-07 11:23:55 -03:00
|
|
|
// Returns the shadow root of the element, if it has one, even if it's not normally accessible to JS.
|
|
|
|
|
ShadowRoot? getShadowRoot(Element element);
|
|
|
|
|
|
2025-08-18 13:28:06 -03:00
|
|
|
undefined handleSDLInputEvents();
|
|
|
|
|
|
2026-01-18 13:27:18 -03:00
|
|
|
undefined setEnvironmentsTopLevelURL(USVString url);
|
|
|
|
|
|
2025-08-18 13:28:06 -03:00
|
|
|
InternalGamepad connectVirtualGamepad();
|
|
|
|
|
|
2026-02-01 09:27:42 -03:00
|
|
|
undefined setHighlightedNode(Node? node);
|
|
|
|
|
|
2026-02-13 06:58:21 -03:00
|
|
|
undefined clearElement(HTMLElement element);
|
|
|
|
|
|
2026-04-25 10:27:20 -03:00
|
|
|
// Returns a snapshot of the style-invalidation and recomputation counters for the current document.
|
2026-05-23 08:16:30 -03:00
|
|
|
// Keys include hasAncestorWalkInvocations, hasInvalidationRuleCacheBuilds,
|
|
|
|
|
// styleInvalidations, elementStyleRecomputations, and elementStyleNoopRecomputations.
|
2026-04-18 14:04:13 -03:00
|
|
|
object getStyleInvalidationCounters();
|
|
|
|
|
undefined resetStyleInvalidationCounters();
|
2026-05-23 15:21:52 -03:00
|
|
|
// Flushes pending style work without forcing layout.
|
|
|
|
|
undefined updateStyle();
|
2026-05-27 06:56:19 -03:00
|
|
|
undefined setPreferredColorScheme(DOMString colorScheme);
|
|
|
|
|
DOMString canvasColorScheme();
|
2026-05-23 08:16:30 -03:00
|
|
|
// Returns the selector-insight cache state for stylesheet invalidation tests.
|
|
|
|
|
boolean styleSheetMayHaveHasSelectors(CSSStyleSheet sheet);
|
LibWeb: Transfer animation ownership to `AnimatedBitmapDecodedImageData`
Previously animation ownership was a messy split between
`AnimatedBitmapDecodedImageData` and the consumers (i.e.
`ImageStyleValueResource`, `HTMLImageElement`, and `SVGImageElement`)
with `AnimatedBitmapDecodedImageData` owning the frames and a current
frame index, and the consumers owning the rest of the state (e.g. loop
count, timers to drive the animation forward, their own current index).
This had a couple of main issues:
- While `AnimatedDecodedImageData` partially synchronized animations by
dropping unexpected advancement notifications, this didn't apply to
other animation state which meant, for instance, that a later started
consumer could drive the animation of an earlier one past the max
loop count (albeit without invalidating the earlier consumer).
- Multiple consumers didn't share frame timings, meaning animations
could be up to a full frame out of sync visually.
- Animations were paused depending on whether there were any consumers,
this is different to the behavior in other browsers (where they
continue regardless of whether there are any consumers).
- It was an overgeneralization of how animations need to work - only
`AnimatedBitmapDecodedImageData` works with an indexed frame model,
with animated SVGs (although not yet implemented) relying on their
internal event loop to be driven forward.
Given the above the new approach implemented in this commit is:
- The API for `DecodedImageData` is animation system agnostic, only
exposing `default_frame`, `current_frame`, and `restart_animation`
methods not reliant on providing a specific frame index.
- `AnimatedBitmapDecodedImageData` owns its own timer, loop count,
etc. The animation starts when the first consumer registers and ends
when the document is hidden or becomes inactive (or completes in the
case of finite animations).
- Consumers are invalidated by `AnimatedBitmapDecodedImageData` when
required.
Tests have been added for:
- Animations being paused when the document becomes inactive and
restarted when it becomes active again.
- Frame timings being synchronized across consumers.
- Restarts triggered by `HTMLImageElement` applying to all consumers.
- Processing ending once a non-infinite animation plays to completion.
The tests to ensure animations are cancelled when consumers are removed
(e.g. `animated-background-image-timer-stops-when-hidden.html`) have
been updated to assert the inverse since animation state is now per
resource not per consumer.
2026-06-15 19:56:00 -03:00
|
|
|
object imageAnimationStateForURL(USVString url);
|
2026-04-18 14:04:13 -03:00
|
|
|
|
LibWeb: Add compositor scroll state snapshots
Record the scroll geometry that CompositorThread can safely reason about
while the main thread is painting. The snapshot contains stable scroll
node IDs, parent links, scroll bounds, sticky inputs, and wheel blocker
regions in display-list coordinate space.
Add AsyncScrollingState and AsyncScrollTree under LibWeb/Compositor. The
state is the immutable main-thread snapshot; the tree is the mutable
compositor-side copy that can replay scroll deltas and sticky offsets
without touching DOM, layout, or paintables.
Expose the state through internals and add text tests for tree shape,
parent links, sticky areas, blocker hit testing, nested scrollers, and
admission decisions. Keep the directory skipped unless the feature is
enabled with --enable-async-scrolling.
2026-05-11 16:27:11 -03:00
|
|
|
object asyncScrollingState();
|
|
|
|
|
boolean asyncScrollingStateBlocksWheelEventAt(double x, double y);
|
|
|
|
|
boolean asyncScrollingStateCanWheelScrollAt(double x, double y, double deltaX, double deltaY, optional boolean forceStaleWheelEventRegions = false);
|
2026-05-11 18:51:57 -03:00
|
|
|
DOMString asyncScrollingStateWheelRoutingAdmission();
|
LibWeb: Add compositor scroll state snapshots
Record the scroll geometry that CompositorThread can safely reason about
while the main thread is painting. The snapshot contains stable scroll
node IDs, parent links, scroll bounds, sticky inputs, and wheel blocker
regions in display-list coordinate space.
Add AsyncScrollingState and AsyncScrollTree under LibWeb/Compositor. The
state is the immutable main-thread snapshot; the tree is the mutable
compositor-side copy that can replay scroll deltas and sticky offsets
without touching DOM, layout, or paintables.
Expose the state through internals and add text tests for tree shape,
parent links, sticky areas, blocker hit testing, nested scrollers, and
admission decisions. Keep the directory skipped unless the feature is
enabled with --enable-async-scrolling.
2026-05-11 16:27:11 -03:00
|
|
|
DOMString asyncScrollingStateWheelScrollAdmissionAt(double x, double y, double deltaX, double deltaY, optional boolean forceStaleWheelEventRegions = false);
|
2026-05-11 18:51:57 -03:00
|
|
|
DOMString asyncScrollingStateWheelTargetAt(double x, double y, double deltaX, double deltaY);
|
LibWeb: Add compositor scroll state snapshots
Record the scroll geometry that CompositorThread can safely reason about
while the main thread is painting. The snapshot contains stable scroll
node IDs, parent links, scroll bounds, sticky inputs, and wheel blocker
regions in display-list coordinate space.
Add AsyncScrollingState and AsyncScrollTree under LibWeb/Compositor. The
state is the immutable main-thread snapshot; the tree is the mutable
compositor-side copy that can replay scroll deltas and sticky offsets
without touching DOM, layout, or paintables.
Expose the state through internals and add text tests for tree shape,
parent links, sticky areas, blocker hit testing, nested scrollers, and
admission decisions. Keep the directory skipped unless the feature is
enabled with --enable-async-scrolling.
2026-05-11 16:27:11 -03:00
|
|
|
|
2023-07-21 06:59:49 -03:00
|
|
|
};
|