mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Deny unsafe code in style.
This commit is contained in:
parent
3f407ea3d6
commit
2fa45aa064
4 changed files with 9 additions and 0 deletions
|
@ -197,6 +197,7 @@ impl StyleSharingCandidate {
|
|||
/// Attempts to create a style sharing candidate from this node. Returns
|
||||
/// the style sharing candidate or `None` if this node is ineligible for
|
||||
/// style sharing.
|
||||
#[allow(unsafe_code)]
|
||||
fn new<'le, E: TElement<'le>>(element: &E) -> Option<StyleSharingCandidate> {
|
||||
let parent_element = match element.parent_element() {
|
||||
None => return None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue