mirror of
https://github.com/servo/servo.git
synced 2025-06-23 16:44:33 +01:00
Use Cell/RefCell for interior mutability of Node.
This commit is contained in:
parent
1f8eda957d
commit
b4463c1fb2
2 changed files with 66 additions and 66 deletions
|
@ -181,7 +181,7 @@ impl<'ln> TLayoutNode for LayoutNode<'ln> {
|
||||||
|
|
||||||
fn first_child(&self) -> Option<LayoutNode<'ln>> {
|
fn first_child(&self) -> Option<LayoutNode<'ln>> {
|
||||||
unsafe {
|
unsafe {
|
||||||
self.get_jsmanaged().first_child_ref().map(|node| self.new_with_this_lifetime(node))
|
self.get_jsmanaged().first_child_ref().map(|node| self.new_with_this_lifetime(&node))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,19 +230,19 @@ impl<'ln> LayoutNode<'ln> {
|
||||||
impl<'ln> TNode<LayoutElement<'ln>> for LayoutNode<'ln> {
|
impl<'ln> TNode<LayoutElement<'ln>> for LayoutNode<'ln> {
|
||||||
fn parent_node(&self) -> Option<LayoutNode<'ln>> {
|
fn parent_node(&self) -> Option<LayoutNode<'ln>> {
|
||||||
unsafe {
|
unsafe {
|
||||||
self.node.parent_node_ref().map(|node| self.new_with_this_lifetime(node))
|
self.node.parent_node_ref().map(|node| self.new_with_this_lifetime(&node))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn prev_sibling(&self) -> Option<LayoutNode<'ln>> {
|
fn prev_sibling(&self) -> Option<LayoutNode<'ln>> {
|
||||||
unsafe {
|
unsafe {
|
||||||
self.node.prev_sibling_ref().map(|node| self.new_with_this_lifetime(node))
|
self.node.prev_sibling_ref().map(|node| self.new_with_this_lifetime(&node))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn next_sibling(&self) -> Option<LayoutNode<'ln>> {
|
fn next_sibling(&self) -> Option<LayoutNode<'ln>> {
|
||||||
unsafe {
|
unsafe {
|
||||||
self.node.next_sibling_ref().map(|node| self.new_with_this_lifetime(node))
|
self.node.next_sibling_ref().map(|node| self.new_with_this_lifetime(&node))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -471,7 +471,7 @@ impl<'ln> TLayoutNode for ThreadSafeLayoutNode<'ln> {
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
self.get_jsmanaged().first_child_ref().map(|node| self.new_with_this_lifetime(node))
|
self.get_jsmanaged().first_child_ref().map(|node| self.new_with_this_lifetime(&node))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -521,10 +521,10 @@ impl<'ln> ThreadSafeLayoutNode<'ln> {
|
||||||
/// Returns the next sibling of this node. Unsafe and private because this can lead to races.
|
/// Returns the next sibling of this node. Unsafe and private because this can lead to races.
|
||||||
unsafe fn next_sibling(&self) -> Option<ThreadSafeLayoutNode<'ln>> {
|
unsafe fn next_sibling(&self) -> Option<ThreadSafeLayoutNode<'ln>> {
|
||||||
if self.pseudo == Before || self.pseudo == BeforeBlock {
|
if self.pseudo == Before || self.pseudo == BeforeBlock {
|
||||||
return self.get_jsmanaged().first_child_ref().map(|node| self.new_with_this_lifetime(node))
|
return self.get_jsmanaged().first_child_ref().map(|node| self.new_with_this_lifetime(&node))
|
||||||
}
|
}
|
||||||
|
|
||||||
self.get_jsmanaged().next_sibling_ref().map(|node| self.new_with_this_lifetime(node))
|
self.get_jsmanaged().next_sibling_ref().map(|node| self.new_with_this_lifetime(&node))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns an iterator over this node's children.
|
/// Returns an iterator over this node's children.
|
||||||
|
|
|
@ -41,7 +41,7 @@ use libc;
|
||||||
use libc::uintptr_t;
|
use libc::uintptr_t;
|
||||||
use std::cast::transmute;
|
use std::cast::transmute;
|
||||||
use std::cast;
|
use std::cast;
|
||||||
use std::cell::{RefCell, Ref, RefMut};
|
use std::cell::{Cell, RefCell, Ref, RefMut};
|
||||||
use std::iter::{Map, Filter};
|
use std::iter::{Map, Filter};
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use style::ComputedValues;
|
use style::ComputedValues;
|
||||||
|
@ -63,25 +63,25 @@ pub struct Node {
|
||||||
pub type_id: NodeTypeId,
|
pub type_id: NodeTypeId,
|
||||||
|
|
||||||
/// The parent of this node.
|
/// The parent of this node.
|
||||||
pub parent_node: Option<JS<Node>>,
|
pub parent_node: Cell<Option<JS<Node>>>,
|
||||||
|
|
||||||
/// The first child of this node.
|
/// The first child of this node.
|
||||||
pub first_child: Option<JS<Node>>,
|
pub first_child: Cell<Option<JS<Node>>>,
|
||||||
|
|
||||||
/// The last child of this node.
|
/// The last child of this node.
|
||||||
pub last_child: Option<JS<Node>>,
|
pub last_child: Cell<Option<JS<Node>>>,
|
||||||
|
|
||||||
/// The next sibling of this node.
|
/// The next sibling of this node.
|
||||||
pub next_sibling: Option<JS<Node>>,
|
pub next_sibling: Cell<Option<JS<Node>>>,
|
||||||
|
|
||||||
/// The previous sibling of this node.
|
/// The previous sibling of this node.
|
||||||
pub prev_sibling: Option<JS<Node>>,
|
pub prev_sibling: Cell<Option<JS<Node>>>,
|
||||||
|
|
||||||
/// The document that this node belongs to.
|
/// The document that this node belongs to.
|
||||||
owner_doc: Option<JS<Document>>,
|
owner_doc: Cell<Option<JS<Document>>>,
|
||||||
|
|
||||||
/// The live list of children return by .childNodes.
|
/// The live list of children return by .childNodes.
|
||||||
pub child_list: Option<JS<NodeList>>,
|
pub child_list: Cell<Option<JS<NodeList>>>,
|
||||||
|
|
||||||
/// A bitfield of flags for node items.
|
/// A bitfield of flags for node items.
|
||||||
flags: NodeFlags,
|
flags: NodeFlags,
|
||||||
|
@ -327,26 +327,26 @@ impl<'a> PrivateNodeHelpers for JSRef<'a, Node> {
|
||||||
///
|
///
|
||||||
/// Fails unless `child` is a child of this node. (FIXME: This is not yet checked.)
|
/// Fails unless `child` is a child of this node. (FIXME: This is not yet checked.)
|
||||||
fn remove_child(&mut self, child: &mut JSRef<Node>) {
|
fn remove_child(&mut self, child: &mut JSRef<Node>) {
|
||||||
assert!(child.parent_node.is_some());
|
assert!(child.parent_node.get().is_some());
|
||||||
|
|
||||||
match child.prev_sibling.root() {
|
match child.prev_sibling.get().root() {
|
||||||
None => {
|
None => {
|
||||||
let next_sibling = child.next_sibling.root();
|
let next_sibling = child.next_sibling.get().root();
|
||||||
self.set_first_child(next_sibling.root_ref());
|
self.set_first_child(next_sibling.root_ref());
|
||||||
}
|
}
|
||||||
Some(ref mut prev_sibling) => {
|
Some(ref mut prev_sibling) => {
|
||||||
let next_sibling = child.next_sibling.root();
|
let next_sibling = child.next_sibling.get().root();
|
||||||
prev_sibling.set_next_sibling(next_sibling.root_ref());
|
prev_sibling.set_next_sibling(next_sibling.root_ref());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
match child.next_sibling.root() {
|
match child.next_sibling.get().root() {
|
||||||
None => {
|
None => {
|
||||||
let prev_sibling = child.prev_sibling.root();
|
let prev_sibling = child.prev_sibling.get().root();
|
||||||
self.set_last_child(prev_sibling.root_ref());
|
self.set_last_child(prev_sibling.root_ref());
|
||||||
}
|
}
|
||||||
Some(ref mut next_sibling) => {
|
Some(ref mut next_sibling) => {
|
||||||
let prev_sibling = child.prev_sibling.root();
|
let prev_sibling = child.prev_sibling.get().root();
|
||||||
next_sibling.set_prev_sibling(prev_sibling.root_ref());
|
next_sibling.set_prev_sibling(prev_sibling.root_ref());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -475,25 +475,25 @@ impl<'a> NodeHelpers for JSRef<'a, Node> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parent_node(&self) -> Option<Temporary<Node>> {
|
fn parent_node(&self) -> Option<Temporary<Node>> {
|
||||||
self.deref().parent_node.clone().map(|node| Temporary::new(node))
|
self.deref().parent_node.get().map(|node| Temporary::new(node))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn first_child(&self) -> Option<Temporary<Node>> {
|
fn first_child(&self) -> Option<Temporary<Node>> {
|
||||||
self.deref().first_child.clone().map(|node| Temporary::new(node))
|
self.deref().first_child.get().map(|node| Temporary::new(node))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn last_child(&self) -> Option<Temporary<Node>> {
|
fn last_child(&self) -> Option<Temporary<Node>> {
|
||||||
self.deref().last_child.clone().map(|node| Temporary::new(node))
|
self.deref().last_child.get().map(|node| Temporary::new(node))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the previous sibling of this node. Fails if this node is borrowed mutably.
|
/// Returns the previous sibling of this node. Fails if this node is borrowed mutably.
|
||||||
fn prev_sibling(&self) -> Option<Temporary<Node>> {
|
fn prev_sibling(&self) -> Option<Temporary<Node>> {
|
||||||
self.deref().prev_sibling.clone().map(|node| Temporary::new(node))
|
self.deref().prev_sibling.get().map(|node| Temporary::new(node))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the next sibling of this node. Fails if this node is borrowed mutably.
|
/// Returns the next sibling of this node. Fails if this node is borrowed mutably.
|
||||||
fn next_sibling(&self) -> Option<Temporary<Node>> {
|
fn next_sibling(&self) -> Option<Temporary<Node>> {
|
||||||
self.deref().next_sibling.clone().map(|node| Temporary::new(node))
|
self.deref().next_sibling.get().map(|node| Temporary::new(node))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
@ -593,12 +593,12 @@ impl<'a> NodeHelpers for JSRef<'a, Node> {
|
||||||
|
|
||||||
fn ancestors(&self) -> AncestorIterator {
|
fn ancestors(&self) -> AncestorIterator {
|
||||||
AncestorIterator {
|
AncestorIterator {
|
||||||
current: self.parent_node.clone().map(|node| (*node.root()).clone()),
|
current: self.parent_node.get().map(|node| (*node.root()).clone()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn owner_doc(&self) -> Temporary<Document> {
|
fn owner_doc(&self) -> Temporary<Document> {
|
||||||
Temporary::new(self.owner_doc.get_ref().clone())
|
Temporary::new(self.owner_doc.get().get_ref().clone())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_owner_doc(&mut self, document: &JSRef<Document>) {
|
fn set_owner_doc(&mut self, document: &JSRef<Document>) {
|
||||||
|
@ -607,7 +607,7 @@ impl<'a> NodeHelpers for JSRef<'a, Node> {
|
||||||
|
|
||||||
fn children(&self) -> AbstractNodeChildrenIterator {
|
fn children(&self) -> AbstractNodeChildrenIterator {
|
||||||
AbstractNodeChildrenIterator {
|
AbstractNodeChildrenIterator {
|
||||||
current_node: self.first_child.clone().map(|node| (*node.root()).clone()),
|
current_node: self.first_child.get().map(|node| (*node.root()).clone()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -654,13 +654,13 @@ pub fn from_untrusted_node_address(runtime: *mut JSRuntime, candidate: Untrusted
|
||||||
pub trait LayoutNodeHelpers {
|
pub trait LayoutNodeHelpers {
|
||||||
unsafe fn type_id_for_layout(&self) -> NodeTypeId;
|
unsafe fn type_id_for_layout(&self) -> NodeTypeId;
|
||||||
|
|
||||||
unsafe fn parent_node_ref<'a>(&'a self) -> Option<&'a JS<Node>>;
|
unsafe fn parent_node_ref<'a>(&'a self) -> Option<JS<Node>>;
|
||||||
unsafe fn first_child_ref<'a>(&'a self) -> Option<&'a JS<Node>>;
|
unsafe fn first_child_ref<'a>(&'a self) -> Option<JS<Node>>;
|
||||||
unsafe fn last_child_ref<'a>(&'a self) -> Option<&'a JS<Node>>;
|
unsafe fn last_child_ref<'a>(&'a self) -> Option<JS<Node>>;
|
||||||
unsafe fn prev_sibling_ref<'a>(&'a self) -> Option<&'a JS<Node>>;
|
unsafe fn prev_sibling_ref<'a>(&'a self) -> Option<JS<Node>>;
|
||||||
unsafe fn next_sibling_ref<'a>(&'a self) -> Option<&'a JS<Node>>;
|
unsafe fn next_sibling_ref<'a>(&'a self) -> Option<JS<Node>>;
|
||||||
|
|
||||||
unsafe fn owner_doc_for_layout<'a>(&'a self) -> &'a JS<Document>;
|
unsafe fn owner_doc_for_layout<'a>(&'a self) -> JS<Document>;
|
||||||
|
|
||||||
unsafe fn is_element_for_layout(&self) -> bool;
|
unsafe fn is_element_for_layout(&self) -> bool;
|
||||||
}
|
}
|
||||||
|
@ -675,32 +675,32 @@ impl LayoutNodeHelpers for JS<Node> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
unsafe fn parent_node_ref<'a>(&'a self) -> Option<&'a JS<Node>> {
|
unsafe fn parent_node_ref<'a>(&'a self) -> Option<JS<Node>> {
|
||||||
(*self.unsafe_get()).parent_node.as_ref()
|
(*self.unsafe_get()).parent_node.get()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
unsafe fn first_child_ref<'a>(&'a self) -> Option<&'a JS<Node>> {
|
unsafe fn first_child_ref<'a>(&'a self) -> Option<JS<Node>> {
|
||||||
(*self.unsafe_get()).first_child.as_ref()
|
(*self.unsafe_get()).first_child.get()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
unsafe fn last_child_ref<'a>(&'a self) -> Option<&'a JS<Node>> {
|
unsafe fn last_child_ref<'a>(&'a self) -> Option<JS<Node>> {
|
||||||
(*self.unsafe_get()).last_child.as_ref()
|
(*self.unsafe_get()).last_child.get()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
unsafe fn prev_sibling_ref<'a>(&'a self) -> Option<&'a JS<Node>> {
|
unsafe fn prev_sibling_ref<'a>(&'a self) -> Option<JS<Node>> {
|
||||||
(*self.unsafe_get()).prev_sibling.as_ref()
|
(*self.unsafe_get()).prev_sibling.get()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
unsafe fn next_sibling_ref<'a>(&'a self) -> Option<&'a JS<Node>> {
|
unsafe fn next_sibling_ref<'a>(&'a self) -> Option<JS<Node>> {
|
||||||
(*self.unsafe_get()).next_sibling.as_ref()
|
(*self.unsafe_get()).next_sibling.get()
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn owner_doc_for_layout<'a>(&'a self) -> &'a JS<Document> {
|
unsafe fn owner_doc_for_layout<'a>(&'a self) -> JS<Document> {
|
||||||
(*self.unsafe_get()).owner_doc.get_ref()
|
(*self.unsafe_get()).owner_doc.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -822,7 +822,7 @@ impl<'a> Iterator<JSRef<'a, Node>> for NodeIterator {
|
||||||
self.current_node = match self.current_node.as_ref().map(|node| node.root()) {
|
self.current_node = match self.current_node.as_ref().map(|node| node.root()) {
|
||||||
None => {
|
None => {
|
||||||
if self.include_start {
|
if self.include_start {
|
||||||
Some(self.start_node.clone())
|
Some(self.start_node)
|
||||||
} else {
|
} else {
|
||||||
self.next_child(&*self.start_node.root())
|
self.next_child(&*self.start_node.root())
|
||||||
.map(|child| child.unrooted())
|
.map(|child| child.unrooted())
|
||||||
|
@ -860,7 +860,7 @@ impl<'a> Iterator<JSRef<'a, Node>> for NodeIterator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
self.current_node.clone().map(|node| (*node.root()).clone())
|
self.current_node.map(|node| (*node.root()).clone())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -911,14 +911,14 @@ impl Node {
|
||||||
eventtarget: EventTarget::new_inherited(NodeTargetTypeId(type_id)),
|
eventtarget: EventTarget::new_inherited(NodeTargetTypeId(type_id)),
|
||||||
type_id: type_id,
|
type_id: type_id,
|
||||||
|
|
||||||
parent_node: None,
|
parent_node: Cell::new(None),
|
||||||
first_child: None,
|
first_child: Cell::new(None),
|
||||||
last_child: None,
|
last_child: Cell::new(None),
|
||||||
next_sibling: None,
|
next_sibling: Cell::new(None),
|
||||||
prev_sibling: None,
|
prev_sibling: Cell::new(None),
|
||||||
|
|
||||||
owner_doc: doc.unrooted(),
|
owner_doc: Cell::new(doc.unrooted()),
|
||||||
child_list: None,
|
child_list: Cell::new(None),
|
||||||
|
|
||||||
flags: NodeFlags::new(type_id),
|
flags: NodeFlags::new(type_id),
|
||||||
|
|
||||||
|
@ -1427,12 +1427,12 @@ impl<'a> NodeMethods for JSRef<'a, Node> {
|
||||||
|
|
||||||
// http://dom.spec.whatwg.org/#dom-node-parentnode
|
// http://dom.spec.whatwg.org/#dom-node-parentnode
|
||||||
fn GetParentNode(&self) -> Option<Temporary<Node>> {
|
fn GetParentNode(&self) -> Option<Temporary<Node>> {
|
||||||
self.parent_node.clone().map(|node| Temporary::new(node))
|
self.parent_node.get().map(|node| Temporary::new(node))
|
||||||
}
|
}
|
||||||
|
|
||||||
// http://dom.spec.whatwg.org/#dom-node-parentelement
|
// http://dom.spec.whatwg.org/#dom-node-parentelement
|
||||||
fn GetParentElement(&self) -> Option<Temporary<Element>> {
|
fn GetParentElement(&self) -> Option<Temporary<Element>> {
|
||||||
self.parent_node.clone()
|
self.parent_node.get()
|
||||||
.and_then(|parent| {
|
.and_then(|parent| {
|
||||||
let parent = parent.root();
|
let parent = parent.root();
|
||||||
ElementCast::to_ref(&*parent).map(|elem| {
|
ElementCast::to_ref(&*parent).map(|elem| {
|
||||||
|
@ -1443,12 +1443,12 @@ impl<'a> NodeMethods for JSRef<'a, Node> {
|
||||||
|
|
||||||
// http://dom.spec.whatwg.org/#dom-node-haschildnodes
|
// http://dom.spec.whatwg.org/#dom-node-haschildnodes
|
||||||
fn HasChildNodes(&self) -> bool {
|
fn HasChildNodes(&self) -> bool {
|
||||||
self.first_child.is_some()
|
self.first_child.get().is_some()
|
||||||
}
|
}
|
||||||
|
|
||||||
// http://dom.spec.whatwg.org/#dom-node-childnodes
|
// http://dom.spec.whatwg.org/#dom-node-childnodes
|
||||||
fn ChildNodes(&mut self) -> Temporary<NodeList> {
|
fn ChildNodes(&mut self) -> Temporary<NodeList> {
|
||||||
match self.child_list {
|
match self.child_list.get() {
|
||||||
None => (),
|
None => (),
|
||||||
Some(ref list) => return Temporary::new(list.clone()),
|
Some(ref list) => return Temporary::new(list.clone()),
|
||||||
}
|
}
|
||||||
|
@ -1457,27 +1457,27 @@ impl<'a> NodeMethods for JSRef<'a, Node> {
|
||||||
let window = doc.deref().window.root();
|
let window = doc.deref().window.root();
|
||||||
let child_list = NodeList::new_child_list(&*window, self);
|
let child_list = NodeList::new_child_list(&*window, self);
|
||||||
self.child_list.assign(Some(child_list));
|
self.child_list.assign(Some(child_list));
|
||||||
Temporary::new(self.child_list.get_ref().clone())
|
Temporary::new(self.child_list.get().get_ref().clone())
|
||||||
}
|
}
|
||||||
|
|
||||||
// http://dom.spec.whatwg.org/#dom-node-firstchild
|
// http://dom.spec.whatwg.org/#dom-node-firstchild
|
||||||
fn GetFirstChild(&self) -> Option<Temporary<Node>> {
|
fn GetFirstChild(&self) -> Option<Temporary<Node>> {
|
||||||
self.first_child.clone().map(|node| Temporary::new(node))
|
self.first_child.get().map(|node| Temporary::new(node))
|
||||||
}
|
}
|
||||||
|
|
||||||
// http://dom.spec.whatwg.org/#dom-node-lastchild
|
// http://dom.spec.whatwg.org/#dom-node-lastchild
|
||||||
fn GetLastChild(&self) -> Option<Temporary<Node>> {
|
fn GetLastChild(&self) -> Option<Temporary<Node>> {
|
||||||
self.last_child.clone().map(|node| Temporary::new(node))
|
self.last_child.get().map(|node| Temporary::new(node))
|
||||||
}
|
}
|
||||||
|
|
||||||
// http://dom.spec.whatwg.org/#dom-node-previoussibling
|
// http://dom.spec.whatwg.org/#dom-node-previoussibling
|
||||||
fn GetPreviousSibling(&self) -> Option<Temporary<Node>> {
|
fn GetPreviousSibling(&self) -> Option<Temporary<Node>> {
|
||||||
self.prev_sibling.clone().map(|node| Temporary::new(node))
|
self.prev_sibling.get().map(|node| Temporary::new(node))
|
||||||
}
|
}
|
||||||
|
|
||||||
// http://dom.spec.whatwg.org/#dom-node-nextsibling
|
// http://dom.spec.whatwg.org/#dom-node-nextsibling
|
||||||
fn GetNextSibling(&self) -> Option<Temporary<Node>> {
|
fn GetNextSibling(&self) -> Option<Temporary<Node>> {
|
||||||
self.next_sibling.clone().map(|node| Temporary::new(node))
|
self.next_sibling.get().map(|node| Temporary::new(node))
|
||||||
}
|
}
|
||||||
|
|
||||||
// http://dom.spec.whatwg.org/#dom-node-nodevalue
|
// http://dom.spec.whatwg.org/#dom-node-nodevalue
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue