mirror of
https://github.com/servo/servo.git
synced 2025-07-21 22:33:41 +01:00
Rework “visible” to “throttled” in constellation + script + compositor (#31816)
This commit is contained in:
parent
9b26dca141
commit
8882507ad0
12 changed files with 124 additions and 129 deletions
|
@ -32,9 +32,9 @@ pub struct NewBrowsingContextInfo {
|
|||
/// Whether this browsing context inherits a secure context.
|
||||
pub inherited_secure_context: Option<bool>,
|
||||
|
||||
/// Whether this browsing context should be treated as visible for the
|
||||
/// purposes of scheduling and resource management.
|
||||
pub is_visible: bool,
|
||||
/// Whether this browsing context should be throttled, using less resources
|
||||
/// by stopping animations and running timers at a heavily limited rate.
|
||||
pub throttled: bool,
|
||||
}
|
||||
|
||||
/// The constellation's view of a browsing context.
|
||||
|
@ -62,9 +62,9 @@ pub struct BrowsingContext {
|
|||
/// Whether this browsing context inherits a secure context.
|
||||
pub inherited_secure_context: Option<bool>,
|
||||
|
||||
/// Whether this browsing context should be treated as visible for the
|
||||
/// purposes of scheduling and resource management.
|
||||
pub is_visible: bool,
|
||||
/// Whether this browsing context should be throttled, using less resources
|
||||
/// by stopping animations and running timers at a heavily limited rate.
|
||||
pub throttled: bool,
|
||||
|
||||
/// The pipeline for the current session history entry.
|
||||
pub pipeline_id: PipelineId,
|
||||
|
@ -90,7 +90,7 @@ impl BrowsingContext {
|
|||
size: Size2D<f32, CSSPixel>,
|
||||
is_private: bool,
|
||||
inherited_secure_context: Option<bool>,
|
||||
is_visible: bool,
|
||||
throttled: bool,
|
||||
) -> BrowsingContext {
|
||||
let mut pipelines = HashSet::new();
|
||||
pipelines.insert(pipeline_id);
|
||||
|
@ -101,7 +101,7 @@ impl BrowsingContext {
|
|||
size,
|
||||
is_private,
|
||||
inherited_secure_context,
|
||||
is_visible,
|
||||
throttled,
|
||||
pipeline_id,
|
||||
parent_pipeline_id,
|
||||
pipelines,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue