mirror of
https://github.com/servo/servo.git
synced 2025-09-23 05:10:09 +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
|
@ -89,7 +89,7 @@ mod test {
|
|||
use crate::webview_manager::WebViewManager;
|
||||
|
||||
fn id(namespace_id: u32, index: u32) -> WebViewId {
|
||||
WebViewId(BrowsingContextId {
|
||||
WebViewId::mock_for_testing(BrowsingContextId {
|
||||
namespace_id: PipelineNamespaceId(namespace_id),
|
||||
index: Index::new(index).expect("Incorrect test case"),
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue