Remove ParentNode to allow shared children

This commit is contained in:
Frank A. Krueger 2017-06-16 16:44:37 -07:00
parent 05586997db
commit 952611dcdf
2 changed files with 0 additions and 14 deletions

View File

@ -16,16 +16,6 @@ namespace Ooui
set => SetProperty (ref isDisabled, value, "disabled"); 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) public FormControl (string tagName)
: base (tagName) : base (tagName)
{ {

View File

@ -40,8 +40,6 @@ namespace Ooui
return InsertBefore (newChild, null); return InsertBefore (newChild, null);
} }
public Node ParentNode { get; private set; }
public Node InsertBefore (Node newChild, Node referenceChild) public Node InsertBefore (Node newChild, Node referenceChild)
{ {
if (referenceChild == null) { if (referenceChild == null) {
@ -54,7 +52,6 @@ namespace Ooui
} }
children.Insert (index, newChild); children.Insert (index, newChild);
} }
newChild.ParentNode = this;
SendCall ("insertBefore", newChild, referenceChild); SendCall ("insertBefore", newChild, referenceChild);
return newChild; return newChild;
} }
@ -64,7 +61,6 @@ namespace Ooui
if (!children.Remove (child)) { if (!children.Remove (child)) {
throw new ArgumentException ("Child not contained in this element", nameof(child)); throw new ArgumentException ("Child not contained in this element", nameof(child));
} }
child.ParentNode = null;
SendCall ("removeChild", child); SendCall ("removeChild", child);
return child; return child;
} }