Checkpoint

This commit is contained in:
Antonio Scandurra 2023-10-17 11:21:02 +02:00
parent bb348c1353
commit c126ff10a7
6 changed files with 6 additions and 6 deletions

View file

@ -61,7 +61,7 @@ where
let child_layout_ids = style.apply_text_style(cx, |cx| { let child_layout_ids = style.apply_text_style(cx, |cx| {
self.with_element_id(cx, |this, cx| this.layout_children(view, cx)) self.with_element_id(cx, |this, cx| this.layout_children(view, cx))
}); });
let layout_id = cx.request_layout(style.into(), child_layout_ids.clone()); let layout_id = cx.request_layout(&style, child_layout_ids.clone());
(layout_id, ()) (layout_id, ())
} }

View file

@ -62,7 +62,7 @@ impl<S: Send + Sync + 'static> Element for Img<S> {
Self: Sized, Self: Sized,
{ {
let style = self.computed_style(); let style = self.computed_style();
let layout_id = cx.request_layout(style, []); let layout_id = cx.request_layout(&style, []);
(layout_id, ()) (layout_id, ())
} }

View file

@ -134,7 +134,7 @@ impl<V: 'static + Send + Sync, K: ElementKind> Element for LayoutNodeElement<V,
.map(|child| child.layout(state, cx)) .map(|child| child.layout(state, cx))
.collect::<Vec<_>>(); .collect::<Vec<_>>();
let style = this.computed_style().clone(); let style = this.computed_style();
let layout_id = cx.request_layout(style, layout_ids); let layout_id = cx.request_layout(style, layout_ids);
(layout_id, ()) (layout_id, ())
}) })

View file

@ -53,7 +53,7 @@ impl<S: 'static + Send + Sync> Element for Svg<S> {
Self: Sized, Self: Sized,
{ {
let style = self.computed_style(); let style = self.computed_style();
(cx.request_layout(style, []), ()) (cx.request_layout(&style, []), ())
} }
fn paint( fn paint(

View file

@ -28,7 +28,7 @@ impl TaffyLayoutEngine {
pub fn request_layout( pub fn request_layout(
&mut self, &mut self,
style: Style, style: &Style,
rem_size: Pixels, rem_size: Pixels,
children: &[LayoutId], children: &[LayoutId],
) -> LayoutId { ) -> LayoutId {

View file

@ -248,7 +248,7 @@ impl<'a, 'w> WindowContext<'a, 'w> {
pub fn request_layout( pub fn request_layout(
&mut self, &mut self,
style: Style, style: &Style,
children: impl IntoIterator<Item = LayoutId>, children: impl IntoIterator<Item = LayoutId>,
) -> LayoutId { ) -> LayoutId {
self.app.layout_id_buffer.clear(); self.app.layout_id_buffer.clear();