mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 11:58:55 +00:00

There are two bugs in this function, first the function doesn't do the `is not connected` check correctly as it supposes to use `IsInComposed()` but rather `IsInUnComposed()`. Second, it doesn't get the root of the element correctly. Also this patch converts the function be static so that it can be reused. Differential Revision: https://phabricator.services.mozilla.com/D151081