Use switch statements where possible.
Pull request: https://github.com/WebKit/WebKit/pull/4620
Committed 254832@main (28e457f8a85d): <https://commits.webkit.org/254832@main> Reviewed commits have been landed. Closing PR #4620 and removing active labels.
<rdar://problem/100368247>