Let nearestSelectAncestor be null.
Let ancestor be selectedcontent's parent.
Set selectedcontent's disabled state to false.
Otherwise, set selectedcontent's disabled state to true.
+ +Break.
If ancestor is an option element or a
selectedcontent element, then set selectedcontent's disabled state to true.