mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove TLayoutNode::get.
It is highly unsafe and unused.
This commit is contained in:
parent
eb2c508df0
commit
ae5191275a
1 changed files with 0 additions and 12 deletions
|
@ -21,8 +21,6 @@
|
|||
//!
|
||||
//! Rules of the road for this file:
|
||||
//!
|
||||
//! * You must not use `.get()`; instead, use `.unsafe_get()`.
|
||||
//!
|
||||
//! * Do not call any methods on DOM nodes without checking to see whether they use borrow flags.
|
||||
//!
|
||||
//! o Instead of `get_attr()`, use `.get_attr_val_for_layout()`.
|
||||
|
@ -91,12 +89,6 @@ pub trait TLayoutNode {
|
|||
/// call and as such is marked `unsafe`.
|
||||
unsafe fn get_jsmanaged<'a>(&'a self) -> &'a LayoutJS<Node>;
|
||||
|
||||
/// Returns the interior of this node as a `Node`. This is highly unsafe for layout to call
|
||||
/// and as such is marked `unsafe`.
|
||||
unsafe fn get<'a>(&'a self) -> &'a Node {
|
||||
&*self.get_jsmanaged().unsafe_get()
|
||||
}
|
||||
|
||||
fn node_is_element(&self) -> bool {
|
||||
match self.type_id() {
|
||||
Some(NodeTypeId::Element(..)) => true,
|
||||
|
@ -740,10 +732,6 @@ impl<'ln> TLayoutNode for ThreadSafeLayoutNode<'ln> {
|
|||
self.node.get_jsmanaged()
|
||||
}
|
||||
|
||||
unsafe fn get<'a>(&'a self) -> &'a Node { // this change.
|
||||
&*self.get_jsmanaged().unsafe_get()
|
||||
}
|
||||
|
||||
fn first_child(&self) -> Option<ThreadSafeLayoutNode<'ln>> {
|
||||
if self.pseudo != PseudoElementType::Normal {
|
||||
return None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue