diff options
author | bors-servo <release+servo@mozilla.com> | 2014-05-05 21:34:19 -0400 |
---|---|---|
committer | bors-servo <release+servo@mozilla.com> | 2014-05-05 21:34:19 -0400 |
commit | dedaa6a98e6455f13af8afee70be40654dcd008e (patch) | |
tree | 08dd61dbb9a826e76ba1ba968bd577137ada0570 /src | |
parent | b6c785692645b22c8b6119cb28109e85e703e430 (diff) | |
parent | 0ed6f92b99a6cd20e1ef73809db0c25f43cb3e60 (diff) | |
download | servo-dedaa6a98e6455f13af8afee70be40654dcd008e.tar.gz servo-dedaa6a98e6455f13af8afee70be40654dcd008e.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/components/gfx/font.rs | 9 | ||||
-rw-r--r-- | src/components/gfx/text/text_run.rs | 3 | ||||
-rw-r--r-- | src/components/main/layout/block.rs | 5 | ||||
-rw-r--r-- | src/components/main/layout/box_.rs | 8 | ||||
-rw-r--r-- | src/components/main/layout/inline.rs | 7 | ||||
-rw-r--r-- | src/components/main/layout/table.rs | 7 | ||||
-rw-r--r-- | src/components/main/layout/table_caption.rs | 4 | ||||
-rw-r--r-- | src/components/main/layout/table_cell.rs | 4 | ||||
-rw-r--r-- | src/components/main/layout/table_colgroup.rs | 9 | ||||
-rw-r--r-- | src/components/main/layout/table_row.rs | 7 | ||||
-rw-r--r-- | src/components/main/layout/table_rowgroup.rs | 7 | ||||
-rw-r--r-- | src/components/main/layout/table_wrapper.rs | 5 |
12 files changed, 0 insertions, 75 deletions
diff --git a/src/components/gfx/font.rs b/src/components/gfx/font.rs index a77ca3a2a29..c4ec741e32b 100644 --- a/src/components/gfx/font.rs +++ b/src/components/gfx/font.rs @@ -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. diff --git a/src/components/gfx/text/text_run.rs b/src/components/gfx/text/text_run.rs index e65ef22c264..2b6c2a37368 100644 --- a/src/components/gfx/text/text_run.rs +++ b/src/components/gfx/text/text_run.rs @@ -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. diff --git a/src/components/main/layout/block.rs b/src/components/main/layout/block.rs index 0b8a097a949..1c56467e1c1 100644 --- a/src/components/main/layout/block.rs +++ b/src/components/main/layout/block.rs @@ -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 diff --git a/src/components/main/layout/box_.rs b/src/components/main/layout/box_.rs index f3544fc4e62..b738006b822 100644 --- a/src/components/main/layout/box_.rs +++ b/src/components/main/layout/box_.rs @@ -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 diff --git a/src/components/main/layout/inline.rs b/src/components/main/layout/inline.rs index 293a2bdb8fa..ec79256f1e5 100644 --- a/src/components/main/layout/inline.rs +++ b/src/components/main/layout/inline.rs @@ -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) { diff --git a/src/components/main/layout/table.rs b/src/components/main/layout/table.rs index ce608ad569a..feed2585d4a 100644 --- a/src/components/main/layout/table.rs +++ b/src/components/main/layout/table.rs @@ -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 { diff --git a/src/components/main/layout/table_caption.rs b/src/components/main/layout/table_caption.rs index 088b17cb9cd..8e0cbb86176 100644 --- a/src/components/main/layout/table_caption.rs +++ b/src/components/main/layout/table_caption.rs @@ -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) diff --git a/src/components/main/layout/table_cell.rs b/src/components/main/layout/table_cell.rs index b5073654f6a..389ed6143f7 100644 --- a/src/components/main/layout/table_cell.rs +++ b/src/components/main/layout/table_cell.rs @@ -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_ } diff --git a/src/components/main/layout/table_colgroup.rs b/src/components/main/layout/table_colgroup.rs index 2edcab3cd0c..5ac1ab81376 100644 --- a/src/components/main/layout/table_colgroup.rs +++ b/src/components/main/layout/table_colgroup.rs @@ -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 { diff --git a/src/components/main/layout/table_row.rs b/src/components/main/layout/table_row.rs index 4560526ef35..c49a78a8579 100644 --- a/src/components/main/layout/table_row.rs +++ b/src/components/main/layout/table_row.rs @@ -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_ } diff --git a/src/components/main/layout/table_rowgroup.rs b/src/components/main/layout/table_rowgroup.rs index ca3bf8ca4b5..eb779fd96ca 100644 --- a/src/components/main/layout/table_rowgroup.rs +++ b/src/components/main/layout/table_rowgroup.rs @@ -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_ } diff --git a/src/components/main/layout/table_wrapper.rs b/src/components/main/layout/table_wrapper.rs index bdcc501703d..ad1a66eace0 100644 --- a/src/components/main/layout/table_wrapper.rs +++ b/src/components/main/layout/table_wrapper.rs @@ -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. /// |