Backed out changeset 39ee9556d4a0 (bug 1346623)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Fri, 17 Mar 2017 08:18:53 +0100
changeset 348195 2f9cdacc5359cd680a70abfc6e526292e76f6200
parent 348194 0696366039f229883c6aa7fb5526a840b60d3972
child 348196 6ed991361ec1cc16c438674fa99d998dd97b7c92
push id88164
push usercbook@mozilla.com
push dateFri, 17 Mar 2017 13:55:35 +0000
treeherdermozilla-inbound@e46c08babe02 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1346623
milestone55.0a1
backs out39ee9556d4a065ba77c11980dc6d814fe79865dc
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
Backed out changeset 39ee9556d4a0 (bug 1346623)
dom/base/AnonymousContent.cpp
dom/base/AnonymousContent.h
dom/webidl/AnonymousContent.webidl
--- a/dom/base/AnonymousContent.cpp
+++ b/dom/base/AnonymousContent.cpp
@@ -2,17 +2,16 @@
 /* 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 "AnonymousContent.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/AnonymousContentBinding.h"
-#include "nsComputedDOMStyle.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsIDocument.h"
 #include "nsIDOMHTMLCollection.h"
 #include "nsIFrame.h"
 #include "nsStyledElement.h"
 #include "HTMLCanvasElement.h"
 
 namespace mozilla {
@@ -204,34 +203,10 @@ AnonymousContent::GetElementById(const n
 bool
 AnonymousContent::WrapObject(JSContext* aCx,
                              JS::Handle<JSObject*> aGivenProto,
                              JS::MutableHandle<JSObject*> aReflector)
 {
   return AnonymousContentBinding::Wrap(aCx, this, aGivenProto, aReflector);
 }
 
-void
-AnonymousContent::GetComputedStylePropertyValue(const nsAString& aElementId,
-                                                const nsAString& aPropertyName,
-                                                DOMString& aResult,
-                                                ErrorResult& aRv)
-{
-  Element* element = GetElementById(aElementId);
-  if (!element) {
-    aRv.Throw(NS_ERROR_NOT_AVAILABLE);
-    return;
-  }
-
-  nsIPresShell* shell = element->OwnerDoc()->GetShell();
-  if (!shell) {
-    aRv.Throw(NS_ERROR_NOT_AVAILABLE);
-    return;
-  }
-
-  RefPtr<nsComputedDOMStyle> cs =
-    new nsComputedDOMStyle(element, NS_LITERAL_STRING(""), shell,
-                           nsComputedDOMStyle::eAll);
-  aRv = cs->GetPropertyValue(aPropertyName, aResult);
-}
-
 } // namespace dom
 } // namespace mozilla
--- a/dom/base/AnonymousContent.h
+++ b/dom/base/AnonymousContent.h
@@ -63,21 +63,16 @@ public:
                                                      JS::Handle<JSObject*> aKeyframes,
                                                      const UnrestrictedDoubleOrKeyframeAnimationOptions& aOptions,
                                                      ErrorResult& aError);
 
   void SetCutoutRectsForElement(const nsAString& aElementId,
                                 const Sequence<OwningNonNull<DOMRect>>& aRects,
                                 ErrorResult& aError);
 
-  void GetComputedStylePropertyValue(const nsAString& aElementId,
-                                     const nsAString& aPropertyName,
-                                     DOMString& aResult,
-                                     ErrorResult& aRv);
-
 private:
   ~AnonymousContent();
   nsCOMPtr<Element> mContentNode;
 };
 
 } // namespace dom
 } // namespace mozilla
 
--- a/dom/webidl/AnonymousContent.webidl
+++ b/dom/webidl/AnonymousContent.webidl
@@ -72,17 +72,9 @@ interface AnonymousContent {
    * Accepts a list of (possibly overlapping) DOMRects which describe a shape
    * in CSS pixels relative to the element's border box. This shape will be
    * excluded from the element's background color rendering. The element will
    * not render any background images once this method has been called.
    */
   [Throws]
   void setCutoutRectsForElement(DOMString elementId,
                                 sequence<DOMRect> rects);
-
-  /**
-   * Get the computed value of a property on an element inside this custom
-   * anonymous content.
-   */
-  [Throws]
-  DOMString? getComputedStylePropertyValue(DOMString elementId,
-                                           DOMString propertyName);
 };