mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update TODOs
This commit is contained in:
parent
a94805d64a
commit
28aed0d511
2 changed files with 12 additions and 4 deletions
|
@ -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<CharIndex>,
|
||||
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<SplitInfo>, Arc<owned::Box<TextRun>> /* TODO: remove */)> {
|
||||
-> Option<(SplitInfo, Option<SplitInfo>, Arc<owned::Box<TextRun>> /* 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<SplitInfo>, Option<SplitInfo>, Arc<owned::Box<TextRun>> /* TODO: remove */)> {
|
||||
-> Option<(Option<SplitInfo>, Option<SplitInfo>, Arc<owned::Box<TextRun>> /* TODO(bjz): remove */)> {
|
||||
match self.specific {
|
||||
GenericBox | IframeBox(_) | ImageBox(_) | TableBox | TableCellBox |
|
||||
TableRowBox | TableWrapperBox => None,
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue