Merge the last green changeset of mozilla-inbound to mozilla-central

This commit is contained in:
Ehsan Akhgari 2011-09-08 16:54:20 -04:00
commit 74737499e1
3 changed files with 20 additions and 17 deletions

View File

@ -136,6 +136,8 @@ interface nsIContentPolicy : nsISupports
*/
const unsigned long TYPE_MEDIA = 15;
/* Please update nsContentBlocker when adding new content types. */
//////////////////////////////////////////////////////////////////////
/**

View File

@ -53,7 +53,7 @@
#define BEHAVIOR_NOFOREIGN 3
// From nsIContentPolicy
static const char *kTypeString[NUMBER_OF_TYPES] = {"other",
static const char *kTypeString[] = {"other",
"script",
"image",
"stylesheet",
@ -65,8 +65,12 @@ static const char *kTypeString[NUMBER_OF_TYPES] = {"other",
"ping",
"xmlhttprequest",
"objectsubrequest",
"dtd"};
"dtd",
"font",
"media"};
#define NUMBER_OF_TYPES NS_ARRAY_LENGTH(kTypeString)
PRUint8 nsContentBlocker::mBehaviorPref[NUMBER_OF_TYPES];
NS_IMPL_ISUPPORTS3(nsContentBlocker,
nsIContentPolicy,

View File

@ -46,9 +46,6 @@ class nsIPrefBranch;
////////////////////////////////////////////////////////////////////////////////
// number of permission types in nsIContentPolicy
#define NUMBER_OF_TYPES 13
class nsContentBlocker : public nsIContentPolicy,
public nsIObserver,
public nsSupportsWeakReference
@ -75,7 +72,7 @@ private:
nsCOMPtr<nsIPermissionManager> mPermissionManager;
nsCOMPtr<nsIPrefBranch2> mPrefBranchInternal;
PRUint8 mBehaviorPref[NUMBER_OF_TYPES];
static PRUint8 mBehaviorPref[];
};
#define NS_CONTENTBLOCKER_CID \