servo_config::prefs

Struct Preferences

Source
pub struct Preferences {
Show 157 fields pub fonts_default: String, pub fonts_serif: String, pub fonts_sans_serif: String, pub fonts_monospace: String, pub fonts_default_size: i64, pub fonts_default_monospace_size: i64, pub css_animations_testing_enabled: bool, pub devtools_server_enabled: bool, pub devtools_server_port: i64, pub dom_webgpu_enabled: bool, pub dom_webgpu_wgpu_backend: String, pub dom_abort_controller_enabled: bool, pub dom_async_clipboard_enabled: bool, pub dom_bluetooth_enabled: bool, pub dom_bluetooth_testing_enabled: bool, pub dom_allow_scripts_to_close_windows: bool, pub dom_canvas_capture_enabled: bool, pub dom_canvas_text_enabled: bool, pub dom_clipboardevent_enabled: bool, pub dom_composition_event_enabled: bool, pub dom_crypto_subtle_enabled: bool, pub dom_customelements_enabled: bool, pub dom_document_dblclick_timeout: i64, pub dom_document_dblclick_dist: i64, pub dom_fontface_enabled: bool, pub dom_forcetouch_enabled: bool, pub dom_fullscreen_test: bool, pub dom_gamepad_enabled: bool, pub dom_imagebitmap_enabled: bool, pub dom_intersection_observer_enabled: bool, pub dom_microdata_testing_enabled: bool, pub dom_mouse_event_which_enabled: bool, pub dom_mutation_observer_enabled: bool, pub dom_notification_enabled: bool, pub dom_offscreen_canvas_enabled: bool, pub dom_permissions_enabled: bool, pub dom_permissions_testing_allowed_in_nonsecure_contexts: bool, pub dom_resize_observer_enabled: bool, pub dom_script_asynch: bool, pub dom_serviceworker_enabled: bool, pub dom_serviceworker_timeout_seconds: i64, pub dom_servo_helpers_enabled: bool, pub dom_servoparser_async_html_tokenizer_enabled: bool, pub dom_shadowdom_enabled: bool, pub dom_svg_enabled: bool, pub dom_testable_crash_enabled: bool, pub dom_testbinding_enabled: bool, pub dom_testbinding_prefcontrolled_enabled: bool, pub dom_testbinding_prefcontrolled2_enabled: bool, pub dom_testbinding_preference_value_falsy: bool, pub dom_testbinding_preference_value_quote_string_test: String, pub dom_testbinding_preference_value_space_string_test: String, pub dom_testbinding_preference_value_string_empty: String, pub dom_testbinding_preference_value_string_test: String, pub dom_testbinding_preference_value_truthy: bool, pub dom_testing_element_activation_enabled: bool, pub dom_testing_html_input_element_select_files_enabled: bool, pub dom_testperf_enabled: bool, pub dom_testutils_enabled: bool, pub dom_trusted_types_enabled: bool, pub dom_urlpattern_enabled: bool, pub dom_xpath_enabled: bool, pub dom_webgl2_enabled: bool, pub dom_webrtc_enabled: bool, pub dom_webrtc_transceiver_enabled: bool, pub dom_webvtt_enabled: bool, pub dom_webxr_enabled: bool, pub dom_webxr_test: bool, pub dom_webxr_first_person_observer_view: bool, pub dom_webxr_glwindow_enabled: bool, pub dom_webxr_glwindow_left_right: bool, pub dom_webxr_glwindow_red_cyan: bool, pub dom_webxr_glwindow_spherical: bool, pub dom_webxr_glwindow_cubemap: bool, pub dom_webxr_hands_enabled: bool, pub dom_webxr_layers_enabled: bool, pub dom_webxr_openxr_enabled: bool, pub dom_webxr_sessionavailable: bool, pub dom_webxr_unsafe_assume_user_intent: bool, pub dom_worklet_enabled: bool, pub dom_worklet_blockingsleep: bool, pub dom_worklet_testing_enabled: bool, pub dom_worklet_timeout_ms: i64, pub gfx_precache_shaders: bool, pub gfx_text_antialiasing_enabled: bool, pub gfx_subpixel_text_antialiasing_enabled: bool, pub gfx_texture_swizzling_enabled: bool, pub inspector_show_servo_internal_shadow_roots: bool, pub js_asmjs_enabled: bool, pub js_asyncstack: bool, pub js_baseline_interpreter_enabled: bool, pub js_disable_jit: bool, pub js_baseline_jit_enabled: bool, pub js_baseline_jit_unsafe_eager_compilation_enabled: bool, pub js_discard_system_source: bool, pub js_dump_stack_on_debuggee_would_run: bool, pub js_ion_enabled: bool, pub js_ion_offthread_compilation_enabled: bool, pub js_ion_unsafe_eager_compilation_enabled: bool, pub js_mem_gc_allocation_threshold_mb: i64, pub js_mem_gc_allocation_threshold_factor: i64, pub js_mem_gc_allocation_threshold_avoid_interrupt_factor: i64, pub js_mem_gc_compacting_enabled: bool, pub js_mem_gc_decommit_threshold_mb: i64, pub js_mem_gc_dynamic_heap_growth_enabled: bool, pub js_mem_gc_dynamic_mark_slice_enabled: bool, pub js_mem_gc_empty_chunk_count_max: i64, pub js_mem_gc_empty_chunk_count_min: i64, pub js_mem_gc_high_frequency_heap_growth_max: i64, pub js_mem_gc_high_frequency_heap_growth_min: i64, pub js_mem_gc_high_frequency_high_limit_mb: i64, pub js_mem_gc_high_frequency_low_limit_mb: i64, pub js_mem_gc_high_frequency_time_limit_ms: i64, pub js_mem_gc_incremental_enabled: bool, pub js_mem_gc_incremental_slice_ms: i64, pub js_mem_gc_low_frequency_heap_growth: i64, pub js_mem_gc_per_zone_enabled: bool, pub js_mem_gc_zeal_frequency: i64, pub js_mem_gc_zeal_level: i64, pub js_mem_max: i64, pub js_native_regex_enabled: bool, pub js_offthread_compilation_enabled: bool, pub js_parallel_parsing_enabled: bool, pub js_shared_memory: bool, pub js_throw_on_asmjs_validation_failure: bool, pub js_throw_on_debuggee_would_run: bool, pub js_timers_minimum_duration: i64, pub js_wasm_baseline_enabled: bool, pub js_wasm_enabled: bool, pub js_wasm_ion_enabled: bool, pub js_werror_enabled: bool, pub layout_animations_test_enabled: bool, pub layout_columns_enabled: bool, pub layout_grid_enabled: bool, pub layout_container_queries_enabled: bool, pub layout_css_transition_behavior_enabled: bool, pub layout_flexbox_enabled: bool, pub layout_threads: i64, pub layout_unimplemented: bool, pub layout_writing_mode_enabled: bool, pub media_glvideo_enabled: bool, pub media_testing_enabled: bool, pub network_enforce_tls_enabled: bool, pub network_enforce_tls_localhost: bool, pub network_enforce_tls_onion: bool, pub network_http_cache_disabled: bool, pub network_local_directory_listing_enabled: bool, pub network_mime_sniff: bool, pub session_history_max_length: i64, pub shell_background_color_rgba: [f64; 4], pub webgl_testing_context_creation_error: bool, pub threadpools_fallback_worker_num: i64, pub threadpools_image_cache_workers_max: i64, pub threadpools_async_runtime_workers_max: i64, pub threadpools_resource_workers_max: i64, pub threadpools_webrender_workers_max: i64, pub user_agent: String,
}

Fields§

§fonts_default: String§fonts_serif: String§fonts_sans_serif: String§fonts_monospace: String§fonts_default_size: i64§fonts_default_monospace_size: i64§css_animations_testing_enabled: bool§devtools_server_enabled: bool

Start the devtools server at startup

§devtools_server_port: i64

Port number to start a server to listen to remote Firefox devtools connections. 0 for random port.

§dom_webgpu_enabled: bool§dom_webgpu_wgpu_backend: String

List of comma-separated backends to be used by wgpu.

§dom_abort_controller_enabled: bool§dom_async_clipboard_enabled: bool§dom_bluetooth_enabled: bool§dom_bluetooth_testing_enabled: bool§dom_allow_scripts_to_close_windows: bool§dom_canvas_capture_enabled: bool§dom_canvas_text_enabled: bool§dom_clipboardevent_enabled: bool§dom_composition_event_enabled: bool§dom_crypto_subtle_enabled: bool§dom_customelements_enabled: bool§dom_document_dblclick_timeout: i64§dom_document_dblclick_dist: i64§dom_fontface_enabled: bool§dom_forcetouch_enabled: bool§dom_fullscreen_test: bool§dom_gamepad_enabled: bool§dom_imagebitmap_enabled: bool§dom_intersection_observer_enabled: bool§dom_microdata_testing_enabled: bool§dom_mouse_event_which_enabled: bool§dom_mutation_observer_enabled: bool§dom_notification_enabled: bool§dom_offscreen_canvas_enabled: bool§dom_permissions_enabled: bool§dom_permissions_testing_allowed_in_nonsecure_contexts: bool§dom_resize_observer_enabled: bool§dom_script_asynch: bool§dom_serviceworker_enabled: bool§dom_serviceworker_timeout_seconds: i64§dom_servo_helpers_enabled: bool§dom_servoparser_async_html_tokenizer_enabled: bool§dom_shadowdom_enabled: bool§dom_svg_enabled: bool§dom_testable_crash_enabled: bool§dom_testbinding_enabled: bool§dom_testbinding_prefcontrolled_enabled: bool§dom_testbinding_prefcontrolled2_enabled: bool§dom_testbinding_preference_value_falsy: bool§dom_testbinding_preference_value_quote_string_test: String§dom_testbinding_preference_value_space_string_test: String§dom_testbinding_preference_value_string_empty: String§dom_testbinding_preference_value_string_test: String§dom_testbinding_preference_value_truthy: bool§dom_testing_element_activation_enabled: bool§dom_testing_html_input_element_select_files_enabled: bool§dom_testperf_enabled: bool§dom_testutils_enabled: bool§dom_trusted_types_enabled: bool§dom_urlpattern_enabled: bool

Enable the URLPattern API.

§dom_xpath_enabled: bool§dom_webgl2_enabled: bool

Enable WebGL2 APIs.

§dom_webrtc_enabled: bool§dom_webrtc_transceiver_enabled: bool§dom_webvtt_enabled: bool§dom_webxr_enabled: bool§dom_webxr_test: bool§dom_webxr_first_person_observer_view: bool§dom_webxr_glwindow_enabled: bool§dom_webxr_glwindow_left_right: bool§dom_webxr_glwindow_red_cyan: bool§dom_webxr_glwindow_spherical: bool§dom_webxr_glwindow_cubemap: bool§dom_webxr_hands_enabled: bool§dom_webxr_layers_enabled: bool§dom_webxr_openxr_enabled: bool§dom_webxr_sessionavailable: bool§dom_webxr_unsafe_assume_user_intent: bool§dom_worklet_enabled: bool§dom_worklet_blockingsleep: bool§dom_worklet_testing_enabled: bool§dom_worklet_timeout_ms: i64§gfx_precache_shaders: bool

True to compile all WebRender shaders when Servo initializes. This is mostly useful when modifying the shaders, to ensure they all compile after each change is made.

§gfx_text_antialiasing_enabled: bool

Whether or not antialiasing is enabled for text rendering.

§gfx_subpixel_text_antialiasing_enabled: bool

Whether or not subpixel antialiasing is enabled for text rendering.

§gfx_texture_swizzling_enabled: bool§inspector_show_servo_internal_shadow_roots: bool

Whether or not the DOM inspector should show shadow roots of user-agent shadow trees

§js_asmjs_enabled: bool§js_asyncstack: bool§js_baseline_interpreter_enabled: bool§js_disable_jit: bool

Whether to disable the jit within SpiderMonkey

§js_baseline_jit_enabled: bool§js_baseline_jit_unsafe_eager_compilation_enabled: bool§js_discard_system_source: bool§js_dump_stack_on_debuggee_would_run: bool§js_ion_enabled: bool§js_ion_offthread_compilation_enabled: bool§js_ion_unsafe_eager_compilation_enabled: bool§js_mem_gc_allocation_threshold_mb: i64§js_mem_gc_allocation_threshold_factor: i64§js_mem_gc_allocation_threshold_avoid_interrupt_factor: i64§js_mem_gc_compacting_enabled: bool§js_mem_gc_decommit_threshold_mb: i64§js_mem_gc_dynamic_heap_growth_enabled: bool§js_mem_gc_dynamic_mark_slice_enabled: bool§js_mem_gc_empty_chunk_count_max: i64§js_mem_gc_empty_chunk_count_min: i64§js_mem_gc_high_frequency_heap_growth_max: i64§js_mem_gc_high_frequency_heap_growth_min: i64§js_mem_gc_high_frequency_high_limit_mb: i64§js_mem_gc_high_frequency_low_limit_mb: i64§js_mem_gc_high_frequency_time_limit_ms: i64§js_mem_gc_incremental_enabled: bool§js_mem_gc_incremental_slice_ms: i64§js_mem_gc_low_frequency_heap_growth: i64§js_mem_gc_per_zone_enabled: bool§js_mem_gc_zeal_frequency: i64§js_mem_gc_zeal_level: i64§js_mem_max: i64§js_native_regex_enabled: bool§js_offthread_compilation_enabled: bool§js_parallel_parsing_enabled: bool§js_shared_memory: bool§js_throw_on_asmjs_validation_failure: bool§js_throw_on_debuggee_would_run: bool§js_timers_minimum_duration: i64§js_wasm_baseline_enabled: bool§js_wasm_enabled: bool§js_wasm_ion_enabled: bool§js_werror_enabled: bool§layout_animations_test_enabled: bool§layout_columns_enabled: bool§layout_grid_enabled: bool§layout_container_queries_enabled: bool§layout_css_transition_behavior_enabled: bool§layout_flexbox_enabled: bool§layout_threads: i64§layout_unimplemented: bool§layout_writing_mode_enabled: bool§media_glvideo_enabled: bool

Enable hardware acceleration for video playback.

§media_testing_enabled: bool

Enable a non-standard event handler for verifying behavior of media elements during tests.

§network_enforce_tls_enabled: bool§network_enforce_tls_localhost: bool§network_enforce_tls_onion: bool§network_http_cache_disabled: bool§network_local_directory_listing_enabled: bool§network_mime_sniff: bool§session_history_max_length: i64§shell_background_color_rgba: [f64; 4]

The background color of shell’s viewport. This will be used by OpenGL’s glClearColor.

§webgl_testing_context_creation_error: bool§threadpools_fallback_worker_num: i64

Number of workers per threadpool, if we fail to detect how much parallelism is available at runtime.

§threadpools_image_cache_workers_max: i64

Maximum number of workers for the Image Cache thread pool

§threadpools_async_runtime_workers_max: i64

Maximum number of workers for the Networking async runtime thread pool

§threadpools_resource_workers_max: i64

Maximum number of workers for the Core Resource Manager

§threadpools_webrender_workers_max: i64

Maximum number of workers for webrender

§user_agent: String

The user-agent to use for Servo. This can also be set via UserAgentPlatform in order to set the value to the default value for the given platform.

Implementations§

Source§

impl Preferences

Source

pub fn get_value(&self, name: &str) -> PrefValue

Source

pub fn set_value(&mut self, name: &str, value: PrefValue)

Source§

impl Preferences

Source

const fn const_default() -> Self

Trait Implementations§

Source§

impl Clone for Preferences

Source§

fn clone(&self) -> Preferences

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Preferences

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Preferences

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Preferences

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> MaybeBoxed<Box<T>> for T

Source§

fn maybe_boxed(self) -> Box<T>

Convert
Source§

impl<T> MaybeBoxed<T> for T

Source§

fn maybe_boxed(self) -> T

Convert
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T