mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Remove now-unused empty Variables struct.
This commit is contained in:
parent
b1d9746041
commit
45df66f9ff
4 changed files with 2 additions and 40 deletions
|
@ -2866,9 +2866,6 @@ extern "C" {
|
|||
index: u32, name: *mut nsAString)
|
||||
-> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_GetEmptyVariables() -> *const nsStyleVariables;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_CreateCSSErrorReporter(sheet: *mut ServoStyleSheet,
|
||||
loader: *mut Loader, uri: *mut nsIURI)
|
||||
|
|
|
@ -19,13 +19,11 @@ use gecko_bindings::bindings::Gecko_Construct_Default_${style_struct.gecko_ffi_n
|
|||
use gecko_bindings::bindings::Gecko_CopyConstruct_${style_struct.gecko_ffi_name};
|
||||
use gecko_bindings::bindings::Gecko_Destroy_${style_struct.gecko_ffi_name};
|
||||
% endfor
|
||||
use gecko_bindings::bindings::Gecko_Construct_nsStyleVariables;
|
||||
use gecko_bindings::bindings::Gecko_CopyCounterStyle;
|
||||
use gecko_bindings::bindings::Gecko_CopyCursorArrayFrom;
|
||||
use gecko_bindings::bindings::Gecko_CopyFontFamilyFrom;
|
||||
use gecko_bindings::bindings::Gecko_CopyImageValueFrom;
|
||||
use gecko_bindings::bindings::Gecko_CopyListStyleImageFrom;
|
||||
use gecko_bindings::bindings::Gecko_Destroy_nsStyleVariables;
|
||||
use gecko_bindings::bindings::Gecko_EnsureImageLayersLength;
|
||||
use gecko_bindings::bindings::Gecko_FontFamilyList_AppendGeneric;
|
||||
use gecko_bindings::bindings::Gecko_FontFamilyList_AppendNamed;
|
||||
|
@ -43,7 +41,6 @@ use gecko_bindings::bindings::{Gecko_ResetFilters, Gecko_CopyFiltersFrom};
|
|||
use gecko_bindings::bindings::RawGeckoPresContextBorrowed;
|
||||
use gecko_bindings::structs;
|
||||
use gecko_bindings::structs::nsCSSPropertyID;
|
||||
use gecko_bindings::structs::nsStyleVariables;
|
||||
use gecko_bindings::sugar::ns_style_coord::{CoordDataValue, CoordData, CoordDataMut};
|
||||
use gecko::values::convert_nscolor_to_rgba;
|
||||
use gecko::values::convert_rgba_to_nscolor;
|
||||
|
@ -5030,26 +5027,3 @@ ${impl_style_struct(style_struct)}
|
|||
<%self:raw_impl_trait style_struct="${style_struct}"></%self:raw_impl_trait>
|
||||
% endif
|
||||
% endfor
|
||||
|
||||
// This is only accessed from the Gecko main thread.
|
||||
static mut EMPTY_VARIABLES_STRUCT: Option<nsStyleVariables> = None;
|
||||
|
||||
#[no_mangle]
|
||||
#[allow(non_snake_case)]
|
||||
pub unsafe extern "C" fn Servo_GetEmptyVariables()
|
||||
-> *const nsStyleVariables {
|
||||
EMPTY_VARIABLES_STRUCT.as_ref().unwrap()
|
||||
}
|
||||
|
||||
pub fn initialize() {
|
||||
unsafe {
|
||||
EMPTY_VARIABLES_STRUCT = Some(zeroed());
|
||||
Gecko_Construct_nsStyleVariables(EMPTY_VARIABLES_STRUCT.as_mut().unwrap());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn shutdown() {
|
||||
unsafe {
|
||||
EMPTY_VARIABLES_STRUCT.take().as_mut().map(|v| Gecko_Destroy_nsStyleVariables(v));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue