mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Make all of LineBreaker private
This commit is contained in:
parent
51850c7ab6
commit
5d0d11c380
1 changed files with 9 additions and 9 deletions
|
@ -169,16 +169,16 @@ enum WrapMode {
|
||||||
}
|
}
|
||||||
|
|
||||||
struct LineBreaker {
|
struct LineBreaker {
|
||||||
pub floats: Floats,
|
floats: Floats,
|
||||||
pub new_fragments: Vec<Fragment>,
|
new_fragments: Vec<Fragment>,
|
||||||
pub work_list: RingBuf<Fragment>,
|
work_list: RingBuf<Fragment>,
|
||||||
pub pending_line: Line,
|
pending_line: Line,
|
||||||
pub lines: Vec<Line>,
|
lines: Vec<Line>,
|
||||||
pub cur_b: Au, // Current position on the block direction
|
cur_b: Au, // Current position on the block direction
|
||||||
}
|
}
|
||||||
|
|
||||||
impl LineBreaker {
|
impl LineBreaker {
|
||||||
pub fn new(float_context: Floats) -> LineBreaker {
|
fn new(float_context: Floats) -> LineBreaker {
|
||||||
LineBreaker {
|
LineBreaker {
|
||||||
new_fragments: Vec::new(),
|
new_fragments: Vec::new(),
|
||||||
work_list: RingBuf::new(),
|
work_list: RingBuf::new(),
|
||||||
|
@ -193,7 +193,7 @@ impl LineBreaker {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn floats(&mut self) -> Floats {
|
fn floats(&mut self) -> Floats {
|
||||||
self.floats.clone()
|
self.floats.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ impl LineBreaker {
|
||||||
self.pending_line.green_zone = LogicalSize::zero(self.floats.writing_mode)
|
self.pending_line.green_zone = LogicalSize::zero(self.floats.writing_mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn scan_for_lines(&mut self, flow: &mut InlineFlow, layout_context: &LayoutContext) {
|
fn scan_for_lines(&mut self, flow: &mut InlineFlow, layout_context: &LayoutContext) {
|
||||||
self.reset_scanner();
|
self.reset_scanner();
|
||||||
|
|
||||||
let mut old_fragments = mem::replace(&mut flow.fragments, InlineFragments::new());
|
let mut old_fragments = mem::replace(&mut flow.fragments, InlineFragments::new());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue