auto merge of #2338 : bjz/servo/remove-teardown, r=pcwalton

According to @pcwalton these used to be important for memory safety but are no longer needed now.
This commit is contained in:
bors-servo 2014-05-05 21:34:19 -04:00
commit dedaa6a98e
12 changed files with 0 additions and 75 deletions

View file

@ -159,10 +159,6 @@ impl FontGroup {
}
}
pub fn teardown(&mut self) {
self.fonts = vec!();
}
pub fn create_textrun(&self, text: ~str, decoration: text_decoration::T) -> TextRun {
assert!(self.fonts.len() > 0);
@ -297,11 +293,6 @@ impl<'a> Font {
return result;
}
pub fn teardown(&mut self) {
self.shaper = None;
self.azure_font = None;
}
// TODO: this should return a borrowed pointer, but I can't figure
// out why borrowck doesn't like my implementation.

View file

@ -110,9 +110,6 @@ impl<'a> TextRun {
return run;
}
pub fn teardown(&self) {
}
pub fn break_and_shape(font: &mut Font, text: &str) -> Vec<Arc<GlyphStore>> {
// TODO(Issue #230): do a better job. See Gecko's LineBreaker.

View file

@ -708,11 +708,6 @@ impl BlockFlow {
}
}
pub fn teardown(&mut self) {
self.box_.teardown();
self.float = None;
}
/// Return shrink-to-fit width.
///
/// This is where we use the preferred widths and minimum widths

View file

@ -1391,14 +1391,6 @@ impl Box {
}
}
/// Cleans up all the memory associated with this box.
pub fn teardown(&self) {
match self.specific {
ScannedTextBox(ref text_box_info) => text_box_info.run.teardown(),
_ => {}
}
}
/// Returns true if the contents should be clipped (i.e. if `overflow` is `hidden`).
pub fn needs_clip(&self) -> bool {
self.style().Box.get().overflow == overflow::hidden

View file

@ -593,13 +593,6 @@ impl InlineFlow {
}
}
pub fn teardown(&mut self) {
for (fragment, _) in self.boxes.iter() {
fragment.teardown();
}
self.boxes = InlineBoxes::new();
}
pub fn build_display_list_inline(&mut self, layout_context: &LayoutContext) {
let abs_rect = Rect(self.base.abs_position, self.base.position.size);
if !abs_rect.intersects(&layout_context.dirty) {

View file

@ -96,13 +96,6 @@ impl TableFlow {
}
}
pub fn teardown(&mut self) {
self.block_flow.teardown();
self.col_widths = vec!();
self.col_min_widths = vec!();
self.col_pref_widths = vec!();
}
/// Update the corresponding value of self_widths if a value of kid_widths has larger value
/// than one of self_widths.
pub fn update_col_widths(self_widths: &mut Vec<Au>, kid_widths: &Vec<Au>) -> Au {

View file

@ -24,10 +24,6 @@ impl TableCaptionFlow {
}
}
pub fn teardown(&mut self) {
self.block_flow.teardown();
}
pub fn build_display_list_table_caption(&mut self, layout_context: &LayoutContext) {
debug!("build_display_list_table_caption: same process as block flow");
self.block_flow.build_display_list_block(layout_context)

View file

@ -27,10 +27,6 @@ impl TableCellFlow {
}
}
pub fn teardown(&mut self) {
self.block_flow.teardown()
}
pub fn box_<'a>(&'a mut self) -> &'a Box {
&self.block_flow.box_
}

View file

@ -37,15 +37,6 @@ impl TableColGroupFlow {
widths: vec!(),
}
}
pub fn teardown(&mut self) {
for box_ in self.box_.iter() {
box_.teardown();
}
self.box_ = None;
self.cols = vec!();
self.widths = vec!();
}
}
impl Flow for TableColGroupFlow {

View file

@ -55,13 +55,6 @@ impl TableRowFlow {
}
}
pub fn teardown(&mut self) {
self.block_flow.teardown();
self.col_widths = vec!();
self.col_min_widths = vec!();
self.col_pref_widths = vec!();
}
pub fn box_<'a>(&'a mut self) -> &'a Box {
&self.block_flow.box_
}

View file

@ -54,13 +54,6 @@ impl TableRowGroupFlow {
}
}
pub fn teardown(&mut self) {
self.block_flow.teardown();
self.col_widths = vec!();
self.col_min_widths = vec!();
self.col_pref_widths = vec!();
}
pub fn box_<'a>(&'a mut self) -> &'a Box {
&self.block_flow.box_
}

View file

@ -91,11 +91,6 @@ impl TableWrapperFlow {
self.block_flow.float.is_some()
}
pub fn teardown(&mut self) {
self.block_flow.teardown();
self.col_widths = vec!();
}
/// Assign height for table-wrapper flow.
/// `Assign height` of table-wrapper flow follows a similar process to that of block flow.
///