Bug 968334 Disable content retargeting in messages r=Standard8
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Tue, 21 Apr 2015 00:02:27 +0100
changeset 23066 6bd8cda9d3e3ac89f16ae47f78f306f02589b7a6
parent 23065 f4918fa6f79e52c3e44b9c6c2db612c76fcc442f
child 23067 1def1e9c2d717d0d3b1c10102a3bac45be193f56
push id243
push usermbanner@mozilla.com
push dateMon, 10 Aug 2015 15:55:42 +0000
reviewersStandard8
bugs968334
Bug 968334 Disable content retargeting in messages r=Standard8
mailnews/base/src/nsMsgContentPolicy.cpp
--- a/mailnews/base/src/nsMsgContentPolicy.cpp
+++ b/mailnews/base/src/nsMsgContentPolicy.cpp
@@ -698,23 +698,27 @@ nsresult nsMsgContentPolicy::SetDisableI
   if (itemType != nsIDocShellTreeItem::typeContent) {
     return NS_OK;
   }
 
   if (!isAllowedContent) {
     // Disable JavaScript on message URLs.
     rv = docShell->SetAllowJavascript(false);
     NS_ENSURE_SUCCESS(rv, rv);
+    rv = docShell->SetAllowContentRetargetingOnChildren(false);
+    NS_ENSURE_SUCCESS(rv, rv);
     rv = docShell->SetAllowPlugins(mAllowPlugins);
     NS_ENSURE_SUCCESS(rv, rv);
   }
   else {
     // JavaScript and plugins are allowed on non-message URLs.
     rv = docShell->SetAllowJavascript(true);
     NS_ENSURE_SUCCESS(rv, rv);
+    rv = docShell->SetAllowContentRetargetingOnChildren(true);
+    NS_ENSURE_SUCCESS(rv, rv);
     rv = docShell->SetAllowPlugins(true);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   return NS_OK;
 }
 
 /**