diff --git a/src/components/main/layout/box_.rs b/src/components/main/layout/box_.rs index 25c6ab67ba8..a82699f0537 100644 --- a/src/components/main/layout/box_.rs +++ b/src/components/main/layout/box_.rs @@ -243,6 +243,8 @@ impl ScannedTextBoxInfo { #[deriving(Show)] pub struct SplitInfo { + // TODO(bjz): this should only need to be a single character index, but both values are + // currently needed for splitting in the `inline::try_append_*` functions. pub range: Range, pub width: Au, } @@ -1107,8 +1109,11 @@ 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. + // + // TODO(bjz): The text run should be removed in the future, but it is currently needed for + // the current method of box splitting in the `inline::try_append_*` functions. pub fn find_split_info_by_new_line(&self) - -> Option<(SplitInfo, Option, Arc> /* TODO: remove */)> { + -> Option<(SplitInfo, Option, Arc> /* TODO(bjz): remove */)> { match self.specific { GenericBox | IframeBox(_) | ImageBox(_) | TableBox | TableCellBox | TableRowBox | TableWrapperBox => None, @@ -1144,8 +1149,11 @@ 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. + // + // TODO(bjz): The text run should be removed in the future, but it is currently needed for + // the current method of box splitting in the `inline::try_append_*` functions. pub fn find_split_info_for_width(&self, start: CharIndex, max_width: Au, starts_line: bool) - -> Option<(Option, Option, Arc> /* TODO: remove */)> { + -> Option<(Option, Option, Arc> /* TODO(bjz): remove */)> { match self.specific { GenericBox | IframeBox(_) | ImageBox(_) | TableBox | TableCellBox | TableRowBox | TableWrapperBox => None, diff --git a/src/components/main/layout/inline.rs b/src/components/main/layout/inline.rs index cd250c0553a..8a2e6821c8c 100644 --- a/src/components/main/layout/inline.rs +++ b/src/components/main/layout/inline.rs @@ -427,7 +427,7 @@ impl LineboxScanner { debug!("LineboxScanner: Found a new-line character, so splitting theline."); match in_box.find_split_info_by_new_line() { Some((left, right, run)) => { - // TODO: Remove box splitting + // TODO(bjz): Remove box splitting let split_box = |split: SplitInfo| { let info = ScannedTextBoxInfo::new(run.clone(), split.range); let specific = ScannedTextBox(info); @@ -511,7 +511,7 @@ impl LineboxScanner { let available_width = green_zone.width - self.pending_line.bounds.size.width; match in_box.find_split_info_for_width(CharIndex(0), available_width, line_is_empty).map( |(left, right, run)| { - // TODO: Remove box splitting + // TODO(bjz): Remove box splitting let split_box = |split: SplitInfo| { let info = ScannedTextBoxInfo::new(run.clone(), split.range); let specific = ScannedTextBox(info);