Struct ContentAreaSettings
pub struct ContentAreaSettings {
pub hide_scrollbars: Option<bool>,
pub autoplay_policy: Option<AutoplayPolicy>,
pub theme: Option<ThemeType>,
pub page_scale: Option<f32>,
/* private fields */
}
Expand description
Settings for the web content in the Frame. Popup Frames created by the Frame will have their settings initialized to the Frame’s current settings.
Fields§
§hide_scrollbars: Option<bool>
Specifies whether scrollbars are hidden for the Frame. If omitted, the default is false.
autoplay_policy: Option<AutoplayPolicy>
Specifies the autoplay policy for the Frame. If omitted, the default policy is
REQUIRE_USER_ACTIVATION
.
theme: Option<ThemeType>
Specifies the color theme reported to web content via the prefers-color-scheme
media
query.
Valid inputs are LIGHT
, DARK
, and DEFAULT
. If omitted, the default is LIGHT theme.
Specifying DEFAULT
means using the system settings, and requires that the [Context
] have
the [fuchsia.settings.Display
] service. If the service is not available, the [Frame
]
will disconnect with ZX_ERR_INVALID_ARGS
.
page_scale: Option<f32>
Sets scale factor (zoom level) that should be applied to web content rendered in this
frame. Values above 1.0 make all web content (including text and images) larger, while
values below 1.0 will make it smaller. In other words, values above 1.0 are used to zoom in
and values below 1.0 zoom out. The overall ratio between physical pixel and CSS pixel is a
product of the scale set with this method and the scale provided by Scenic (see
[fuchsia.ui.gfx.Metrics
]). That product is visible to the web content as
window.devicePixelRatio
. If omitted, the default is 1.0.
This setting does not have any effect on the size of the view on the screen and the
resolution at which the view is rendered. Native (non-web) UI elements, such as default
scroll bars and default mouse cursor, are not scaled. User may zoom the page further when
pinch-zoom is enabled (see [InputTypes.GESTURE_PINCH
]).
Trait Implementations§
§impl Clone for ContentAreaSettings
impl Clone for ContentAreaSettings
§fn clone(&self) -> ContentAreaSettings
fn clone(&self) -> ContentAreaSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for ContentAreaSettings
impl Debug for ContentAreaSettings
§impl<D> Decode<ContentAreaSettings, D> for ContentAreaSettingswhere
D: ResourceDialect,
impl<D> Decode<ContentAreaSettings, D> for ContentAreaSettingswhere
D: ResourceDialect,
§fn new_empty() -> ContentAreaSettings
fn new_empty() -> ContentAreaSettings
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl Default for ContentAreaSettings
impl Default for ContentAreaSettings
§fn default() -> ContentAreaSettings
fn default() -> ContentAreaSettings
§impl<D> Encode<ContentAreaSettings, D> for &ContentAreaSettingswhere
D: ResourceDialect,
impl<D> Encode<ContentAreaSettings, D> for &ContentAreaSettingswhere
D: ResourceDialect,
§impl PartialEq for ContentAreaSettings
impl PartialEq for ContentAreaSettings
§impl TypeMarker for ContentAreaSettings
impl TypeMarker for ContentAreaSettings
§type Owned = ContentAreaSettings
type Owned = ContentAreaSettings
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for ContentAreaSettings
impl ValueTypeMarker for ContentAreaSettings
§type Borrowed<'a> = &'a ContentAreaSettings
type Borrowed<'a> = &'a ContentAreaSettings
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<ContentAreaSettings as TypeMarker>::Owned,
) -> <ContentAreaSettings as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<ContentAreaSettings as TypeMarker>::Owned, ) -> <ContentAreaSettings as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.