style: Change StaticPrefs from a class to a namespace.

This doesn't change the way C++ code uses static prefs. But it does slightly
change how Rust code uses static prefs, specifically the name generated by
bindgen is slightly different.

The commit also improves some comments.

Differential Revision: https://phabricator.services.mozilla.com/D35764
This commit is contained in:
Nicholas Nethercote 2019-06-25 10:36:59 +10:00 committed by Emilio Cobos Álvarez
parent 84a5ab2ba8
commit 323221051f
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
14 changed files with 19 additions and 19 deletions

View file

@ -70,7 +70,7 @@ pub enum TimingKeyword {
#[cfg(feature = "gecko")]
fn step_position_jump_enabled(_context: &ParserContext) -> bool {
use crate::gecko_bindings::structs;
unsafe { structs::StaticPrefs_sVarCache_layout_css_step_position_jump_enabled }
unsafe { structs::StaticPrefs::sVarCache_layout_css_step_position_jump_enabled }
}
#[cfg(feature = "servo")]

View file

@ -75,7 +75,7 @@ fn line_height_moz_block_height_enabled(context: &ParserContext) -> bool {
use crate::gecko_bindings::structs;
context.in_ua_sheet() ||
unsafe {
structs::StaticPrefs_sVarCache_layout_css_line_height_moz_block_height_content_enabled
structs::StaticPrefs::sVarCache_layout_css_line_height_moz_block_height_content_enabled
}
}