Bug 675579 - Part 1: Set the dir attribute on the input/textarea element when switching the text direction; r=roc

--HG--
extra : rebase_source : d149468874202df13a2ae82dd95933edff9bbc45
Bug 675579 - Part 2: Dispatch an input event when changing the direction of a plain text element; r=roc

--HG--
extra : rebase_source : 06eb0f2fa67ca81e214df8800ceec8dc305ee7c6