mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
script: Chain up keyboard scrolling to parent <iframe>
s (#39469)
When an `<iframe>` cannot scroll because the size of the frame is greater than or equal to the size of page contents, chain up the keyboard scroll operation to the parent frame. Testing: A new Servo-only WPT tests is added, though needs to be manually run with `--product servodriver`. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
parent
75e32ba5a4
commit
ffdb7d3663
23 changed files with 406 additions and 132 deletions
|
@ -107,7 +107,9 @@ pub(crate) struct WindowProxy {
|
|||
/// <https://html.spec.whatwg.org/multipage/#is-closing>
|
||||
is_closing: Cell<bool>,
|
||||
|
||||
/// The containing iframe element, if this is a same-origin iframe
|
||||
/// If the containing `<iframe>` of this [`WindowProxy`] is from a same-origin page,
|
||||
/// this will be the [`Element`] of the `<iframe>` element in the realm of the
|
||||
/// parent page. Otherwise, it is `None`.
|
||||
frame_element: Option<Dom<Element>>,
|
||||
|
||||
/// The parent browsing context's window proxy, if this is a nested browsing context
|
||||
|
@ -630,6 +632,9 @@ impl WindowProxy {
|
|||
self.webview_id
|
||||
}
|
||||
|
||||
/// If the containing `<iframe>` of this [`WindowProxy`] is from a same-origin page,
|
||||
/// this will return an [`Element`] of the `<iframe>` element in the realm of the parent
|
||||
/// page.
|
||||
pub(crate) fn frame_element(&self) -> Option<&Element> {
|
||||
self.frame_element.as_deref()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue