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§
Source§impl Clone for ContentAreaSettings
impl Clone for ContentAreaSettings
Source§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 moreSource§impl Debug for ContentAreaSettings
impl Debug for ContentAreaSettings
Source§impl<D: ResourceDialect> Decode<ContentAreaSettings, D> for ContentAreaSettings
impl<D: ResourceDialect> Decode<ContentAreaSettings, D> for ContentAreaSettings
Source§impl Default for ContentAreaSettings
impl Default for ContentAreaSettings
Source§fn default() -> ContentAreaSettings
fn default() -> ContentAreaSettings
Source§impl<D: ResourceDialect> Encode<ContentAreaSettings, D> for &ContentAreaSettings
impl<D: ResourceDialect> Encode<ContentAreaSettings, D> for &ContentAreaSettings
Source§impl PartialEq for ContentAreaSettings
impl PartialEq for ContentAreaSettings
Source§impl TypeMarker for ContentAreaSettings
impl TypeMarker for ContentAreaSettings
Source§type Owned = ContentAreaSettings
type Owned = ContentAreaSettings
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§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.Source§impl ValueTypeMarker for ContentAreaSettings
impl ValueTypeMarker for ContentAreaSettings
Source§type Borrowed<'a> = &'a ContentAreaSettings
type Borrowed<'a> = &'a ContentAreaSettings
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Persistable for ContentAreaSettings
impl StructuralPartialEq for ContentAreaSettings
Auto Trait Implementations§
impl Freeze for ContentAreaSettings
impl RefUnwindSafe for ContentAreaSettings
impl Send for ContentAreaSettings
impl Sync for ContentAreaSettings
impl Unpin for ContentAreaSettings
impl UnwindSafe for ContentAreaSettings
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)