mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Change storage of previous and next children in nsINode.
This commit is contained in:
parent
888ad3eabe
commit
87deddb631
1 changed files with 12 additions and 9 deletions
|
@ -30,7 +30,7 @@ use gecko::selector_parser::{NonTSPseudoClass, PseudoElement, SelectorImpl};
|
|||
use gecko::snapshot_helpers;
|
||||
use gecko_bindings::bindings;
|
||||
use gecko_bindings::bindings::{Gecko_ElementState, Gecko_GetDocumentLWTheme};
|
||||
use gecko_bindings::bindings::{Gecko_GetLastChild, Gecko_GetNextStyleChild};
|
||||
use gecko_bindings::bindings::{Gecko_GetLastChild, Gecko_GetPreviousSibling, Gecko_GetNextStyleChild};
|
||||
use gecko_bindings::bindings::{Gecko_SetNodeFlags, Gecko_UnsetNodeFlags};
|
||||
use gecko_bindings::bindings::Gecko_ClassOrClassList;
|
||||
use gecko_bindings::bindings::Gecko_ElementHasAnimations;
|
||||
|
@ -375,7 +375,11 @@ impl<'ln> TNode for GeckoNode<'ln> {
|
|||
|
||||
#[inline]
|
||||
fn first_child(&self) -> Option<Self> {
|
||||
unsafe { self.0.mFirstChild.as_ref().map(GeckoNode::from_content) }
|
||||
unsafe {
|
||||
self.0
|
||||
.mFirstChild.raw::<nsIContent>()
|
||||
.as_ref()
|
||||
.map(GeckoNode::from_content) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
@ -385,17 +389,16 @@ impl<'ln> TNode for GeckoNode<'ln> {
|
|||
|
||||
#[inline]
|
||||
fn prev_sibling(&self) -> Option<Self> {
|
||||
unsafe {
|
||||
self.0
|
||||
.mPreviousSibling
|
||||
.as_ref()
|
||||
.map(GeckoNode::from_content)
|
||||
}
|
||||
unsafe { Gecko_GetPreviousSibling(self.0).map(GeckoNode) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn next_sibling(&self) -> Option<Self> {
|
||||
unsafe { self.0.mNextSibling.as_ref().map(GeckoNode::from_content) }
|
||||
unsafe {
|
||||
self.0
|
||||
.mNextSibling.raw::<nsIContent>()
|
||||
.as_ref()
|
||||
.map(GeckoNode::from_content) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue