mirror of
https://github.com/servo/servo.git
synced 2025-09-08 14:08:22 +01:00
Use PropertyDeclarationBlock in a DOMRefCell everywhere.
This commit is contained in:
parent
d4f704cad2
commit
d986fd2d2f
14 changed files with 146 additions and 100 deletions
|
@ -16,6 +16,7 @@ use std::sync::atomic::{AtomicBool, AtomicPtr, Ordering};
|
|||
use style::arc_ptr_eq;
|
||||
use style::context::{LocalStyleContextCreationInfo, ReflowGoal, SharedStyleContext};
|
||||
use style::dom::{NodeInfo, TDocument, TElement, TNode};
|
||||
use style::domrefcell::DOMRefCell;
|
||||
use style::error_reporting::StdoutErrorReporter;
|
||||
use style::gecko::data::{NUM_THREADS, PerDocumentStyleData};
|
||||
use style::gecko::selector_impl::{GeckoSelectorImpl, PseudoElement};
|
||||
|
@ -344,7 +345,9 @@ pub extern "C" fn Servo_ParseStyleAttribute(bytes: *const u8, length: u32,
|
|||
-> ServoDeclarationBlockStrong {
|
||||
let value = unsafe { from_utf8_unchecked(slice::from_raw_parts(bytes, length as usize)) };
|
||||
Arc::new(GeckoDeclarationBlock {
|
||||
declarations: GeckoElement::parse_style_attribute(value).map(Arc::new),
|
||||
declarations: GeckoElement::parse_style_attribute(value).map(|block| {
|
||||
Arc::new(DOMRefCell::new(block))
|
||||
}),
|
||||
cache: AtomicPtr::new(cache),
|
||||
immutable: AtomicBool::new(false),
|
||||
}).into_strong()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue