mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 631412 - Bug 629401 breaks non-libxul builds due to unresolved reference to nsContentUtils::DispatchTrustedEvent(nsIDocument*, nsISupports*, nsAString_internal const&, int, int, int*); r=khuey a=NPOTB
This commit is contained in:
parent
ff5cb3429d
commit
e74b5aed6c
@ -91,4 +91,30 @@ public:
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIContentUtils2, NS_ICONTENTUTILS2_IID)
|
||||
|
||||
#ifndef MOZ_ENABLE_LIBXUL
|
||||
// nsIContentUtils_MOZILLA_2_0_BRANCH is a non-libxul only interface to enable
|
||||
// us keep those builds working.
|
||||
|
||||
#define NS_ICONTENTUTILS_MOZILLA_2_0_BRANCH_IID \
|
||||
{ 0x0fe8099c, 0x622a, 0x4c79, \
|
||||
{ 0xb0, 0x02, 0x55, 0xf0, 0x44, 0x34, 0x00, 0x30 } }
|
||||
|
||||
class nsIContentUtils_MOZILLA_2_0_BRANCH : public nsISupports
|
||||
{
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICONTENTURILS_MOZILLA_2_0_BRANCH_IID)
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
virtual nsresult DispatchTrustedEvent(nsIDocument* aDoc,
|
||||
nsISupports* aTarget,
|
||||
const nsAString& aEventName,
|
||||
PRBool aCanBubble,
|
||||
PRBool aCancelable,
|
||||
PRBool *aDefaultAction = nsnull);
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIContentUtils_MOZILLA_2_0_BRANCH, NS_ICONTENTUTILS_MOZILLA_2_0_BRANCH_IID)
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* nsIContentUtils_h__ */
|
||||
|
@ -6504,3 +6504,21 @@ nsIContentUtils2::CheckSameOrigin(nsIChannel *aOldChannel, nsIChannel *aNewChann
|
||||
{
|
||||
return nsContentUtils::CheckSameOrigin(aOldChannel, aNewChannel);
|
||||
}
|
||||
|
||||
#ifndef MOZ_ENABLE_LIBXUL
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsIContentUtils_MOZILLA_2_0_BRANCH, nsIContentUtils_MOZILLA_2_0_BRANCH)
|
||||
|
||||
nsresult
|
||||
nsIContentUtils_MOZILLA_2_0_BRANCH::DispatchTrustedEvent(nsIDocument* aDoc,
|
||||
nsISupports* aTarget,
|
||||
const nsAString& aEventName,
|
||||
PRBool aCanBubble,
|
||||
PRBool aCancelable,
|
||||
PRBool *aDefaultAction)
|
||||
{
|
||||
return nsContentUtils::DispatchTrustedEvent(aDoc, aTarget, aEventName,
|
||||
aCanBubble, aCancelable, aDefaultAction);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -246,6 +246,12 @@
|
||||
#define NS_ICONTENTUTILS2_CID \
|
||||
{ 0x1802442d, 0xa59b, 0x43b8, { 0xb8, 0xfd, 0x07, 0x0d, 0xa5, 0x54, 0x95, 0x93 } }
|
||||
|
||||
#ifndef MOZ_ENABLE_LIBXUL
|
||||
// {4c14b440-307f-11e0-91fa-0800200c9a66}
|
||||
#define NS_ICONTENTUTILS_MOZILLA_2_0_BRANCH_CID \
|
||||
{ 0x4c14b440, 0x307f, 0x11e9, { 0x91, 0xfa, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 } }
|
||||
#endif
|
||||
|
||||
// {1A26A7B7-D06E-4F45-8B45-D7AD60F7A9AB}
|
||||
#define INDEXEDDB_MANAGER_CID \
|
||||
{ 0x1a26a7b7, 0xd06e, 0x4f45, { 0x8b, 0x45, 0xd7, 0xad, 0x60, 0xf7, 0xa9, 0xab } }
|
||||
|
@ -595,6 +595,9 @@ MAKE_CTOR(CreateFocusManager, nsIFocusManager, NS_NewFocusManag
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsIContentUtils)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsIContentUtils2)
|
||||
#ifndef MOZ_ENABLE_LIBXUL
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsIContentUtils_MOZILLA_2_0_BRANCH)
|
||||
#endif
|
||||
|
||||
MAKE_CTOR(CreateCanvasRenderingContext2D, nsIDOMCanvasRenderingContext2D, NS_NewCanvasRenderingContext2D)
|
||||
MAKE_CTOR(CreateCanvasRenderingContextWebGL, nsIDOMWebGLRenderingContext, NS_NewCanvasRenderingContextWebGL)
|
||||
@ -888,6 +891,9 @@ NS_DEFINE_NAMED_CID(NS_GEOLOCATION_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_FOCUSMANAGER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_ICONTENTUTILS_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_ICONTENTUTILS2_CID);
|
||||
#ifndef MOZ_ENABLE_LIBXUL
|
||||
NS_DEFINE_NAMED_CID(NS_ICONTENTUTILS_MOZILLA_2_0_BRANCH_CID);
|
||||
#endif
|
||||
NS_DEFINE_NAMED_CID(CSPSERVICE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_EVENTLISTENERSERVICE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_GLOBALMESSAGEMANAGER_CID);
|
||||
@ -1044,6 +1050,9 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
|
||||
{ &kNS_FOCUSMANAGER_CID, false, NULL, CreateFocusManager },
|
||||
{ &kNS_ICONTENTUTILS_CID, false, NULL, nsIContentUtilsConstructor },
|
||||
{ &kNS_ICONTENTUTILS2_CID, false, NULL, nsIContentUtils2Constructor },
|
||||
#ifndef MOZ_ENABLE_LIBXUL
|
||||
{ &kNS_ICONTENTUTILS_MOZILLA_2_0_BRANCH_CID, false, NULL, nsIContentUtils_MOZILLA_2_0_BRANCHConstructor },
|
||||
#endif
|
||||
{ &kCSPSERVICE_CID, false, NULL, CSPServiceConstructor },
|
||||
{ &kNS_EVENTLISTENERSERVICE_CID, false, NULL, CreateEventListenerService },
|
||||
{ &kNS_GLOBALMESSAGEMANAGER_CID, false, NULL, CreateGlobalMessageManager },
|
||||
@ -1194,6 +1203,9 @@ static const mozilla::Module::ContractIDEntry kLayoutContracts[] = {
|
||||
{ "@mozilla.org/focus-manager;1", &kNS_FOCUSMANAGER_CID },
|
||||
{ "@mozilla.org/content/contentutils;1", &kNS_ICONTENTUTILS_CID },
|
||||
{ "@mozilla.org/content/contentutils2;1", &kNS_ICONTENTUTILS2_CID },
|
||||
#ifndef MOZ_ENABLE_LIBXUL
|
||||
{ "@mozilla.org/content/contentutils-moz2.0;1", &kNS_ICONTENTUTILS_MOZILLA_2_0_BRANCH_CID },
|
||||
#endif
|
||||
{ CSPSERVICE_CONTRACTID, &kCSPSERVICE_CID },
|
||||
{ NS_EVENTLISTENERSERVICE_CONTRACTID, &kNS_EVENTLISTENERSERVICE_CID },
|
||||
{ NS_GLOBALMESSAGEMANAGER_CONTRACTID, &kNS_GLOBALMESSAGEMANAGER_CID },
|
||||
|
@ -50,6 +50,7 @@
|
||||
#include "nsPluginLogging.h"
|
||||
#include "nsIPrivateBrowsingService.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsIContentUtils.h"
|
||||
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
@ -1269,8 +1270,17 @@ NS_IMETHODIMP
|
||||
CarbonEventModelFailureEvent::Run()
|
||||
{
|
||||
nsString type = NS_LITERAL_STRING("npapi-carbon-event-model-failure");
|
||||
#ifdef MOZ_ENABLE_LIBXUL
|
||||
nsContentUtils::DispatchTrustedEvent(mContent->GetDocument(), mContent,
|
||||
type, PR_TRUE, PR_TRUE);
|
||||
#else
|
||||
nsCOMPtr<nsIContentUtils_MOZILLA_2_0_BRANCH> cu =
|
||||
do_GetService("@mozilla.org/content/contentutils-moz2.0;1");
|
||||
if (cu) {
|
||||
cu->DispatchTrustedEvent(mContent->GetDocument(), mContent,
|
||||
type, PR_TRUE, PR_TRUE);
|
||||
}
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user