mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Add doc comments explaining some return types
This commit is contained in:
parent
9efaf831fc
commit
60f21b12b2
1 changed files with 9 additions and 1 deletions
|
@ -1086,7 +1086,11 @@ impl Box {
|
|||
}
|
||||
}
|
||||
|
||||
/// Split box which includes new-line character
|
||||
/// Split box which includes new-line character.
|
||||
///
|
||||
/// A return value of `None` indicates that the box could not be split.
|
||||
/// Otherwise the split boxes are returned. The right boxe is optional due
|
||||
/// to the possibility of it being whitespace.
|
||||
pub fn split_by_new_line(&self) -> Option<(Box, Option<Box>)> {
|
||||
match self.specific {
|
||||
GenericBox | IframeBox(_) | ImageBox(_) | TableBox | TableCellBox |
|
||||
|
@ -1127,6 +1131,10 @@ impl Box {
|
|||
}
|
||||
|
||||
/// Attempts to split this box so that its width is no more than `max_width`.
|
||||
///
|
||||
/// A return value of `None` indicates that the box could not be split.
|
||||
/// Otherwise the split boxes are returned. The left and right boxes are
|
||||
/// optional due to the possibility of them being whitespace.
|
||||
pub fn split_to_width(&self, max_width: Au, starts_line: bool) -> Option<(Option<Box>, Option<Box>)> {
|
||||
match self.specific {
|
||||
GenericBox | IframeBox(_) | ImageBox(_) | TableBox | TableCellBox |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue