some fixes for multiple-mode textinput
auto merge of #4273 : wenderen/servo/multiple-line-textintput, r=Manishearth

#4258