Bug 1108887 - Backout part 3 and part 4 of bug 949435 (SVG iframe). r=birtles sr=bzbarsky
authorRobert Longson <longsonr@gmail.com>
Tue, 10 Feb 2015 09:14:19 +0000
changeset 228261 ab8180c889da1571e17f107577ab6697228dcfae
parent 228260 f83176aaffe9e076c21d6617ae6ff47e165bf3b0
child 228262 9af435afa2b649305f6576f42eb22a25a83a7257
push id55381
push userlongsonr@gmail.com
push dateTue, 10 Feb 2015 09:14:51 +0000
treeherdermozilla-inbound@ab8180c889da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles, bzbarsky
bugs1108887, 949435
milestone38.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 1108887 - Backout part 3 and part 4 of bug 949435 (SVG iframe). r=birtles sr=bzbarsky
dom/base/nsFrameLoader.cpp
dom/svg/SVGIFrameElement.cpp
dom/svg/SVGIFrameElement.h
dom/svg/SVGTagList.h
dom/svg/moz.build
dom/webidl/SVGIFrameElement.webidl
dom/webidl/moz.build
modules/libpref/init/all.js
--- a/dom/base/nsFrameLoader.cpp
+++ b/dom/base/nsFrameLoader.cpp
@@ -85,17 +85,16 @@
 #include "mozilla/dom/Element.h"
 #include "mozilla/jsipc/CrossProcessObjectWrappers.h"
 #include "mozilla/layout/RenderFrameParent.h"
 #include "nsIAppsService.h"
 #include "GeckoProfiler.h"
 
 #include "jsapi.h"
 #include "mozilla/dom/HTMLIFrameElement.h"
-#include "mozilla/dom/SVGIFrameElement.h"
 #include "nsSandboxFlags.h"
 #include "mozilla/layers/CompositorChild.h"
 
 #include "mozilla/dom/StructuredCloneUtils.h"
 
 #ifdef MOZ_XUL
 #include "nsXULPopupManager.h"
 #endif
@@ -206,18 +205,17 @@ nsFrameLoader::Create(Element* aOwner, b
 
 NS_IMETHODIMP
 nsFrameLoader::LoadFrame()
 {
   NS_ENSURE_TRUE(mOwnerContent, NS_ERROR_NOT_INITIALIZED);
 
   nsAutoString src;
 
-  bool isSrcdoc = (mOwnerContent->IsHTML(nsGkAtoms::iframe) ||
-                   mOwnerContent->IsSVG(nsGkAtoms::iframe)) &&
+  bool isSrcdoc = mOwnerContent->IsHTML(nsGkAtoms::iframe) &&
                   mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::srcdoc);
   if (isSrcdoc) {
     src.AssignLiteral("about:srcdoc");
   }
   else {
     GetURL(src);
 
     src.Trim(" \t\n\r");
@@ -410,18 +408,17 @@ nsFrameLoader::ReallyStartLoadingInterna
   // We'll use our principal, not that of the document loaded inside us.  This
   // is very important; needed to prevent XSS attacks on documents loaded in
   // subframes!
   loadInfo->SetOwner(mOwnerContent->NodePrincipal());
 
   nsCOMPtr<nsIURI> referrer;
   
   nsAutoString srcdoc;
-  bool isSrcdoc = (mOwnerContent->IsHTML(nsGkAtoms::iframe) ||
-                   mOwnerContent->IsSVG(nsGkAtoms::iframe)) &&
+  bool isSrcdoc = mOwnerContent->IsHTML(nsGkAtoms::iframe) &&
                   mOwnerContent->GetAttr(kNameSpaceID_None, nsGkAtoms::srcdoc,
                                          srcdoc);
 
   if (isSrcdoc) {
     nsAutoString referrerStr;
     mOwnerContent->OwnerDoc()->GetReferrer(referrerStr);
     rv = NS_NewURI(getter_AddRefs(referrer), referrerStr);
 
@@ -1652,40 +1649,34 @@ nsFrameLoader::MaybeCreateDocShell()
   if (mIsPrerendered) {
     nsresult rv = mDocShell->SetIsPrerendered(true);
     NS_ENSURE_SUCCESS(rv,rv);
   }
 
   // Apply sandbox flags even if our owner is not an iframe, as this copies
   // flags from our owning content's owning document.
   uint32_t sandboxFlags = 0;
-  if (!mOwnerContent->IsSVG(nsGkAtoms::iframe)) {
-    HTMLIFrameElement* iframe = HTMLIFrameElement::FromContent(mOwnerContent);
-    if (iframe) {
-      sandboxFlags = iframe->GetSandboxFlags();
-    }
-  } else {
-    SVGIFrameElement* iframe = static_cast<SVGIFrameElement*>(mOwnerContent);
+  HTMLIFrameElement* iframe = HTMLIFrameElement::FromContent(mOwnerContent);
+  if (iframe) {
     sandboxFlags = iframe->GetSandboxFlags();
   }
   ApplySandboxFlags(sandboxFlags);
 
   if (!mNetworkCreated) {
     if (mDocShell) {
       mDocShell->SetCreatedDynamically(true);
     }
   }
 
   // Get the frame name and tell the docshell about it.
   NS_ENSURE_TRUE(mDocShell, NS_ERROR_FAILURE);
   nsAutoString frameName;
 
   int32_t namespaceID = mOwnerContent->GetNameSpaceID();
-  if ((namespaceID == kNameSpaceID_XHTML || namespaceID == kNameSpaceID_SVG)
-      && !mOwnerContent->IsInHTMLDocument()) {
+  if (namespaceID == kNameSpaceID_XHTML && !mOwnerContent->IsInHTMLDocument()) {
     mOwnerContent->GetAttr(kNameSpaceID_None, nsGkAtoms::id, frameName);
   } else {
     mOwnerContent->GetAttr(kNameSpaceID_None, nsGkAtoms::name, frameName);
     // XXX if no NAME then use ID, after a transition period this will be
     // changed so that XUL only uses ID too (bug 254284).
     if (frameName.IsEmpty() && namespaceID == kNameSpaceID_XUL) {
       mOwnerContent->GetAttr(kNameSpaceID_None, nsGkAtoms::id, frameName);
     }
deleted file mode 100644
--- a/dom/svg/SVGIFrameElement.cpp
+++ /dev/null
@@ -1,343 +0,0 @@
-/* -*- 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 "SVGIFrameElement.h"
-
-#include "GeckoProfiler.h"
-#include "mozilla/ArrayUtils.h"
-#include "nsCOMPtr.h"
-#include "nsGkAtoms.h"
-#include "mozilla/dom/SVGDocumentBinding.h"
-#include "mozilla/dom/SVGIFrameElementBinding.h"
-#include "mozilla/dom/SVGMatrix.h"
-#include "mozilla/dom/SVGSVGElement.h"
-#include "mozilla/Preferences.h"
-#include "nsStyleConsts.h"
-
-NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT_CHECK_PARSER(IFrame)
-
-namespace mozilla {
-namespace dom {
-
-JSObject*
-SVGIFrameElement::WrapNode(JSContext *aCx)
-{
-  return SVGIFrameElementBinding::Wrap(aCx, this);
-}
-  
-//--------------------- IFrame ------------------------
-
-nsSVGElement::LengthInfo SVGIFrameElement::sLengthInfo[4] =
-{
-  { &nsGkAtoms::x, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
-  { &nsGkAtoms::y, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
-  { &nsGkAtoms::width, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
-  { &nsGkAtoms::height, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y }
-};
-
-//----------------------------------------------------------------------
-// nsISupports methods
-NS_IMPL_ISUPPORTS_INHERITED(SVGIFrameElement, SVGIFrameElementBase,
-                            nsIFrameLoaderOwner,
-                            nsIDOMNode, nsIDOMElement,
-                            nsIDOMSVGElement)
-//----------------------------------------------------------------------
-// Implementation
-
-SVGIFrameElement::SVGIFrameElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
-                                   FromParser aFromParser)
-  : SVGIFrameElementBase(aNodeInfo)
-  , nsElementFrameLoaderOwner(aFromParser)
-{
-}
-
-SVGIFrameElement::~SVGIFrameElement()
-{
-}
-
-//----------------------------------------------------------------------
-// nsSVGElement methods
-
-/* virtual */ gfxMatrix
-SVGIFrameElement::PrependLocalTransformsTo(const gfxMatrix &aMatrix,
-                                           TransformTypes aWhich) const
-{
-  // 'transform' attribute:
-  gfxMatrix fromUserSpace =
-    SVGGraphicsElement::PrependLocalTransformsTo(aMatrix, aWhich);
-  if (aWhich == eUserSpaceToParent) {
-    return fromUserSpace;
-  }
-  // our 'x' and 'y' attributes:
-  float x, y;
-  const_cast<SVGIFrameElement*>(this)->
-    GetAnimatedLengthValues(&x, &y, nullptr);
-  gfxMatrix toUserSpace = gfxMatrix::Translation(x, y);
-  if (aWhich == eChildToUserSpace) {
-    return toUserSpace;
-  }
-  MOZ_ASSERT(aWhich == eAllTransforms, "Unknown TransformTypes");
-  return toUserSpace * fromUserSpace;
-}
-  
-  
-//----------------------------------------------------------------------
-// nsIDOMNode methods
-
-nsresult
-SVGIFrameElement::Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const
-{
-  *aResult = nullptr;
-  already_AddRefed<mozilla::dom::NodeInfo> ni = nsRefPtr<mozilla::dom::NodeInfo>(aNodeInfo).forget();
-  SVGIFrameElement *it = new SVGIFrameElement(ni, NOT_FROM_PARSER);
-
-  nsCOMPtr<nsINode> kungFuDeathGrip = it;
-  nsresult rv1 = it->Init();
-  nsresult rv2 = const_cast<SVGIFrameElement*>(this)->CopyInnerTo(it);
-  if (NS_SUCCEEDED(rv1) && NS_SUCCEEDED(rv2)) {
-    kungFuDeathGrip.swap(*aResult);
-  }
-
-  return NS_FAILED(rv1) ? rv1 : rv2;
-}
-
-//----------------------------------------------------------------------
-// nsSVGElement methods
-  
-nsSVGElement::LengthAttributesInfo
-SVGIFrameElement::GetLengthInfo()
-{
-  return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
-                              ArrayLength(sLengthInfo));
-}
-
-SVGAnimatedPreserveAspectRatio *
-SVGIFrameElement::GetPreserveAspectRatio()
-{
-  return &mPreserveAspectRatio;
-}
-
-//----------------------------------------------------------------------
-// nsIDOMSVGIFrameElement methods:
-
-already_AddRefed<SVGAnimatedLength>
-SVGIFrameElement::X()
-{
-  return mLengthAttributes[ATTR_X].ToDOMAnimatedLength(this);
-}
-
-already_AddRefed<SVGAnimatedLength>
-SVGIFrameElement::Y()
-{
-  return mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(this);
-}
-
-already_AddRefed<SVGAnimatedLength>
-SVGIFrameElement::Width()
-{
-  return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this);
-}
-
-already_AddRefed<SVGAnimatedLength>
-SVGIFrameElement::Height()
-{
-  return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this);
-}
-
-already_AddRefed<DOMSVGAnimatedPreserveAspectRatio>
-SVGIFrameElement::PreserveAspectRatio()
-{
-  return mPreserveAspectRatio.ToDOMAnimatedPreserveAspectRatio(this);
-}
-
-void
-SVGIFrameElement::GetName(DOMString& name)
-{
-  GetAttr(kNameSpaceID_None, nsGkAtoms::name, name);
-}
-
-void
-SVGIFrameElement::GetSrc(DOMString& src)
-{
-  GetAttr(kNameSpaceID_None, nsGkAtoms::src, src);
-}
-
-void
-SVGIFrameElement::GetSrcdoc(DOMString& srcdoc)
-{
-  GetAttr(kNameSpaceID_None, nsGkAtoms::srcdoc, srcdoc);
-}
-
-nsDOMSettableTokenList*
-SVGIFrameElement::Sandbox()
-{
-  return GetTokenList(nsGkAtoms::sandbox);
-}
-
-bool
-SVGIFrameElement::ParseAttribute(int32_t aNamespaceID,
-                                 nsIAtom* aAttribute,
-                                 const nsAString& aValue,
-                                 nsAttrValue& aResult)
-{
-  if (aNamespaceID == kNameSpaceID_None) {
-    if (aAttribute == nsGkAtoms::sandbox) {
-      aResult.ParseAtomArray(aValue);
-      return true;
-    }
-  }
-  return SVGIFrameElementBase::ParseAttribute(aNamespaceID, aAttribute,
-                                              aValue, aResult);
-}
-
-nsresult
-SVGIFrameElement::SetAttr(int32_t aNameSpaceID, nsIAtom* aName,
-                          nsIAtom* aPrefix, const nsAString& aValue,
-                          bool aNotify)
-{
-  nsresult rv = nsSVGElement::SetAttr(aNameSpaceID, aName, aPrefix,
-                                      aValue, aNotify);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  if (aNameSpaceID == kNameSpaceID_None) {
-    if (aName == nsGkAtoms::src &&
-        !HasAttr(kNameSpaceID_None,nsGkAtoms::srcdoc)) {
-      // Don't propagate error here. The attribute was successfully set, that's
-      // what we should reflect.
-      LoadSrc();
-    }
-    if (aName == nsGkAtoms::srcdoc) {
-      // Don't propagate error here. The attribute was successfully set, that's
-      // what we should reflect.
-      LoadSrc();
-    }
-  }
-  return NS_OK;
-}
-
-nsresult
-SVGIFrameElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
-                               const nsAttrValue* aValue,
-                               bool aNotify)
-{
-  if (aNameSpaceID == kNameSpaceID_None) {
-    if (aName == nsGkAtoms::sandbox && mFrameLoader) {
-      // If we have an nsFrameLoader, apply the new sandbox flags.
-      // Since this is called after the setter, the sandbox flags have
-      // alreay been updated.
-      mFrameLoader->ApplySandboxFlags(GetSandboxFlags());
-    }
-  }
-  return nsSVGElement::AfterSetAttr(aNameSpaceID, aName, aValue, aNotify);
-}
-
-nsresult
-SVGIFrameElement::UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute,
-                            bool aNotify)
-{
-  // Invoke on the superclass.
-  nsresult rv = nsSVGElement::UnsetAttr(aNameSpaceID, aAttribute, aNotify);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  if (aNameSpaceID == kNameSpaceID_None) {
-    if (aAttribute == nsGkAtoms::srcdoc) {
-      // Fall back to the src attribute, if any
-      LoadSrc();
-    }
-  }
-
-  return NS_OK;
-}
-
-uint32_t
-SVGIFrameElement::GetSandboxFlags()
-{
-  const nsAttrValue* sandboxAttr = GetParsedAttr(nsGkAtoms::sandbox);
-  return nsContentUtils::ParseSandboxAttributeToFlags(sandboxAttr);
-}
-
-nsresult
-SVGIFrameElement::BindToTree(nsIDocument* aDocument,
-                             nsIContent* aParent,
-                             nsIContent* aBindingParent,
-                             bool aCompileEventHandlers)
-{
-  nsresult rv = nsSVGElement::BindToTree(aDocument, aParent,
-                                         aBindingParent,
-                                         aCompileEventHandlers);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  if (aDocument) {
-    NS_ASSERTION(!nsContentUtils::IsSafeToRunScript(),
-                 "Missing a script blocker!");
-
-    PROFILER_LABEL("SVGIFrameElement", "BindToTree",
-      js::ProfileEntry::Category::OTHER);
-
-    // We're in a document now.  Kick off the frame load.
-    LoadSrc();
-
-    if (HasAttr(kNameSpaceID_None, nsGkAtoms::sandbox)) {
-      if (mFrameLoader) {
-        mFrameLoader->ApplySandboxFlags(GetSandboxFlags());
-      }
-    }
-  }
-
-  // We're now in document and scripts may move us, so clear
-  // the mNetworkCreated flag.
-  mNetworkCreated = false;
-  return rv;
-}
-
-void
-SVGIFrameElement::UnbindFromTree(bool aDeep, bool aNullParent)
-{
-  if (mFrameLoader) {
-    // This iframe is being taken out of the document, destroy the
-    // iframe's frame loader (doing that will tear down the window in
-    // this iframe).
-    // XXXbz we really want to only partially destroy the frame
-    // loader... we don't want to tear down the docshell.  Food for
-    // later bug.
-    mFrameLoader->Destroy();
-    mFrameLoader = nullptr;
-  }
-
-  nsSVGElement::UnbindFromTree(aDeep, aNullParent);
-}
-
-void
-SVGIFrameElement::DestroyContent()
-{
-  if (mFrameLoader) {
-    mFrameLoader->Destroy();
-    mFrameLoader = nullptr;
-  }
-
-  nsSVGElement::DestroyContent();
-}
-
-nsresult
-SVGIFrameElement::CopyInnerTo(Element* aDest)
-{
-  nsresult rv = nsSVGElement::CopyInnerTo(aDest);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  nsIDocument* doc = aDest->OwnerDoc();
-  if (doc->IsStaticDocument() && mFrameLoader) {
-    SVGIFrameElement* dest =
-      static_cast<SVGIFrameElement*>(aDest);
-    nsFrameLoader* fl = nsFrameLoader::Create(dest, false);
-    NS_ENSURE_STATE(fl);
-    dest->mFrameLoader = fl;
-    static_cast<nsFrameLoader*>(mFrameLoader.get())->CreateStaticClone(fl);
-  }
-
-  return rv;
-}
-
-} // namespace dom
-} // namespace mozilla
deleted file mode 100644
--- a/dom/svg/SVGIFrameElement.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- 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 "mozilla/dom/DOMString.h"
-#include "mozilla/dom/FromParser.h"
-#include "mozilla/dom/SVGGraphicsElement.h"
-#include "nsContentUtils.h"
-#include "nsDOMSettableTokenList.h"
-#include "nsFrameLoader.h"
-#include "nsElementFrameLoaderOwner.h"
-#include "nsIDOMDocument.h"
-#include "nsIDOMEventListener.h"
-#include "nsIFrameLoader.h"
-#include "nsIWebNavigation.h"
-#include "nsSVGElement.h"
-#include "nsSVGLength2.h"
-#include "SVGAnimatedPreserveAspectRatio.h"
-
-nsresult NS_NewSVGIFrameElement(nsIContent **aResult,
-                                already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
-                                mozilla::dom::FromParser aFromParser);
-
-typedef mozilla::dom::SVGGraphicsElement SVGIFrameElementBase;
-
-class nsIDocument;
-class nsSVGIFrameFrame;
-
-namespace mozilla {
-namespace dom {
-class DOMSVGAnimatedPreserveAspectRatio;
-
-class SVGIFrameElement MOZ_FINAL : public SVGIFrameElementBase,
-                                   public nsElementFrameLoaderOwner
-{
-  friend class ::nsSVGIFrameFrame;
-  friend nsresult (::NS_NewSVGIFrameElement(nsIContent **aResult,
-                                  already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
-                                  mozilla::dom::FromParser aFromParser));
-
-  SVGIFrameElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
-                   mozilla::dom::FromParser aFromParser);
-  virtual JSObject* WrapNode(JSContext *aCx) MOZ_OVERRIDE;
-
-  ~SVGIFrameElement();
-
-public:
-  // interface
-  NS_DECL_ISUPPORTS_INHERITED
-
-  // nsSVGElement specializations:
-  virtual gfxMatrix PrependLocalTransformsTo(const gfxMatrix &aMatrix,
-                                             TransformTypes aWhich = eAllTransforms) const MOZ_OVERRIDE;
-
-  // nsIContent
-  virtual bool ParseAttribute(int32_t aNamespaceID,
-                              nsIAtom* aAttribute,
-                              const nsAString& aValue,
-                              nsAttrValue& aResult) MOZ_OVERRIDE;
-  virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
-                              nsIContent* aBindingParent,
-                              bool aCompileEventHandlers) MOZ_OVERRIDE;
-  virtual void UnbindFromTree(bool aDeep = true,
-                              bool aNullParent = true) MOZ_OVERRIDE;
-  virtual nsresult SetAttr(int32_t aNameSpaceID, nsIAtom* aName,
-                           nsIAtom* aPrefix, const nsAString& aValue,
-                           bool aNotify) MOZ_OVERRIDE;
-  virtual nsresult AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
-                                const nsAttrValue* aValue,
-                                bool aNotify) MOZ_OVERRIDE;
-  virtual nsresult UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute,
-                             bool aNotify) MOZ_OVERRIDE;
-
-  virtual void DestroyContent() MOZ_OVERRIDE;
-  nsresult CopyInnerTo(mozilla::dom::Element* aDest);
-  virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
-
-  // WebIDL
-  already_AddRefed<SVGAnimatedLength> X();
-  already_AddRefed<SVGAnimatedLength> Y();
-  already_AddRefed<SVGAnimatedLength> Width();
-  already_AddRefed<SVGAnimatedLength> Height();
-  already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
-  void GetName(DOMString& name);
-  void GetSrc(DOMString& src);
-  void GetSrcdoc(DOMString& srcdoc);
-  nsDOMSettableTokenList* Sandbox();
-  using nsElementFrameLoaderOwner::GetContentDocument;
-  using nsElementFrameLoaderOwner::GetContentWindow;
-
-  // Parses a sandbox attribute and converts it to the set of flags used internally.
-  // Returns 0 if there isn't the attribute.
-  uint32_t GetSandboxFlags();
-
-private:
-  virtual LengthAttributesInfo GetLengthInfo() MOZ_OVERRIDE;
-  virtual SVGAnimatedPreserveAspectRatio *GetPreserveAspectRatio() MOZ_OVERRIDE;
-  virtual mozilla::dom::Element* ThisFrameElement() MOZ_OVERRIDE
-  {
-    return this;
-  }
-
-  enum { ATTR_X, ATTR_Y, ATTR_WIDTH, ATTR_HEIGHT };
-  nsSVGLength2 mLengthAttributes[4];
-  static LengthInfo sLengthInfo[4];
-
-  SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
-};
-
-} // namespace dom
-} // namespace mozilla
--- a/dom/svg/SVGTagList.h
+++ b/dom/svg/SVGTagList.h
@@ -60,17 +60,16 @@ SVG_TAG(feOffset, FEOffset)
 SVG_TAG(fePointLight, FEPointLight)
 SVG_TAG(feSpecularLighting, FESpecularLighting)
 SVG_TAG(feSpotLight, FESpotLight)
 SVG_TAG(feTile, FETile)
 SVG_TAG(feTurbulence, FETurbulence)
 SVG_TAG(filter, Filter)
 SVG_TAG(foreignObject, ForeignObject)
 SVG_TAG(g, G)
-SVG_FROM_PARSER_TAG(iframe, IFrame)
 SVG_TAG(image, Image)
 SVG_TAG(line, Line)
 SVG_TAG(linearGradient, LinearGradient)
 SVG_TAG(marker, Marker)
 SVG_TAG(mask, Mask)
 SVG_TAG(metadata, Metadata)
 SVG_TAG(mpath, MPath)
 SVG_TAG(path, Path)
--- a/dom/svg/moz.build
+++ b/dom/svg/moz.build
@@ -61,17 +61,16 @@ EXPORTS.mozilla.dom += [
     'SVGFESpotLightElement.h',
     'SVGFETileElement.h',
     'SVGFETurbulenceElement.h',
     'SVGFilterElement.h',
     'SVGForeignObjectElement.h',
     'SVGGElement.h',
     'SVGGradientElement.h',
     'SVGGraphicsElement.h',
-    'SVGIFrameElement.h',
     'SVGImageElement.h',
     'SVGIRect.h',
     'SVGLineElement.h',
     'SVGMarkerElement.h',
     'SVGMaskElement.h',
     'SVGMatrix.h',
     'SVGMetadataElement.h',
     'SVGMPathElement.h',
@@ -188,17 +187,16 @@ UNIFIED_SOURCES += [
     'SVGFETileElement.cpp',
     'SVGFETurbulenceElement.cpp',
     'SVGFilterElement.cpp',
     'SVGForeignObjectElement.cpp',
     'SVGFragmentIdentifier.cpp',
     'SVGGElement.cpp',
     'SVGGradientElement.cpp',
     'SVGGraphicsElement.cpp',
-    'SVGIFrameElement.cpp',
     'SVGImageElement.cpp',
     'SVGIntegerPairSMILType.cpp',
     'SVGLength.cpp',
     'SVGLengthList.cpp',
     'SVGLengthListSMILType.cpp',
     'SVGLineElement.cpp',
     'SVGMarkerElement.cpp',
     'SVGMaskElement.cpp',
deleted file mode 100644
--- a/dom/webidl/SVGIFrameElement.webidl
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: IDL; 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/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/Graphics/SVG/WG/wiki/Proposals/IFrame_Like_Syntax#5.12.14_Interface_SVGIFrameElement
- * but based
- * http://www.whatwg.org/specs/web-apps/current-work/#the-iframe-element
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- * Copyright © 2013 KDDI, Inc.
- */
-
-[Pref="svg.svg-iframe.enabled"]
-interface SVGIFrameElement : SVGGraphicsElement {
-  [Constant]
-  readonly attribute SVGAnimatedLength x;
-  [Constant]
-  readonly attribute SVGAnimatedLength y;
-  [Constant]
-  readonly attribute SVGAnimatedLength width;
-  [Constant]
-  readonly attribute SVGAnimatedLength height;
-  [Constant]
-  readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
-
-  [Constant]
-  readonly attribute DOMString name;
-  [Constant]
-  readonly attribute DOMString src;
-  [Constant]
-  readonly attribute DOMString srcdoc;
-  [PutForwards=value]
-  readonly attribute DOMSettableTokenList sandbox;
-  
-  // not implemented yet
-  //[Constant]
-  //readonly attribute SVGAnimatedBoolean seamless;
-
-  readonly attribute Document? contentDocument;
-  readonly attribute WindowProxy? contentWindow;
-  // not implemented yet
-  //readonly attribute SVGAnimatedBoolean postpone;
-};
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -442,17 +442,16 @@ WEBIDL_FILES = [
     'SVGFETurbulenceElement.webidl',
     'SVGFilterElement.webidl',
     'SVGFilterPrimitiveStandardAttributes.webidl',
     'SVGFitToViewBox.webidl',
     'SVGForeignObjectElement.webidl',
     'SVGGElement.webidl',
     'SVGGradientElement.webidl',
     'SVGGraphicsElement.webidl',
-    'SVGIFrameElement.webidl',
     'SVGImageElement.webidl',
     'SVGLength.webidl',
     'SVGLengthList.webidl',
     'SVGLinearGradientElement.webidl',
     'SVGLineElement.webidl',
     'SVGMarkerElement.webidl',
     'SVGMaskElement.webidl',
     'SVGMatrix.webidl',
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -2394,22 +2394,16 @@ pref("svg.display-lists.hit-testing.enab
 pref("svg.display-lists.painting.enabled", true);
 
 // Is support for the SVG 2 paint-order property enabled?
 pref("svg.paint-order.enabled", true);
 
 // Is support for the <marker orient="auto-start-reverse"> feature enabled?
 pref("svg.marker-improvements.enabled", true);
 
-#ifdef RELEASE_BUILD
-pref("svg.svg-iframe.enabled", false);
-#else
-pref("svg.svg-iframe.enabled", false);
-#endif
-
 // Is support for the new getBBox method from SVG 2 enabled?
 // See https://svgwg.org/svg2-draft/single-page.html#types-SVGBoundingBoxOptions
 pref("svg.new-getBBox.enabled", false);
 
 // Default font types and sizes by locale
 pref("font.default.ar", "sans-serif");
 pref("font.minimum-size.ar", 0);
 pref("font.size.variable.ar", 16);