Jacek Caban (@jacek) commented about dlls/mshtml/omnavigator.c:
- while(a < b) {
i = (a + b) / 2;
c = wcsicmp(table[i].content_type, content_type);
if(!c) return table[i].doc_type;
if(c > 0) b = i;
else a = i + 1;
- }
- return DOCTYPE_INVALID;
+}
+static const char *const content_type_from_document_type[] = {
- [DOCTYPE_HTML] = "text/html",
- [DOCTYPE_XHTML] = "application/xhtml+xml",
- [DOCTYPE_XML] = "text/xml",
- [DOCTYPE_SVG] = "image/svg+xml",
+};
Why do we need all of that? Could we just lowercase `mimeType` string and pass that to Gecko?