Bug 1447098 part 1. Rename FromContent on various DOM classes to FromNode. r=mystor

MozReview-Commit-ID: 202nkbmkwfR
This commit is contained in:
Boris Zbarsky
2018-03-21 17:39:04 -04:00
parent 522185dfd5
commit 152cd3ba6e
96 changed files with 273 additions and 275 deletions

View File

@@ -1043,7 +1043,7 @@ HTMLImageElement::PictureSourceSrcsetChanged(nsIContent *aSourceNode,
nsCOMPtr<nsIPrincipal> principal;
if (aSourceNode == this) {
principal = mSrcsetTriggeringPrincipal;
} else if (auto* source = HTMLSourceElement::FromContent(aSourceNode)) {
} else if (auto* source = HTMLSourceElement::FromNode(aSourceNode)) {
principal = source->GetSrcsetTriggeringPrincipal();
}
mResponsiveSelector->SetCandidatesFromSourceSet(aNewValue, principal);
@@ -1239,7 +1239,7 @@ HTMLImageElement::TryCreateResponsiveSelector(Element* aSourceElement)
if (!SourceElementMatches(aSourceElement)) {
return false;
}
auto* source = HTMLSourceElement::FromContent(aSourceElement);
auto* source = HTMLSourceElement::FromNode(aSourceElement);
principal = source->GetSrcsetTriggeringPrincipal();
} else if (aSourceElement->IsHTMLElement(nsGkAtoms::img)) {
// Otherwise this is the <img> tag itself