mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Prefer Atoms over strs for comparison
This commit is contained in:
parent
81f094b129
commit
55477eb618
1 changed files with 4 additions and 4 deletions
|
@ -639,12 +639,12 @@ impl Element {
|
|||
if self.namespace != ns!(HTML) {
|
||||
return false
|
||||
}
|
||||
match &*self.local_name {
|
||||
match self.local_name {
|
||||
/* List of void elements from
|
||||
https://html.spec.whatwg.org/multipage/#html-fragment-serialisation-algorithm */
|
||||
"area" | "base" | "basefont" | "bgsound" | "br" | "col" | "embed" |
|
||||
"frame" | "hr" | "img" | "input" | "keygen" | "link" | "menuitem" |
|
||||
"meta" | "param" | "source" | "track" | "wbr" => true,
|
||||
atom!(area) | atom!(base) | atom!(basefont) | atom!(bgsound) | atom!(br) | atom!(col) | atom!(embed) |
|
||||
atom!(frame) | atom!(hr) | atom!(img) | atom!(input) | atom!(keygen) | atom!(link) | atom!(menuitem) |
|
||||
atom!(meta) | atom!(param) | atom!(source) | atom!(track) | atom!(wbr) => true,
|
||||
_ => false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue