mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +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.
|
/// A return value of `None` indicates that the box is not splittable.
|
||||||
/// Otherwise the split information is returned. The right information is
|
/// Otherwise the split information is returned. The right information is
|
||||||
/// optional due to the possibility of it being whitespace.
|
/// 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 */)> {
|
-> Option<(SplitInfo, Option<SplitInfo>, Arc<~TextRun> /* TODO: remove */)> {
|
||||||
match self.specific {
|
match self.specific {
|
||||||
GenericBox | IframeBox(_) | ImageBox(_) | TableBox | TableCellBox |
|
GenericBox | IframeBox(_) | ImageBox(_) | TableBox | TableCellBox |
|
||||||
|
@ -1141,7 +1141,7 @@ impl Box {
|
||||||
/// Otherwise the information pertaining to the split is returned. The left
|
/// Otherwise the information pertaining to the split is returned. The left
|
||||||
/// and right split information are both optional due to the possibility of
|
/// and right split information are both optional due to the possibility of
|
||||||
/// them being whitespace.
|
/// 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 */)> {
|
-> Option<(Option<SplitInfo>, Option<SplitInfo>, Arc<~TextRun> /* TODO: remove */)> {
|
||||||
match self.specific {
|
match self.specific {
|
||||||
GenericBox | IframeBox(_) | ImageBox(_) | TableBox | TableCellBox |
|
GenericBox | IframeBox(_) | ImageBox(_) | TableBox | TableCellBox |
|
||||||
|
|
|
@ -425,7 +425,7 @@ impl LineboxScanner {
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
debug!("LineboxScanner: Found a new-line character, so splitting theline.");
|
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)) => {
|
Some((left, right, run)) => {
|
||||||
// TODO: Remove box splitting
|
// TODO: Remove box splitting
|
||||||
let split_box = |split: SplitInfo| {
|
let split_box = |split: SplitInfo| {
|
||||||
|
@ -509,7 +509,7 @@ impl LineboxScanner {
|
||||||
}
|
}
|
||||||
|
|
||||||
let available_width = green_zone.width - self.pending_line.bounds.size.width;
|
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)| {
|
|(left, right, run)| {
|
||||||
// TODO: Remove box splitting
|
// TODO: Remove box splitting
|
||||||
let split_box = |split: SplitInfo| {
|
let split_box = |split: SplitInfo| {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue