For text controls, the start and end of the container is the same often times, but because the nsContentUtils API doesn't get inlines, nsRange::GetCommonAncestor() shows up in profiles of bug 1346723. GetCommonAncestorInternal() is a template, so we already have two copies of this check: https://searchfox.org/mozilla-central/rev/09c065976fd4f18d4ad764d7cb4bbc684bf56714/dom/base/nsContentUtils.cpp#2709. So we may as well inline them in the header to get them to the caller side instead so that we make the common case for these situations faster.
Created attachment 8891597 [details] [diff] [review] Inline the check for common argument in the callers of GetCommonAncestorInternal()
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/76abbe45dd0a Inline the check for common argument in the callers of GetCommonAncestorInternal(); r=baku