style: Merge ServoDeclarationBlock and DeclarationBlock.

Bug: 1464496
Reviewed-by: emilio
MozReview-Commit-ID: By9fV70Oq0K
This commit is contained in:
Nazım Can Altınova 2018-05-30 18:15:25 +02:00 committed by Emilio Cobos Álvarez
parent 4108b1b278
commit 93472bcdea
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -1215,16 +1215,9 @@ impl<'le> TElement for GeckoElement<'le> {
unsafe {
let slots = self.extended_slots()?;
let base_declaration: &structs::DeclarationBlock =
let declaration: &structs::DeclarationBlock =
slots.mSMILOverrideStyleDeclaration.mRawPtr.as_ref()?;
let declaration: &structs::ServoDeclarationBlock = mem::transmute(base_declaration);
debug_assert_eq!(
&declaration._base as *const structs::DeclarationBlock,
base_declaration as *const structs::DeclarationBlock
);
let raw: &structs::RawServoDeclarationBlock = declaration.mRaw.mRawPtr.as_ref()?;
Some(