Skip to content

Commit

Permalink
Bug 1298588 part 15, servo piece. Rip out the initial() methods on st…
Browse files Browse the repository at this point in the history
…yle structs in stylo. r=bholley
  • Loading branch information
bzbarsky committed Jan 5, 2017
1 parent 8e2acee commit dd80b5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 82 deletions.
76 changes: 3 additions & 73 deletions components/style/gecko_bindings/bindings.rs
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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:
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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:
Expand All @@ -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,
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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);
}
Expand Down
9 changes: 0 additions & 9 deletions components/style/properties/gecko.mako.rs
Expand Up @@ -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};
Expand Down Expand Up @@ -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() } });
Expand Down

0 comments on commit dd80b5c

Please sign in to comment.