Bug 833009 - Remove "nsContentUtils.h" inclusions from headers in content/html/. r=Ms2ger
authorMounir Lamouri <mounir.lamouri@gmail.com>
Wed, 23 Jan 2013 19:39:03 +0000
changeset 130446 00a33fee3c87b9615c2f18075f70bbfc2a08d4c4
parent 130445 a2ae479d35c694285074780bd85773e0e00537af
child 130447 cd11feb558732c53b19f3b5cc4ed21cb8cac9d48
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger
bugs833009
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 833009 - Remove "nsContentUtils.h" inclusions from headers in content/html/. r=Ms2ger
content/html/content/src/nsGenericHTMLElement.h
content/html/content/src/nsHTMLIFrameElement.cpp
content/html/content/src/nsHTMLIFrameElement.h
--- a/content/html/content/src/nsGenericHTMLElement.h
+++ b/content/html/content/src/nsGenericHTMLElement.h
@@ -8,17 +8,16 @@
 
 #include "nsMappedAttributeElement.h"
 #include "nsIDOMHTMLElement.h"
 #include "nsINameSpaceManager.h"  // for kNameSpaceID_None
 #include "nsIFormControl.h"
 #include "nsGkAtoms.h"
 #include "nsContentCreatorFunctions.h"
 #include "mozilla/ErrorResult.h"
-#include "nsContentUtils.h"
 #include "nsIDOMHTMLMenuElement.h"
 #include "mozilla/dom/ValidityState.h"
 
 class nsIDOMAttr;
 class nsIDOMEventListener;
 class nsIDOMNodeList;
 class nsIFrame;
 class nsIStyleRule;
--- a/content/html/content/src/nsHTMLIFrameElement.cpp
+++ b/content/html/content/src/nsHTMLIFrameElement.cpp
@@ -7,16 +7,17 @@
 
 #include "nsHTMLIFrameElement.h"
 #include "nsIDOMSVGDocument.h"
 #include "nsMappedAttributes.h"
 #include "nsAttrValueInlines.h"
 #include "nsError.h"
 #include "nsRuleData.h"
 #include "nsStyleConsts.h"
+#include "nsContentUtils.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(IFrame)
 
 nsHTMLIFrameElement::nsHTMLIFrameElement(already_AddRefed<nsINodeInfo> aNodeInfo,
                                          FromParser aFromParser)
@@ -228,10 +229,22 @@ nsHTMLIFrameElement::AfterSetAttr(int32_
             strValue);
         }   
         docshell->SetSandboxFlags(newFlags);
       }
     }
   }
   return nsGenericHTMLElement::AfterSetAttr(aNameSpaceID, aName, aValue,
                                             aNotify);
+}
 
+uint32_t
+nsHTMLIFrameElement::GetSandboxFlags()
+{
+  nsAutoString sandboxAttr;
+
+  if (GetAttr(kNameSpaceID_None, nsGkAtoms::sandbox, sandboxAttr)) {
+    return nsContentUtils::ParseSandboxAttributeToFlags(sandboxAttr);
+  }
+
+  // No sandbox attribute, no sandbox flags.
+  return 0;
 }
--- a/content/html/content/src/nsHTMLIFrameElement.h
+++ b/content/html/content/src/nsHTMLIFrameElement.h
@@ -1,17 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsGenericHTMLFrameElement.h"
 #include "nsIDOMHTMLIFrameElement.h"
 #include "nsIDOMGetSVGDocument.h"
-#include "nsContentUtils.h"
 
 class nsHTMLIFrameElement : public nsGenericHTMLFrameElement
                           , public nsIDOMHTMLIFrameElement
                           , public nsIDOMGetSVGDocument
 {
 public:
   nsHTMLIFrameElement(already_AddRefed<nsINodeInfo> aNodeInfo,
                       mozilla::dom::FromParser aFromParser = mozilla::dom::NOT_FROM_PARSER);
@@ -48,24 +47,14 @@ public:
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
   virtual nsXPCClassInfo* GetClassInfo();
   virtual nsIDOMNode* AsDOMNode() { return this; }
 
   virtual nsresult AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
                                 const nsAttrValue* aValue,
                                 bool aNotify);
 
-  uint32_t GetSandboxFlags()
-  {
-    nsAutoString sandboxAttr;
-
-    if (GetAttr(kNameSpaceID_None, nsGkAtoms::sandbox, sandboxAttr)) {
-      return nsContentUtils::ParseSandboxAttributeToFlags(sandboxAttr);
-    }
-
-    // No sandbox attribute, no sandbox flags.
-    return 0;
-  }
+  uint32_t GetSandboxFlags();
 
 protected:
   virtual void GetItemValueText(nsAString& text);
   virtual void SetItemValueText(const nsAString& text);
 };