mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Make synthesize_presentational_hints_for_legacy_attributes be safe
This commit is contained in:
parent
0c0027ecfd
commit
ebd2892158
3 changed files with 6 additions and 12 deletions
|
@ -639,10 +639,8 @@ impl<'le> TElement for ServoLayoutElement<'le> {
|
||||||
) where
|
) where
|
||||||
V: Push<ApplicableDeclarationBlock>,
|
V: Push<ApplicableDeclarationBlock>,
|
||||||
{
|
{
|
||||||
unsafe {
|
self.element
|
||||||
self.element
|
.synthesize_presentational_hints_for_legacy_attributes(hints);
|
||||||
.synthesize_presentational_hints_for_legacy_attributes(hints);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The shadow root this element is a host of.
|
/// The shadow root this element is a host of.
|
||||||
|
|
|
@ -646,10 +646,8 @@ impl<'le> TElement for ServoLayoutElement<'le> {
|
||||||
) where
|
) where
|
||||||
V: Push<ApplicableDeclarationBlock>,
|
V: Push<ApplicableDeclarationBlock>,
|
||||||
{
|
{
|
||||||
unsafe {
|
self.element
|
||||||
self.element
|
.synthesize_presentational_hints_for_legacy_attributes(hints);
|
||||||
.synthesize_presentational_hints_for_legacy_attributes(hints);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The shadow root this element is a host of.
|
/// The shadow root this element is a host of.
|
||||||
|
|
|
@ -567,8 +567,7 @@ pub trait LayoutElementHelpers<'dom> {
|
||||||
fn has_class_for_layout(self, name: &Atom, case_sensitivity: CaseSensitivity) -> bool;
|
fn has_class_for_layout(self, name: &Atom, case_sensitivity: CaseSensitivity) -> bool;
|
||||||
fn get_classes_for_layout(self) -> Option<&'dom [Atom]>;
|
fn get_classes_for_layout(self) -> Option<&'dom [Atom]>;
|
||||||
|
|
||||||
#[allow(unsafe_code)]
|
fn synthesize_presentational_hints_for_legacy_attributes<V>(self, hints: &mut V)
|
||||||
unsafe fn synthesize_presentational_hints_for_legacy_attributes<V>(self, _: &mut V)
|
|
||||||
where
|
where
|
||||||
V: Push<ApplicableDeclarationBlock>;
|
V: Push<ApplicableDeclarationBlock>;
|
||||||
fn get_colspan(self) -> u32;
|
fn get_colspan(self) -> u32;
|
||||||
|
@ -616,8 +615,7 @@ impl<'dom> LayoutElementHelpers<'dom> for LayoutDom<'dom, Element> {
|
||||||
.map(|attr| attr.as_tokens().unwrap())
|
.map(|attr| attr.as_tokens().unwrap())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unsafe_code)]
|
fn synthesize_presentational_hints_for_legacy_attributes<V>(self, hints: &mut V)
|
||||||
unsafe fn synthesize_presentational_hints_for_legacy_attributes<V>(self, hints: &mut V)
|
|
||||||
where
|
where
|
||||||
V: Push<ApplicableDeclarationBlock>,
|
V: Push<ApplicableDeclarationBlock>,
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue