merge mozilla-inbound to mozilla-central. r=merge a=merge

MozReview-Commit-ID: BQuBmVtsdki
This commit is contained in:
Sebastian Hengst
2017-08-29 20:30:41 +02:00
256 changed files with 4156 additions and 3443 deletions

View File

@@ -1340,6 +1340,11 @@ nsHTMLDocument::GetCookie(nsAString& aCookie, ErrorResult& rv)
return;
}
// If the document is a cookie-averse Document... return the empty string.
if (IsCookieAverse()) {
return;
}
// not having a cookie service isn't an error
nsCOMPtr<nsICookieService> service = do_GetService(NS_COOKIESERVICE_CONTRACTID);
if (service) {
@@ -1393,6 +1398,11 @@ nsHTMLDocument::SetCookie(const nsAString& aCookie, ErrorResult& rv)
return;
}
// If the document is a cookie-averse Document... do nothing.
if (IsCookieAverse()) {
return;
}
// not having a cookie service isn't an error
nsCOMPtr<nsICookieService> service = do_GetService(NS_COOKIESERVICE_CONTRACTID);
if (service && mDocumentURI) {
@@ -2340,28 +2350,20 @@ nsContentList*
nsHTMLDocument::GetForms()
{
if (!mForms) {
// Please keep this in sync with nsContentUtils::GenerateStateKey().
mForms = new nsContentList(this, kNameSpaceID_XHTML, nsGkAtoms::form, nsGkAtoms::form);
}
return mForms;
}
static bool MatchFormControls(Element* aElement, int32_t aNamespaceID,
nsIAtom* aAtom, void* aData)
bool
nsHTMLDocument::MatchFormControls(Element* aElement, int32_t aNamespaceID,
nsIAtom* aAtom, void* aData)
{
return aElement->IsNodeOfType(nsIContent::eHTML_FORM_CONTROL);
}
nsContentList*
nsHTMLDocument::GetFormControls()
{
if (!mFormControls) {
mFormControls = new nsContentList(this, MatchFormControls, nullptr, nullptr);
}
return mFormControls;
}
nsresult
nsHTMLDocument::CreateAndAddWyciwygChannel(void)
{