mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Make auxiliary webviews exist in the constellation immediately (#35672)
To allow embedders to interact with webviews as soon as they are created, we need to ensure that they exist in both the compositor and the constellation before those interactions happen. #35662 does this for the compositor, while this patch does this for the constellation. When a webview opens another webview (via <a target>, <form target>, window.open(), etc), the embedder creates an “auxiliary” webview, which previously went as follows: - script create_auxiliary_browsing_context - libservo AllowOpeningWebView - embedder request_open_auxiliary_webview (→ constellation FocusWebView) - script create_auxiliary_browsing_context - constellation ScriptNewAuxiliary In that model, the constellation may receive FocusWebView before it receives ScriptNewAuxiliary. Now they are created as follows: - script create_auxiliary_browsing_context - constellation CreateAuxiliaryWebView - libservo AllowOpeningWebView - embedder request_open_auxiliary_webview (→ constellation FocusWebView) - constellation CreateAuxiliaryWebView - script create_auxiliary_browsing_context Since these messages are all synchronous and the constellation will have set up the webview before handling any new messages, the webview will always exist by the time we handle the embedder’s FocusWebView. Signed-off-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
3d459badc0
commit
b4e2037dbe
5 changed files with 108 additions and 86 deletions
|
@ -167,7 +167,7 @@ mod from_script {
|
|||
Self::SetThrottledComplete(..) => target!("SetThrottledComplete"),
|
||||
Self::ScriptLoadedURLInIFrame(..) => target!("ScriptLoadedURLInIFrame"),
|
||||
Self::ScriptNewIFrame(..) => target!("ScriptNewIFrame"),
|
||||
Self::ScriptNewAuxiliary(..) => target!("ScriptNewAuxiliary"),
|
||||
Self::CreateAuxiliaryWebView(..) => target!("ScriptNewAuxiliary"),
|
||||
Self::ActivateDocument => target!("ActivateDocument"),
|
||||
Self::SetDocumentState(..) => target!("SetDocumentState"),
|
||||
Self::SetLayoutEpoch(..) => target!("SetLayoutEpoch"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue