mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
Change BrowingContextId from WebViewId explicitly (#39095)
There were still some accesses to the inner BrowsingContextId from the WebViewId. This changes it to completely rely on the From trait for these methods. This also means we can make the field private. For testing we add a way to create arbitrary WebViewIds. Testing: Does not change functionality. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
parent
4ea714e6d2
commit
b73c81630a
8 changed files with 19 additions and 13 deletions
|
@ -588,8 +588,9 @@ impl Window {
|
|||
/// Returns the window proxy of the webview, which is the top-level ancestor browsing context.
|
||||
/// <https://html.spec.whatwg.org/multipage/#top-level-browsing-context>
|
||||
pub(crate) fn webview_window_proxy(&self) -> Option<DomRoot<WindowProxy>> {
|
||||
self.undiscarded_window_proxy()
|
||||
.and_then(|window_proxy| ScriptThread::find_window_proxy(window_proxy.webview_id().0))
|
||||
self.undiscarded_window_proxy().and_then(|window_proxy| {
|
||||
ScriptThread::find_window_proxy(window_proxy.webview_id().into())
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(feature = "bluetooth")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue