Bug 964623 OnSelectionChange() and OnLayoutChange() should be called immediately after the document is unlocked completely r=emk