mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
script: Move "scroll into view" call out of "focusing steps" (#43842)
`HTMLOrSVGElement#focus` specifies the "scroll into view" steps should be run after focusing. This was happening implicitly as part of the `Document`'s implementation of the "focusing steps." That behavior is not in the specification, so this change moves the scrolling call to where it is specified. Along with making the code match the specification, this change simplifies it as well. Testing: This should not modify behavior, so existing tests should suffice. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
@@ -6,10 +6,9 @@ use bitflags::bitflags;
|
||||
use script_bindings::root::DomRoot;
|
||||
|
||||
use crate::dom::Node;
|
||||
use crate::dom::bindings::codegen::Bindings::HTMLOrSVGElementBinding::FocusOptions;
|
||||
|
||||
pub(crate) enum FocusOperation {
|
||||
Focus(FocusableArea, FocusOptions),
|
||||
Focus(FocusableArea),
|
||||
Unfocus,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user