Bug 1455763 - Remove SVGViewElement.viewTarget r=heycam r=mystor
authorRobert Longson <longsonr@gmail.com>
Wed, 25 Apr 2018 22:44:31 +0100
changeset 415678 6cd19d2e0138d698749d329088659ab4d4a9810c
parent 415677 37fc9c4f9a214a5bc242cd6ca0eec6a02d608035
child 415679 ee36b000e3adae7acc7976372eeed1f1ca8db6ef
push id33901
push userapavel@mozilla.com
push dateThu, 26 Apr 2018 06:05:37 +0000
treeherdermozilla-central@b62ad926cf2a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam, mystor
bugs1455763
milestone61.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 1455763 - Remove SVGViewElement.viewTarget r=heycam r=mystor
dom/svg/SVGFragmentIdentifier.cpp
dom/svg/SVGViewElement.cpp
dom/svg/SVGViewElement.h
dom/webidl/SVGViewElement.webidl
layout/svg/SVGViewFrame.cpp
testing/web-platform/meta/svg/historical.html.ini
--- a/dom/svg/SVGFragmentIdentifier.cpp
+++ b/dom/svg/SVGFragmentIdentifier.cpp
@@ -105,17 +105,16 @@ public:
       }
       nsAtom* valAtom = NS_GetStaticAtom(aParams);
       if (!valAtom ||
           NS_FAILED(mSVGView->mZoomAndPan.SetBaseValueAtom(
                       valAtom, mRoot))) {
         return false;
       }
     } else {
-      // We don't support viewTarget currently
       return false;
     }
     return true;
   }
 
   void SetValid() {
     mValid = true;
   }
--- a/dom/svg/SVGViewElement.cpp
+++ b/dom/svg/SVGViewElement.cpp
@@ -1,36 +1,30 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/SVGViewElement.h"
 #include "mozilla/dom/SVGViewElementBinding.h"
-#include "DOMSVGStringList.h"
 
 NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(View)
 
 namespace mozilla {
 namespace dom {
 
 using namespace SVGViewElementBinding;
 
 JSObject*
 SVGViewElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
 {
   return SVGViewElementBinding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::StringListInfo SVGViewElement::sStringListInfo[1] =
-{
-  { &nsGkAtoms::viewTarget }
-};
-
 nsSVGEnumMapping SVGViewElement::sZoomAndPanMap[] = {
   {&nsGkAtoms::disable, SVG_ZOOMANDPAN_DISABLE},
   {&nsGkAtoms::magnify, SVG_ZOOMANDPAN_MAGNIFY},
   {nullptr, 0}
 };
 
 nsSVGElement::EnumInfo SVGViewElement::sEnumInfo[1] =
 {
@@ -75,25 +69,16 @@ SVGViewElement::ViewBox()
 
 already_AddRefed<DOMSVGAnimatedPreserveAspectRatio>
 SVGViewElement::PreserveAspectRatio()
 {
   return mPreserveAspectRatio.ToDOMAnimatedPreserveAspectRatio(this);
 }
 
 //----------------------------------------------------------------------
-
-already_AddRefed<DOMSVGStringList>
-SVGViewElement::ViewTarget()
-{
-  return DOMSVGStringList::GetDOMWrapper(
-           &mStringListAttributes[VIEW_TARGET], this, false, VIEW_TARGET);
-}
-
-//----------------------------------------------------------------------
 // nsSVGElement methods
 
 nsSVGElement::EnumAttributesInfo
 SVGViewElement::GetEnumInfo()
 {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo,
                             ArrayLength(sEnumInfo));
 }
@@ -105,17 +90,10 @@ SVGViewElement::GetViewBox()
 }
 
 SVGAnimatedPreserveAspectRatio *
 SVGViewElement::GetPreserveAspectRatio()
 {
   return &mPreserveAspectRatio;
 }
 
-nsSVGElement::StringListAttributesInfo
-SVGViewElement::GetStringListInfo()
-{
-  return StringListAttributesInfo(mStringListAttributes, sStringListInfo,
-                                  ArrayLength(sStringListInfo));
-}
-
 } // namespace dom
 } // namespace mozilla
--- a/dom/svg/SVGViewElement.h
+++ b/dom/svg/SVGViewElement.h
@@ -42,17 +42,16 @@ public:
   virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
                          bool aPreallocateChildren) const override;
 
   // WebIDL
   uint16_t ZoomAndPan() { return mEnumAttributes[ZOOMANDPAN].GetAnimValue(); }
   void SetZoomAndPan(uint16_t aZoomAndPan, ErrorResult& rv);
   already_AddRefed<SVGAnimatedRect> ViewBox();
   already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
-  already_AddRefed<DOMSVGStringList> ViewTarget();
 
 private:
 
   // nsSVGElement overrides
 
   virtual EnumAttributesInfo GetEnumInfo() override;
 
   enum { ZOOMANDPAN };
@@ -60,20 +59,14 @@ private:
   static nsSVGEnumMapping sZoomAndPanMap[];
   static EnumInfo sEnumInfo[1];
 
   virtual nsSVGViewBox *GetViewBox() override;
   virtual SVGAnimatedPreserveAspectRatio *GetPreserveAspectRatio() override;
 
   nsSVGViewBox                   mViewBox;
   SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
-
-  virtual StringListAttributesInfo GetStringListInfo() override;
-
-  enum { VIEW_TARGET };
-  SVGStringList mStringListAttributes[1];
-  static StringListInfo sStringListInfo[1];
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_SVGViewElement_h
--- a/dom/webidl/SVGViewElement.webidl
+++ b/dom/webidl/SVGViewElement.webidl
@@ -6,14 +6,13 @@
  * The origin of this IDL file is
  * http://www.w3.org/TR/SVG2/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 interface SVGViewElement : SVGElement {
-  readonly attribute SVGStringList viewTarget;
 };
 
 SVGViewElement implements SVGFitToViewBox;
 SVGViewElement implements SVGZoomAndPanValues;
 
--- a/layout/svg/SVGViewFrame.cpp
+++ b/layout/svg/SVGViewFrame.cpp
@@ -86,18 +86,17 @@ nsresult
 SVGViewFrame::AttributeChanged(int32_t  aNameSpaceID,
                                nsAtom* aAttribute,
                                int32_t  aModType)
 {
   // Ignore zoomAndPan as it does not cause the <svg> element to re-render
 
   if (aNameSpaceID == kNameSpaceID_None &&
       (aAttribute == nsGkAtoms::preserveAspectRatio ||
-       aAttribute == nsGkAtoms::viewBox ||
-       aAttribute == nsGkAtoms::viewTarget)) {
+       aAttribute == nsGkAtoms::viewBox)) {
 
     nsSVGOuterSVGFrame *outerSVGFrame = nsSVGUtils::GetOuterSVGFrame(this);
     NS_ASSERTION(outerSVGFrame->GetContent()->IsSVGElement(nsGkAtoms::svg),
                  "Expecting an <svg> element");
 
     SVGSVGElement* svgElement =
       static_cast<SVGSVGElement*>(outerSVGFrame->GetContent());
 
--- a/testing/web-platform/meta/svg/historical.html.ini
+++ b/testing/web-platform/meta/svg/historical.html.ini
@@ -12,11 +12,8 @@
     expected: FAIL
 
   [SVGGraphicsElement.prototype.requiredFeatures must be removed]
     expected: FAIL
 
   [SVGSVGElement.prototype.useCurrentView must be removed]
     expected: FAIL
 
-  [SVGViewElement.prototype.viewTarget must be removed]
-    expected: FAIL
-