mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #5480 - SimonSapin:multicol, r=pcwalton
This add some properties to the style system and a new flow type, but the larger issues of dealing with fragmentation in the flow tree is still an open question. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5480) <!-- Reviewable:end -->
This commit is contained in:
commit
1e150140bd
15 changed files with 388 additions and 125 deletions
|
@ -44,6 +44,7 @@ use table_colgroup::TableColGroupFlow;
|
|||
use table_row::TableRowFlow;
|
||||
use table_rowgroup::TableRowGroupFlow;
|
||||
use table_wrapper::TableWrapperFlow;
|
||||
use multicol::MulticolFlow;
|
||||
use wrapper::ThreadSafeLayoutNode;
|
||||
|
||||
use geom::{Point2D, Rect, Size2D};
|
||||
|
@ -158,6 +159,11 @@ pub trait Flow: fmt::Debug + Sync {
|
|||
panic!("called as_table_cell() on a non-tablecell flow")
|
||||
}
|
||||
|
||||
/// If this is a multicol flow, returns the underlying object. Fails otherwise.
|
||||
fn as_multicol<'a>(&'a mut self) -> &'a mut MulticolFlow {
|
||||
panic!("called as_multicol() on a non-multicol flow")
|
||||
}
|
||||
|
||||
/// If this is a table cell flow, returns the underlying object, borrowed immutably. Fails
|
||||
/// otherwise.
|
||||
fn as_immutable_table_cell<'a>(&'a self) -> &'a TableCellFlow {
|
||||
|
@ -451,6 +457,7 @@ pub enum FlowClass {
|
|||
TableRow,
|
||||
TableCaption,
|
||||
TableCell,
|
||||
Multicol,
|
||||
}
|
||||
|
||||
/// A top-down traversal.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue