mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +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
|
||||
V: Push<ApplicableDeclarationBlock>,
|
||||
{
|
||||
unsafe {
|
||||
self.element
|
||||
.synthesize_presentational_hints_for_legacy_attributes(hints);
|
||||
}
|
||||
self.element
|
||||
.synthesize_presentational_hints_for_legacy_attributes(hints);
|
||||
}
|
||||
|
||||
/// The shadow root this element is a host of.
|
||||
|
|
|
@ -646,10 +646,8 @@ impl<'le> TElement for ServoLayoutElement<'le> {
|
|||
) where
|
||||
V: Push<ApplicableDeclarationBlock>,
|
||||
{
|
||||
unsafe {
|
||||
self.element
|
||||
.synthesize_presentational_hints_for_legacy_attributes(hints);
|
||||
}
|
||||
self.element
|
||||
.synthesize_presentational_hints_for_legacy_attributes(hints);
|
||||
}
|
||||
|
||||
/// 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 get_classes_for_layout(self) -> Option<&'dom [Atom]>;
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn synthesize_presentational_hints_for_legacy_attributes<V>(self, _: &mut V)
|
||||
fn synthesize_presentational_hints_for_legacy_attributes<V>(self, hints: &mut V)
|
||||
where
|
||||
V: Push<ApplicableDeclarationBlock>;
|
||||
fn get_colspan(self) -> u32;
|
||||
|
@ -616,8 +615,7 @@ impl<'dom> LayoutElementHelpers<'dom> for LayoutDom<'dom, Element> {
|
|||
.map(|attr| attr.as_tokens().unwrap())
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn synthesize_presentational_hints_for_legacy_attributes<V>(self, hints: &mut V)
|
||||
fn synthesize_presentational_hints_for_legacy_attributes<V>(self, hints: &mut V)
|
||||
where
|
||||
V: Push<ApplicableDeclarationBlock>,
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue