summaryrefslogtreecommitdiff
path: root/src/library/layout/flow.rs
diff options
context:
space:
mode:
authorMartin Haug <mhaug@live.de>2022-06-04 12:57:45 +0200
committerMartin Haug <mhaug@live.de>2022-06-04 12:57:45 +0200
commit4640585fbdf72df993dbed46799844aa78996cce (patch)
tree38a09389885a61068970441d6d27178a2ae4f115 /src/library/layout/flow.rs
parenta937462491a63f5cff3551b5bb8bc45fb350f0b6 (diff)
First iteration of outline items
Diffstat (limited to 'src/library/layout/flow.rs')
-rw-r--r--src/library/layout/flow.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/library/layout/flow.rs b/src/library/layout/flow.rs
index 6193a68f..0ba84b09 100644
--- a/src/library/layout/flow.rs
+++ b/src/library/layout/flow.rs
@@ -182,7 +182,12 @@ impl FlowLayouter {
let frames = node.layout(ctx, &self.regions, styles)?;
let len = frames.len();
- for (i, frame) in frames.into_iter().enumerate() {
+ for (i, mut frame) in frames.into_iter().enumerate() {
+ // Set the generic block role.
+ if frame.role().is_none() {
+ Arc::make_mut(&mut frame).apply_role(Role::GenericBlock);
+ }
+
// Grow our size, shrink the region and save the frame for later.
let size = frame.size;
self.used.y += size.y;