mirror of
https://github.com/servo/servo.git
synced 2025-07-24 07:40:27 +01:00
Introduce LayoutDocumentHelpers::is_html_document_for_layout for LayoutElementHelpers::html_element_in_html_document_for_layout.
This commit is contained in:
parent
32bcc192b0
commit
d643ade7e8
2 changed files with 14 additions and 3 deletions
|
@ -311,6 +311,18 @@ pub enum DocumentSource {
|
|||
NotFromParser,
|
||||
}
|
||||
|
||||
pub trait LayoutDocumentHelpers {
|
||||
unsafe fn is_html_document_for_layout(&self) -> bool;
|
||||
}
|
||||
|
||||
impl LayoutDocumentHelpers for JS<Document> {
|
||||
#[allow(unrooted_must_root)]
|
||||
#[inline]
|
||||
unsafe fn is_html_document_for_layout(&self) -> bool {
|
||||
(*self.unsafe_get()).is_html_document
|
||||
}
|
||||
}
|
||||
|
||||
impl Document {
|
||||
fn new_inherited(window: JSRef<Window>,
|
||||
url: Option<Url>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue