[SD9010] Handle mootools' case '<input name="x">'. Refactor some codes.
[SD9010] Handle mootools' case '<input name="x">'.
Refactor some codes.

Review URL: http://codereview.appspot.com/4280073
linqiangl/compatibility-detector,linqiangl/compatibility-detector,linqiangl/compatibility-detector