Remove unwanted ToElementOrNull and use To<Element> in place of ToElementOrDie

This CL removes the unused definition of ToElementOrNull as all the
occurrences of ToElementOrNull() is already replaced with
DynamicTo<Element>.

This CL uses To<Element> and CHECK() in place of ToElementOrDie() and
removes subsequent definition of ToElementOrDie().

Bug: 891908
Change-Id: I41328a58a8540aa1a981ed3f5609585e92865001
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1692761
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Abhijeet Kandalkar <abhijeet@igalia.com>
Cr-Commit-Position: refs/heads/master@{#676545}
3 files changed