Instead of storing Element and InputElement pointers in InputElementData these pointers can just be provided by the callee of the static functions. No need to waste memory for that. OptionElement/ScriptElement/.. have the same problem. I'm going to fix them all.
Created attachment 30684 [details] Initial patch No regressions.
Landed in r44187.