mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Bug 1298588 part 15, servo piece. Rip out the initial() methods on style structs in stylo. r=bholley
This commit is contained in:
parent
8e2acee24e
commit
dd80b5c0e7
2 changed files with 3 additions and 82 deletions
|
@ -732,9 +732,6 @@ extern "C" {
|
|||
pub fn Gecko_ReleaseCSSValueSharedListArbitraryThread(aPtr:
|
||||
*mut nsCSSValueSharedList);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleFont(ptr: *mut nsStyleFont);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleFont(ptr: *mut nsStyleFont,
|
||||
pres_context:
|
||||
|
@ -747,9 +744,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleFont(ptr: *mut nsStyleFont);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleColor(ptr: *mut nsStyleColor);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleColor(ptr: *mut nsStyleColor,
|
||||
pres_context:
|
||||
|
@ -762,9 +756,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleColor(ptr: *mut nsStyleColor);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleList(ptr: *mut nsStyleList);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleList(ptr: *mut nsStyleList,
|
||||
pres_context:
|
||||
|
@ -777,9 +768,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleList(ptr: *mut nsStyleList);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleText(ptr: *mut nsStyleText);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleText(ptr: *mut nsStyleText,
|
||||
pres_context:
|
||||
|
@ -792,9 +780,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleText(ptr: *mut nsStyleText);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleVisibility(ptr: *mut nsStyleVisibility);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleVisibility(ptr:
|
||||
*mut nsStyleVisibility,
|
||||
|
@ -809,10 +794,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleVisibility(ptr: *mut nsStyleVisibility);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleUserInterface(ptr:
|
||||
*mut nsStyleUserInterface);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleUserInterface(ptr:
|
||||
*mut nsStyleUserInterface,
|
||||
|
@ -828,9 +809,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleUserInterface(ptr: *mut nsStyleUserInterface);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleTableBorder(ptr: *mut nsStyleTableBorder);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleTableBorder(ptr:
|
||||
*mut nsStyleTableBorder,
|
||||
|
@ -846,9 +824,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleTableBorder(ptr: *mut nsStyleTableBorder);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleSVG(ptr: *mut nsStyleSVG);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleSVG(ptr: *mut nsStyleSVG,
|
||||
pres_context:
|
||||
|
@ -861,9 +836,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleSVG(ptr: *mut nsStyleSVG);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleVariables(ptr: *mut nsStyleVariables);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleVariables(ptr:
|
||||
*mut nsStyleVariables,
|
||||
|
@ -878,9 +850,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleVariables(ptr: *mut nsStyleVariables);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleBackground(ptr: *mut nsStyleBackground);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleBackground(ptr:
|
||||
*mut nsStyleBackground,
|
||||
|
@ -895,9 +864,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleBackground(ptr: *mut nsStyleBackground);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStylePosition(ptr: *mut nsStylePosition);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStylePosition(ptr: *mut nsStylePosition,
|
||||
pres_context:
|
||||
|
@ -910,9 +876,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStylePosition(ptr: *mut nsStylePosition);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleTextReset(ptr: *mut nsStyleTextReset);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleTextReset(ptr:
|
||||
*mut nsStyleTextReset,
|
||||
|
@ -927,9 +890,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleTextReset(ptr: *mut nsStyleTextReset);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleDisplay(ptr: *mut nsStyleDisplay);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleDisplay(ptr: *mut nsStyleDisplay,
|
||||
pres_context:
|
||||
|
@ -942,9 +902,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleDisplay(ptr: *mut nsStyleDisplay);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleContent(ptr: *mut nsStyleContent);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleContent(ptr: *mut nsStyleContent,
|
||||
pres_context:
|
||||
|
@ -957,9 +914,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleContent(ptr: *mut nsStyleContent);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleUIReset(ptr: *mut nsStyleUIReset);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleUIReset(ptr: *mut nsStyleUIReset,
|
||||
pres_context:
|
||||
|
@ -972,9 +926,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleUIReset(ptr: *mut nsStyleUIReset);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleTable(ptr: *mut nsStyleTable);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleTable(ptr: *mut nsStyleTable,
|
||||
pres_context:
|
||||
|
@ -987,9 +938,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleTable(ptr: *mut nsStyleTable);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleMargin(ptr: *mut nsStyleMargin);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleMargin(ptr: *mut nsStyleMargin,
|
||||
pres_context:
|
||||
|
@ -1002,9 +950,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleMargin(ptr: *mut nsStyleMargin);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStylePadding(ptr: *mut nsStylePadding);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStylePadding(ptr: *mut nsStylePadding,
|
||||
pres_context:
|
||||
|
@ -1017,9 +962,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStylePadding(ptr: *mut nsStylePadding);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleBorder(ptr: *mut nsStyleBorder);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleBorder(ptr: *mut nsStyleBorder,
|
||||
pres_context:
|
||||
|
@ -1032,9 +974,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleBorder(ptr: *mut nsStyleBorder);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleOutline(ptr: *mut nsStyleOutline);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleOutline(ptr: *mut nsStyleOutline,
|
||||
pres_context:
|
||||
|
@ -1047,9 +986,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleOutline(ptr: *mut nsStyleOutline);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleXUL(ptr: *mut nsStyleXUL);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleXUL(ptr: *mut nsStyleXUL,
|
||||
pres_context:
|
||||
|
@ -1062,9 +998,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleXUL(ptr: *mut nsStyleXUL);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleSVGReset(ptr: *mut nsStyleSVGReset);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleSVGReset(ptr: *mut nsStyleSVGReset,
|
||||
pres_context:
|
||||
|
@ -1077,9 +1010,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleSVGReset(ptr: *mut nsStyleSVGReset);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleColumn(ptr: *mut nsStyleColumn);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleColumn(ptr: *mut nsStyleColumn,
|
||||
pres_context:
|
||||
|
@ -1092,9 +1022,6 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleColumn(ptr: *mut nsStyleColumn);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleEffects(ptr: *mut nsStyleEffects);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleEffects(ptr: *mut nsStyleEffects,
|
||||
pres_context:
|
||||
|
@ -1107,6 +1034,9 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_Destroy_nsStyleEffects(ptr: *mut nsStyleEffects);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_nsStyleVariables(ptr: *mut nsStyleVariables);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_Element_ClearData(node: RawGeckoElementBorrowed);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ use custom_properties::ComputedValuesMap;
|
|||
use gecko_bindings::bindings;
|
||||
% for style_struct in data.style_structs:
|
||||
use gecko_bindings::structs::${style_struct.gecko_ffi_name};
|
||||
use gecko_bindings::bindings::Gecko_Construct_${style_struct.gecko_ffi_name};
|
||||
use gecko_bindings::bindings::Gecko_Construct_Default_${style_struct.gecko_ffi_name};
|
||||
use gecko_bindings::bindings::Gecko_CopyConstruct_${style_struct.gecko_ffi_name};
|
||||
use gecko_bindings::bindings::Gecko_Destroy_${style_struct.gecko_ffi_name};
|
||||
|
@ -394,14 +393,6 @@ def set_gecko_property(ffi_name, expr):
|
|||
|
||||
<%def name="impl_style_struct(style_struct)">
|
||||
impl ${style_struct.gecko_struct_name} {
|
||||
#[allow(dead_code, unused_variables)]
|
||||
pub fn initial() -> Arc<Self> {
|
||||
let mut result = Arc::new(${style_struct.gecko_struct_name} { gecko: unsafe { zeroed() } });
|
||||
unsafe {
|
||||
Gecko_Construct_${style_struct.gecko_ffi_name}(&mut Arc::get_mut(&mut result).unwrap().gecko);
|
||||
}
|
||||
result
|
||||
}
|
||||
#[allow(dead_code, unused_variables)]
|
||||
pub fn default(pres_context: RawGeckoPresContextBorrowed) -> Arc<Self> {
|
||||
let mut result = Arc::new(${style_struct.gecko_struct_name} { gecko: unsafe { zeroed() } });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue