mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Add TNode::owner_doc.
This commit is contained in:
parent
4d4fa69018
commit
bfa7cd7d9e
4 changed files with 28 additions and 19 deletions
|
@ -446,7 +446,7 @@ pub trait LayoutElementHelpers {
|
|||
#[allow(unsafe_code)]
|
||||
unsafe fn get_rowspan(self) -> u32;
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn html_element_in_html_document_for_layout(&self) -> bool;
|
||||
unsafe fn is_html_element(&self) -> bool;
|
||||
fn id_attribute(&self) -> *const Option<Atom>;
|
||||
fn style_attribute(&self) -> *const Option<Arc<Locked<PropertyDeclarationBlock>>>;
|
||||
fn local_name(&self) -> &LocalName;
|
||||
|
@ -781,11 +781,8 @@ impl LayoutElementHelpers for LayoutDom<Element> {
|
|||
|
||||
#[inline]
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn html_element_in_html_document_for_layout(&self) -> bool {
|
||||
if (*self.unsafe_get()).namespace != ns!(html) {
|
||||
return false;
|
||||
}
|
||||
self.upcast::<Node>().owner_doc_for_layout().is_html_document_for_layout()
|
||||
unsafe fn is_html_element(&self) -> bool {
|
||||
(*self.unsafe_get()).namespace == ns!(html)
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue