Bug 956382 - Introduce an explicit API to do principal checks with document.domain. r=mrbkap
Bug 956382 - Add AccessCheck::subsumesConsideringDomain and clean up other implementations. r=mrbkap

We now assert that we have a principal when we enter the wrap callback, and we
now have a convenient overload defined in nsIPrincipal.idl.
Bug 956382 - Consider document.domain when computing security wrappers. r=mrbkap
Bug 956382 - Consider document.domain when deciding whether to return contentDocument. r=mrbkap
Bug 956382 - Consider document.domain when doing Location security checks. r=mrbkap
Bug 956382 - Consider document.domain for showModalDialog's dialogArguments and returnValue. r=mrbkap
Bug 956382 - Consider document.domain in wacky postMessage security check. r=mrbkap

We can clean this stuff up in bug 968460.
Bug 956382 - Remove useless security checks in nsDocument. r=mrbkap

In an o-cap world, we'll generally not get references to cross-origin elements.
And even if we do, we'll fail at the binding layer (when we try to CheckedUnwrap
the security wrapper).
Bug 956382 - Ignore document.domain by default. r=mrbkap
Bug 956382 - Hoist nsScriptSecurityManager::CheckSameOriginPrincipal into nsPrincipal::EqualsConsideringDomain. r=mrbkap
Bug 956382 - Remove unused CAPS gunk. r=mrbkap
Bug 956382 - Remove usage of explicit *IgnoringDomain variants. r=mrbkap
Bug 956382 - Remove implementations of *IgnoringDomain variants. r=mrbkap