Fix DOCTYPE casing in Elements panel
Fix DOCTYPE casing in Elements panel

DOCTYPE casing is significant for XHTML documents; lowercase
<!doctype html> results in an XML parser error.

Previously, the DevTools Elements panel always displayed
<!DOCTYPE html> as <!doctype html>, even when the casing makes the
difference between the document rendering correctly or just showing
an error.

This patch changes the Elements panel to uppercase “DOCTYPE”, which
is strictly better than lowercasing it as “doctype” since the former
is XHTML-compatible, and for regular HTML documents the casing makes
no difference.

Reference:
https://mathiasbynens.be/notes/xhtml5#doctype

Demo with uppercase DOCTYPE (valid XHTML):
https://mathiasbynens.be/demo/xhtml5

Demo with lowercase DOCTYPE (invalid XHTML):
https://mathiasbynens.be/demo/xhtml5-lowercase-doctype

Bug: chromium:1056588
Change-Id: I5966dcd370ef68feb6396eb83dbf430cc24379ac
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2112361
Commit-Queue: Mathias Bynens <17a2cbc4e33156874a9862b0f530521117e66a3d@chromium.org>
Reviewed-by: Changhao Han <68542faf32f0a558a873c0f094ca9bedb2744bff@chromium.org>

ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend