From 32862b4aa98a0ede595d31a8dd0f2077fe23931b Mon Sep 17 00:00:00 2001 From: Brendan Zabarauskas Date: Fri, 23 May 2014 15:39:11 -0700 Subject: [PATCH] Improve function naming --- src/components/main/layout/box_.rs | 4 ++-- src/components/main/layout/inline.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/main/layout/box_.rs b/src/components/main/layout/box_.rs index d1ab9ea2481..6abcf9ff035 100644 --- a/src/components/main/layout/box_.rs +++ b/src/components/main/layout/box_.rs @@ -1098,7 +1098,7 @@ impl Box { /// A return value of `None` indicates that the box is not splittable. /// Otherwise the split information is returned. The right information is /// optional due to the possibility of it being whitespace. - pub fn find_split_positions_by_new_line(&self) + pub fn find_split_info_by_new_line(&self) -> Option<(SplitInfo, Option, Arc<~TextRun> /* TODO: remove */)> { match self.specific { GenericBox | IframeBox(_) | ImageBox(_) | TableBox | TableCellBox | @@ -1141,7 +1141,7 @@ impl Box { /// Otherwise the information pertaining to the split is returned. The left /// and right split information are both optional due to the possibility of /// them being whitespace. - pub fn find_split_positions(&self, start: CharIndex, max_width: Au, starts_line: bool) + pub fn find_split_info_for_width(&self, start: CharIndex, max_width: Au, starts_line: bool) -> Option<(Option, Option, Arc<~TextRun> /* TODO: remove */)> { match self.specific { GenericBox | IframeBox(_) | ImageBox(_) | TableBox | TableCellBox | diff --git a/src/components/main/layout/inline.rs b/src/components/main/layout/inline.rs index 527dcc3e651..cd250c0553a 100644 --- a/src/components/main/layout/inline.rs +++ b/src/components/main/layout/inline.rs @@ -425,7 +425,7 @@ impl LineboxScanner { true } else { debug!("LineboxScanner: Found a new-line character, so splitting theline."); - match in_box.split_by_new_line() { + match in_box.find_split_info_by_new_line() { Some((left, right, run)) => { // TODO: Remove box splitting let split_box = |split: SplitInfo| { @@ -509,7 +509,7 @@ impl LineboxScanner { } let available_width = green_zone.width - self.pending_line.bounds.size.width; - match in_box.find_split_positions(CharIndex(0), available_width, line_is_empty).map( + match in_box.find_split_info_for_width(CharIndex(0), available_width, line_is_empty).map( |(left, right, run)| { // TODO: Remove box splitting let split_box = |split: SplitInfo| {