Use new downcast helpers to remove ToFooElementOrDie()

This CL uses IsA<FooElement> and To<FooElement> as replacement for
casting helper ToFooElementOrDie.

Bug: 891908
Change-Id: Ib14fc4e89089b44c6d5be94a4930e3b467283dcf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1616927
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Abhijeet Kandalkar <abhijeet@igalia.com>
Cr-Commit-Position: refs/heads/master@{#661288}
10 files changed