From 952611dcdfec79fe472f775914bcdd1ac7c293aa Mon Sep 17 00:00:00 2001 From: "Frank A. Krueger" Date: Fri, 16 Jun 2017 16:44:37 -0700 Subject: [PATCH] Remove ParentNode to allow shared children --- Ooui/FormControl.cs | 10 ---------- Ooui/Node.cs | 4 ---- 2 files changed, 14 deletions(-) diff --git a/Ooui/FormControl.cs b/Ooui/FormControl.cs index 7555d9f..e98607e 100644 --- a/Ooui/FormControl.cs +++ b/Ooui/FormControl.cs @@ -16,16 +16,6 @@ namespace Ooui set => SetProperty (ref isDisabled, value, "disabled"); } - public Form Form { - get { - var p = ParentNode; - while (p != null && !(p is Form)) { - p = p.ParentNode; - } - return p as Form; - } - } - public FormControl (string tagName) : base (tagName) { diff --git a/Ooui/Node.cs b/Ooui/Node.cs index 3f1f703..daa5e0f 100644 --- a/Ooui/Node.cs +++ b/Ooui/Node.cs @@ -40,8 +40,6 @@ namespace Ooui return InsertBefore (newChild, null); } - public Node ParentNode { get; private set; } - public Node InsertBefore (Node newChild, Node referenceChild) { if (referenceChild == null) { @@ -54,7 +52,6 @@ namespace Ooui } children.Insert (index, newChild); } - newChild.ParentNode = this; SendCall ("insertBefore", newChild, referenceChild); return newChild; } @@ -64,7 +61,6 @@ namespace Ooui if (!children.Remove (child)) { throw new ArgumentException ("Child not contained in this element", nameof(child)); } - child.ParentNode = null; SendCall ("removeChild", child); return child; }