Pass the document instead of the documentElement to reflow.

This commit is contained in:
Bobby Holley 2015-10-12 17:43:49 -07:00
parent 85596b5510
commit 441c84d75d
5 changed files with 51 additions and 26 deletions

View file

@ -1175,15 +1175,14 @@ pub enum DocumentSource {
NotFromParser,
}
#[allow(unsafe_code)]
pub trait LayoutDocumentHelpers {
#[allow(unsafe_code)]
unsafe fn is_html_document_for_layout(&self) -> bool;
}
#[allow(unsafe_code)]
impl LayoutDocumentHelpers for LayoutJS<Document> {
#[allow(unrooted_must_root)]
#[inline]
#[allow(unsafe_code)]
unsafe fn is_html_document_for_layout(&self) -> bool {
(*self.unsafe_get()).is_html_document
}