Fixed XViewLayoutModel bugs about document.