Opt-in rather than opt-out to unsafe blocks in layout.

This commit is contained in:
Ms2ger 2015-02-08 20:03:17 +01:00
parent a819b0b1b6
commit 7c6b03abfe
12 changed files with 22 additions and 0 deletions

View file

@ -4,6 +4,8 @@
//! High-level interface to CSS selector matching.
#![allow(unsafe_blocks)]
use css::node_style::StyledNode;
use incremental::{self, RestyleDamage};
use util::{LayoutDataAccess, LayoutDataWrapper};

View file

@ -23,6 +23,7 @@ pub trait StyledNode {
impl<'ln> StyledNode for ThreadSafeLayoutNode<'ln> {
#[inline]
#[allow(unsafe_blocks)]
fn style<'a>(&'a self) -> &'a Arc<ComputedValues> {
unsafe {
let layout_data_ref = self.borrow_layout_data();