Bug 1059663 input management codes cleanup