mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 20:01:50 +00:00

It's expensive to call `nsINode::IsAnyOfHTMLElements` with a lot of arguments due to its recursive calls (in this case, called with 30 arguments). Additionally, the unknown element check with `do_QueryObject` is also expensive. Once we get an `nsHTMLTag`, we can use a `switch` statement. Note that I realized `nsHTMLTag_small` is not defined only on Windows if `nsHTMLTags.h` is included after `rpcndr.h` in the Windows SDK since there is ``` #define small char ``` In the header file. This patch includes the workaround for this issue. Differential Revision: https://phabricator.services.mozilla.com/D184553