mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
constellation: focusing and closing webviews (#30842)
* constellation: focusing, closing, and native window visibility * rename “browser” to “webview”, “unfocus” to “blur” * remove native window visibility from constellation * rename more “browser” to “webview” * guard clauses * don’t automatically focus when no webviews are focused * comment spec steps for window.close() * use format interpolation Co-authored-by: Martin Robinson <mrobinson@igalia.com> * fix formatting * rename “Webview” to “WebView” in types and type parameters * remove unused method * fix libsimpleservo --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
6baaa82826
commit
eb95703325
16 changed files with 533 additions and 285 deletions
|
@ -257,8 +257,13 @@ impl BrowsingContextId {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Default, Eq, Hash, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
|
||||
pub struct BrowsingContextGroupId(pub u32);
|
||||
impl fmt::Display for BrowsingContextGroupId {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "BrowsingContextGroup{:?}", self)
|
||||
}
|
||||
}
|
||||
|
||||
thread_local!(pub static TOP_LEVEL_BROWSING_CONTEXT_ID: Cell<Option<TopLevelBrowsingContextId>> = Cell::new(None));
|
||||
|
||||
|
@ -266,6 +271,7 @@ thread_local!(pub static TOP_LEVEL_BROWSING_CONTEXT_ID: Cell<Option<TopLevelBrow
|
|||
Clone, Copy, Deserialize, Eq, Hash, MallocSizeOf, Ord, PartialEq, PartialOrd, Serialize,
|
||||
)]
|
||||
pub struct TopLevelBrowsingContextId(pub BrowsingContextId);
|
||||
pub type WebViewId = TopLevelBrowsingContextId;
|
||||
|
||||
size_of_test!(TopLevelBrowsingContextId, 8);
|
||||
size_of_test!(Option<TopLevelBrowsingContextId>, 8);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue