Merge branch 'master' of github.com:DioxusLabs/dioxus

This commit is contained in:
Jonathan Kelley committed 2023-01-04 12:59:41 -05:00
commit e7f6bc85f0
20 files changed
+16 -12

No files matched your search

+2 -2
View File
@@ -59,9 +59,9 @@ impl Scheduler {
/// Drop the future with the given TaskId /// Drop the future with the given TaskId
/// ///
/// This does nto abort the task, so you'll want to wrap it in an aborthandle if that's important to you /// This does not abort the task, so you'll want to wrap it in an aborthandle if that's important to you
pub fn remove(&self, id: TaskId) { pub fn remove(&self, id: TaskId) {
self.tasks.borrow_mut().remove(id.0); self.tasks.borrow_mut().try_remove(id.0);
} }
} }
+1 -1
View File
@@ -34,7 +34,7 @@ impl VirtualDom {
self.scopes[task.scope.0].spawned_tasks.remove(&id); self.scopes[task.scope.0].spawned_tasks.remove(&id);
// Remove it from the scheduler // Remove it from the scheduler
tasks.remove(id.0); tasks.try_remove(id.0);
} }
} }
+1 -1
View File
@@ -25,7 +25,7 @@ crossbeam-deque = "0.8.2"
dashmap = "5.4.0" dashmap = "5.4.0"
# for parsing attributes # for parsing attributes
lightningcss = "1.0.0-alpha.38" lightningcss = "1.0.0-alpha.39"
[dev-dependencies] [dev-dependencies]
rand = "0.8.5" rand = "0.8.5"
+12 -4
View File
@@ -160,7 +160,9 @@ pub fn apply_layout_attributes(name: &str, value: &str, style: &mut Style) {
align::ContentDistribution::SpaceEvenly => SpaceEvenly, align::ContentDistribution::SpaceEvenly => SpaceEvenly,
align::ContentDistribution::Stretch => Stretch, align::ContentDistribution::Stretch => Stretch,
}, },
align::AlignContent::ContentPosition(_, position) => match position { align::AlignContent::ContentPosition {
value: position, ..
} => match position {
align::ContentPosition::Center => Center, align::ContentPosition::Center => Center,
align::ContentPosition::Start | align::ContentPosition::FlexStart => { align::ContentPosition::Start | align::ContentPosition::FlexStart => {
FlexStart FlexStart
@@ -181,7 +183,9 @@ pub fn apply_layout_attributes(name: &str, value: &str, style: &mut Style) {
_ => return, _ => return,
} }
} }
align::JustifyContent::ContentPosition(_, position) => match position { align::JustifyContent::ContentPosition {
value: position, ..
} => match position {
align::ContentPosition::Center => Center, align::ContentPosition::Center => Center,
// start ignores -reverse flex-direction but there is no way to specify that in Taffy // start ignores -reverse flex-direction but there is no way to specify that in Taffy
align::ContentPosition::Start | align::ContentPosition::FlexStart => { align::ContentPosition::Start | align::ContentPosition::FlexStart => {
@@ -199,7 +203,9 @@ pub fn apply_layout_attributes(name: &str, value: &str, style: &mut Style) {
align::AlignSelf::Auto => Auto, align::AlignSelf::Auto => Auto,
align::AlignSelf::Stretch => Stretch, align::AlignSelf::Stretch => Stretch,
align::AlignSelf::BaselinePosition(_) => Baseline, align::AlignSelf::BaselinePosition(_) => Baseline,
align::AlignSelf::SelfPosition(_overflow, position) => match position { align::AlignSelf::SelfPosition {
value: position, ..
} => match position {
align::SelfPosition::Center => Center, align::SelfPosition::Center => Center,
align::SelfPosition::Start align::SelfPosition::Start
| align::SelfPosition::SelfStart | align::SelfPosition::SelfStart
@@ -216,7 +222,9 @@ pub fn apply_layout_attributes(name: &str, value: &str, style: &mut Style) {
style.align_items = match align { style.align_items = match align {
align::AlignItems::BaselinePosition(_) => Baseline, align::AlignItems::BaselinePosition(_) => Baseline,
align::AlignItems::Stretch => Stretch, align::AlignItems::Stretch => Stretch,
align::AlignItems::SelfPosition(_overflow, position) => match position { align::AlignItems::SelfPosition {
value: position, ..
} => match position {
align::SelfPosition::Center => Center, align::SelfPosition::Center => Center,
align::SelfPosition::FlexStart => FlexStart, align::SelfPosition::FlexStart => FlexStart,
align::SelfPosition::FlexEnd => FlexEnd, align::SelfPosition::FlexEnd => FlexEnd,
-4
View File
@@ -79,10 +79,6 @@ impl<S: State<V>, V: FromAnyValue> RealDom<S, V> {
if self.node_id_mapping.len() <= element_id.0 { if self.node_id_mapping.len() <= element_id.0 {
self.node_id_mapping.resize(element_id.0 + 1, None); self.node_id_mapping.resize(element_id.0 + 1, None);
} }
if let Some(Some(old_id)) = self.node_id_mapping.get(element_id.0) {
// free the memory associated with the old node
self.tree.remove(*old_id);
}
self.node_id_mapping[element_id.0] = Some(node_id); self.node_id_mapping[element_id.0] = Some(node_id);
} }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.