Files
servo/components/script/dom/document/mod.rs
Martin Robinson ceac966c34 script: Remove focus transaction concept (#43834)
For years Servo has had the concept of a focus transaction which was
used only to allow falling back to focusing the viewport when focusing a
clicked element failed. As this concept isn't part of the specification,
this change removes it.

Instead, a `FocusableArea` (a specification concept) is passed to
the `Document` focusing code. A `FocusableArea` might also be the
`Document`'s viewport.

As part of this change, some focus-related methods are moved to `Node`
from `Element` as the `Document` is not an `Element`.  This brings the
code closer to implementing the "focusing steps" from the specification.

Testing: This should not change behavior and is thus covered by existing
tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-01 15:12:21 +00:00

14 lines
547 B
Rust

/* 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/. */
pub(crate) use self::document::*;
#[allow(clippy::module_inception, reason = "The interface name is Document")]
pub(crate) mod document;
pub(crate) mod document_embedder_controls;
pub(crate) mod document_event_handler;
pub(crate) mod documentfragment;
pub(crate) mod documentorshadowroot;
pub(crate) mod documenttype;
pub(crate) mod focus;