Issue #2490 - Part 9b: Add a CSSRule Web IDL interface.

Fix Paris bindings by providing a temporary IID for nsIDOMCSSRule
(thanks FranklinDM!)
This commit is contained in:
Moonchild 2024-04-01 14:42:27 +02:00 committed by roytam1
commit 264f152ba0
3 changed files with 9 additions and 36 deletions

View file

@ -45,27 +45,6 @@ using namespace mozilla::dom;
// base class for all rule types in a CSS style sheet
// Temporary code that can go away once all css::Rules are on WebIDL bindings.
#include "xpcpublic.h"
namespace mozilla {
namespace dom {
template<>
nsresult
UnwrapArg(JS::Handle<JSObject*> src, css::Rule** ppArg)
{
MOZ_ASSERT(NS_IsMainThread());
nsCOMPtr<nsIDOMCSSRule> rule =
do_QueryInterface(xpc::UnwrapReflectorToISupports(src));
if (!rule) {
return NS_NOINTERFACE;
}
*ppArg = rule->GetCSSRule();
NS_ADDREF(*ppArg);
return NS_OK;
}
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace css {