Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1342258 - Refactor SetDomain to IsRegistrableDomainSuffixOfOrEqua…
…lTo r=smaug This commit refactors the SetDomain method in a Document to call a new function IsRegistrableDomainSuffixOfOrEqualTo(), defined in HTML [1]. This commit tries not to rename anything except input variables, so as to remain as clear as possible. It likely should have various variables renamed, but given the author's unfamiliarity with this module, review seems a good time to do that. It's also duplicating comments a little bit; let me know which one(s) you'd like to keep! Note: Commentary on the HTML change is available in the PR [2], and the rationale for this behavior in Web Auentication, where this algorithm will be used, is also recorded [3]. Updates: Refactored two new protected methods to avoid code duplication. [1] https://html.spec.whatwg.org/multipage/browsers.html#is-a-registrable-domain-suffix-of-or-is-equal-to [2] whatwg/html#2365 [3] w3ctag/design-reviews#97 (comment) MozReview-Commit-ID: 4Dr8yOMdhez UltraBlame original commit: ffa2f50d49ce0356bbf02ea0940060283dcc007c
- Loading branch information