mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #8453 - frewsxcv:atoms, r=jdm
Prefer Atoms over strs for comparison <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8453) <!-- Reviewable:end -->
This commit is contained in:
commit
fd5540df62
1 changed files with 4 additions and 4 deletions
|
@ -640,12 +640,12 @@ impl Element {
|
||||||
if self.namespace != ns!(HTML) {
|
if self.namespace != ns!(HTML) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
match &*self.local_name {
|
match self.local_name {
|
||||||
/* List of void elements from
|
/* List of void elements from
|
||||||
https://html.spec.whatwg.org/multipage/#html-fragment-serialisation-algorithm */
|
https://html.spec.whatwg.org/multipage/#html-fragment-serialisation-algorithm */
|
||||||
"area" | "base" | "basefont" | "bgsound" | "br" | "col" | "embed" |
|
atom!(area) | atom!(base) | atom!(basefont) | atom!(bgsound) | atom!(br) | atom!(col) | atom!(embed) |
|
||||||
"frame" | "hr" | "img" | "input" | "keygen" | "link" | "menuitem" |
|
atom!(frame) | atom!(hr) | atom!(img) | atom!(input) | atom!(keygen) | atom!(link) | atom!(menuitem) |
|
||||||
"meta" | "param" | "source" | "track" | "wbr" => true,
|
atom!(meta) | atom!(param) | atom!(source) | atom!(track) | atom!(wbr) => true,
|
||||||
_ => false
|
_ => false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue