Bug 1398074 - Add youtube-nocookie.com to domain list for HTML5 rewrites; r=cpeterson
MozReview-Commit-ID: Dc1gZTMu5O4
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -1380,17 +1380,18 @@ nsObjectLoadingContent::MaybeRewriteYout
bool ok = NS_SUCCEEDED(tldService->GetBaseDomain(aURI, 0, currentBaseDomain));
if (!ok) {
// Data URIs (commonly used for things like svg embeds) won't parse
// correctly, so just fail silently here.
return;
}
// See if URL is referencing youtube
- if (!currentBaseDomain.EqualsLiteral("youtube.com")) {
+ if (!currentBaseDomain.EqualsLiteral("youtube.com") &&
+ !currentBaseDomain.EqualsLiteral("youtube-nocookie.com")) {
return;
}
// We should only rewrite URLs with paths starting with "/v/", as we shouldn't
// touch object nodes with "/embed/" urls that already do that right thing.
nsAutoCString path;
aURI->GetPathQueryRef(path);
if (!StringBeginsWith(path, NS_LITERAL_CSTRING("/v/"))) {