Backed out changeset 39ee9556d4a0 (bug 1346623)

This commit is contained in:
Carsten "Tomcat" Book 2017-03-17 08:18:53 +01:00
parent 8a5101d371
commit 1c400b7ed3
3 changed files with 0 additions and 38 deletions

View File

@ -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<nsComputedDOMStyle> cs =
new nsComputedDOMStyle(element, NS_LITERAL_STRING(""), shell,
nsComputedDOMStyle::eAll);
aRv = cs->GetPropertyValue(aPropertyName, aResult);
}
} // namespace dom
} // namespace mozilla

View File

@ -68,11 +68,6 @@ public:
const Sequence<OwningNonNull<DOMRect>>& aRects,
ErrorResult& aError);
void GetComputedStylePropertyValue(const nsAString& aElementId,
const nsAString& aPropertyName,
DOMString& aResult,
ErrorResult& aRv);
private:
~AnonymousContent();
nsCOMPtr<Element> mContentNode;

View File

@ -77,12 +77,4 @@ interface AnonymousContent {
[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);
};