mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Improve function naming
This commit is contained in:
parent
d6dba5158a
commit
32862b4aa9
2 changed files with 4 additions and 4 deletions
|
@ -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<SplitInfo>, 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<SplitInfo>, Option<SplitInfo>, Arc<~TextRun> /* TODO: remove */)> {
|
||||
match self.specific {
|
||||
GenericBox | IframeBox(_) | ImageBox(_) | TableBox | TableCellBox |
|
||||
|
|
|
@ -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| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue