Implement full DOM stability

R=arv
BUG=

Review URL: https://codereview.appspot.com/9337044