diff --git a/dom/base/AnonymousContent.cpp b/dom/base/AnonymousContent.cpp index 448ce0ad1afe..1df36b048367 100644 --- a/dom/base/AnonymousContent.cpp +++ b/dom/base/AnonymousContent.cpp @@ -7,7 +7,6 @@ #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" @@ -209,29 +208,5 @@ AnonymousContent::WrapObject(JSContext* aCx, 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 cs = - new nsComputedDOMStyle(element, NS_LITERAL_STRING(""), shell, - nsComputedDOMStyle::eAll); - aRv = cs->GetPropertyValue(aPropertyName, aResult); -} - } // namespace dom } // namespace mozilla diff --git a/dom/base/AnonymousContent.h b/dom/base/AnonymousContent.h index b56c145956f6..fd3b59c440be 100644 --- a/dom/base/AnonymousContent.h +++ b/dom/base/AnonymousContent.h @@ -68,11 +68,6 @@ public: const Sequence>& aRects, ErrorResult& aError); - void GetComputedStylePropertyValue(const nsAString& aElementId, - const nsAString& aPropertyName, - DOMString& aResult, - ErrorResult& aRv); - private: ~AnonymousContent(); nsCOMPtr mContentNode; diff --git a/dom/webidl/AnonymousContent.webidl b/dom/webidl/AnonymousContent.webidl index 8be69cd26f8e..6755fe598a63 100644 --- a/dom/webidl/AnonymousContent.webidl +++ b/dom/webidl/AnonymousContent.webidl @@ -77,12 +77,4 @@ interface AnonymousContent { [Throws] void setCutoutRectsForElement(DOMString elementId, sequence rects); - - /** - * Get the computed value of a property on an element inside this custom - * anonymous content. - */ - [Throws] - DOMString? getComputedStylePropertyValue(DOMString elementId, - DOMString propertyName); };