Bug 1119609 part.3 Implement converting methods from key/code value to key/code name index r=smaug
This commit is contained in:
@@ -267,10 +267,16 @@ KeyboardEvent::InitWithKeyboardEventInit(EventTarget* aOwner,
|
|||||||
internalEvent->location = aParam.mLocation;
|
internalEvent->location = aParam.mLocation;
|
||||||
internalEvent->mIsRepeat = aParam.mRepeat;
|
internalEvent->mIsRepeat = aParam.mRepeat;
|
||||||
internalEvent->mIsComposing = aParam.mIsComposing;
|
internalEvent->mIsComposing = aParam.mIsComposing;
|
||||||
internalEvent->mKeyNameIndex = KEY_NAME_INDEX_USE_STRING;
|
internalEvent->mKeyNameIndex =
|
||||||
internalEvent->mCodeNameIndex = CODE_NAME_INDEX_USE_STRING;
|
WidgetKeyboardEvent::GetKeyNameIndex(aParam.mKey);
|
||||||
internalEvent->mKeyValue = aParam.mKey;
|
if (internalEvent->mKeyNameIndex == KEY_NAME_INDEX_USE_STRING) {
|
||||||
internalEvent->mCodeValue = aParam.mCode;
|
internalEvent->mKeyValue = aParam.mKey;
|
||||||
|
}
|
||||||
|
internalEvent->mCodeNameIndex =
|
||||||
|
WidgetKeyboardEvent::GetCodeNameIndex(aParam.mCode);
|
||||||
|
if (internalEvent->mCodeNameIndex == CODE_NAME_INDEX_USE_STRING) {
|
||||||
|
internalEvent->mCodeValue = aParam.mCode;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|||||||
@@ -16,7 +16,14 @@
|
|||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace widget {
|
namespace widget {
|
||||||
|
|
||||||
//static
|
// static
|
||||||
|
void
|
||||||
|
WidgetUtils::Shutdown()
|
||||||
|
{
|
||||||
|
WidgetKeyboardEvent::Shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
already_AddRefed<nsIWidget>
|
already_AddRefed<nsIWidget>
|
||||||
WidgetUtils::DOMWindowToWidget(nsIDOMWindow *aDOMWindow)
|
WidgetUtils::DOMWindowToWidget(nsIDOMWindow *aDOMWindow)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,6 +21,9 @@
|
|||||||
#include "nsTArray.h"
|
#include "nsTArray.h"
|
||||||
#include "WritingModes.h"
|
#include "WritingModes.h"
|
||||||
|
|
||||||
|
class nsStringHashKey;
|
||||||
|
template<class, class> class nsDataHashtable;
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* virtual keycode values
|
* virtual keycode values
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
@@ -185,6 +188,8 @@ public:
|
|||||||
GetDOMCodeName(mCodeNameIndex, aCodeName);
|
GetDOMCodeName(mCodeNameIndex, aCodeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void Shutdown();
|
||||||
|
|
||||||
static uint32_t ComputeLocationFromCodeValue(CodeNameIndex aCodeNameIndex);
|
static uint32_t ComputeLocationFromCodeValue(CodeNameIndex aCodeNameIndex);
|
||||||
|
|
||||||
static void GetDOMKeyName(KeyNameIndex aKeyNameIndex,
|
static void GetDOMKeyName(KeyNameIndex aKeyNameIndex,
|
||||||
@@ -192,6 +197,9 @@ public:
|
|||||||
static void GetDOMCodeName(CodeNameIndex aCodeNameIndex,
|
static void GetDOMCodeName(CodeNameIndex aCodeNameIndex,
|
||||||
nsAString& aCodeName);
|
nsAString& aCodeName);
|
||||||
|
|
||||||
|
static KeyNameIndex GetKeyNameIndex(const nsAString& aKeyValue);
|
||||||
|
static CodeNameIndex GetCodeNameIndex(const nsAString& aCodeValue);
|
||||||
|
|
||||||
static const char* GetCommandStr(Command aCommand);
|
static const char* GetCommandStr(Command aCommand);
|
||||||
|
|
||||||
void AssignKeyEventData(const WidgetKeyboardEvent& aEvent, bool aCopyTargets)
|
void AssignKeyEventData(const WidgetKeyboardEvent& aEvent, bool aCopyTargets)
|
||||||
@@ -214,6 +222,16 @@ public:
|
|||||||
mNativeKeyEvent = nullptr;
|
mNativeKeyEvent = nullptr;
|
||||||
mUniqueId = aEvent.mUniqueId;
|
mUniqueId = aEvent.mUniqueId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
static const char16_t* kKeyNames[];
|
||||||
|
static const char16_t* kCodeNames[];
|
||||||
|
typedef nsDataHashtable<nsStringHashKey,
|
||||||
|
KeyNameIndex> KeyNameIndexHashtable;
|
||||||
|
typedef nsDataHashtable<nsStringHashKey,
|
||||||
|
CodeNameIndex> CodeNameIndexHashtable;
|
||||||
|
static KeyNameIndexHashtable* sKeyNameIndexHashtable;
|
||||||
|
static CodeNameIndexHashtable* sCodeNameIndexHashtable;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -289,6 +289,24 @@ WidgetInputEvent::AccelModifier()
|
|||||||
* mozilla::WidgetKeyboardEvent (TextEvents.h)
|
* mozilla::WidgetKeyboardEvent (TextEvents.h)
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
#define NS_DEFINE_KEYNAME(aCPPName, aDOMKeyName) MOZ_UTF16(aDOMKeyName),
|
||||||
|
const char16_t* WidgetKeyboardEvent::kKeyNames[] = {
|
||||||
|
#include "mozilla/KeyNameList.h"
|
||||||
|
};
|
||||||
|
#undef NS_DEFINE_KEYNAME
|
||||||
|
|
||||||
|
#define NS_DEFINE_PHYSICAL_KEY_CODE_NAME(aCPPName, aDOMCodeName) \
|
||||||
|
MOZ_UTF16(aDOMCodeName),
|
||||||
|
const char16_t* WidgetKeyboardEvent::kCodeNames[] = {
|
||||||
|
#include "mozilla/PhysicalKeyCodeNameList.h"
|
||||||
|
};
|
||||||
|
#undef NS_DEFINE_PHYSICAL_KEY_CODE_NAME
|
||||||
|
|
||||||
|
WidgetKeyboardEvent::KeyNameIndexHashtable*
|
||||||
|
WidgetKeyboardEvent::sKeyNameIndexHashtable = nullptr;
|
||||||
|
WidgetKeyboardEvent::CodeNameIndexHashtable*
|
||||||
|
WidgetKeyboardEvent::sCodeNameIndexHashtable = nullptr;
|
||||||
|
|
||||||
bool
|
bool
|
||||||
WidgetKeyboardEvent::ShouldCauseKeypressEvents() const
|
WidgetKeyboardEvent::ShouldCauseKeypressEvents() const
|
||||||
{
|
{
|
||||||
@@ -315,73 +333,31 @@ WidgetKeyboardEvent::ShouldCauseKeypressEvents() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*static*/ void
|
/* static */ void
|
||||||
|
WidgetKeyboardEvent::Shutdown()
|
||||||
|
{
|
||||||
|
delete sKeyNameIndexHashtable;
|
||||||
|
sKeyNameIndexHashtable = nullptr;
|
||||||
|
delete sCodeNameIndexHashtable;
|
||||||
|
sCodeNameIndexHashtable = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* static */ void
|
||||||
WidgetKeyboardEvent::GetDOMKeyName(KeyNameIndex aKeyNameIndex,
|
WidgetKeyboardEvent::GetDOMKeyName(KeyNameIndex aKeyNameIndex,
|
||||||
nsAString& aKeyName)
|
nsAString& aKeyName)
|
||||||
{
|
{
|
||||||
// The expected way to implement this function would be to use a
|
|
||||||
// switch statement. By using a table-based implementation, below, we
|
|
||||||
// ensure that this function executes in constant time in cases where
|
|
||||||
// compilers wouldn't be able to convert the switch statement to a
|
|
||||||
// jump table. This table-based implementation also minimizes the
|
|
||||||
// space required by the code and data.
|
|
||||||
#define KEY_STR_NUM_INTERNAL(line) key##line
|
|
||||||
#define KEY_STR_NUM(line) KEY_STR_NUM_INTERNAL(line)
|
|
||||||
|
|
||||||
// Catch non-ASCII DOM key names in our key name list.
|
|
||||||
#define NS_DEFINE_KEYNAME(aCPPName, aDOMKeyName) \
|
|
||||||
static_assert(sizeof(aDOMKeyName) == MOZ_ARRAY_LENGTH(aDOMKeyName), \
|
|
||||||
"Invalid DOM key name");
|
|
||||||
#include "mozilla/KeyNameList.h"
|
|
||||||
#undef NS_DEFINE_KEYNAME
|
|
||||||
|
|
||||||
struct KeyNameTable
|
|
||||||
{
|
|
||||||
#define NS_DEFINE_KEYNAME(aCPPName, aDOMKeyName) \
|
|
||||||
char16_t KEY_STR_NUM(__LINE__)[sizeof(aDOMKeyName)];
|
|
||||||
#include "mozilla/KeyNameList.h"
|
|
||||||
#undef NS_DEFINE_KEYNAME
|
|
||||||
};
|
|
||||||
|
|
||||||
static const KeyNameTable kKeyNameTable = {
|
|
||||||
#define NS_DEFINE_KEYNAME(aCPPName, aDOMKeyName) MOZ_UTF16(aDOMKeyName),
|
|
||||||
#include "mozilla/KeyNameList.h"
|
|
||||||
#undef NS_DEFINE_KEYNAME
|
|
||||||
};
|
|
||||||
|
|
||||||
static const uint16_t kKeyNameOffsets[] = {
|
|
||||||
#define NS_DEFINE_KEYNAME(aCPPName, aDOMKeyName) \
|
|
||||||
offsetof(struct KeyNameTable, KEY_STR_NUM(__LINE__)) / sizeof(char16_t),
|
|
||||||
#include "mozilla/KeyNameList.h"
|
|
||||||
#undef NS_DEFINE_KEYNAME
|
|
||||||
// Include this entry so we can compute lengths easily.
|
|
||||||
sizeof(kKeyNameTable)
|
|
||||||
};
|
|
||||||
|
|
||||||
// Use the sizeof trick rather than MOZ_ARRAY_LENGTH to avoid problems
|
|
||||||
// with constexpr functions called inside static_assert with some
|
|
||||||
// compilers.
|
|
||||||
static_assert(KEY_NAME_INDEX_USE_STRING ==
|
|
||||||
(sizeof(kKeyNameOffsets)/sizeof(kKeyNameOffsets[0])) - 1,
|
|
||||||
"Invalid enumeration values!");
|
|
||||||
|
|
||||||
if (aKeyNameIndex >= KEY_NAME_INDEX_USE_STRING) {
|
if (aKeyNameIndex >= KEY_NAME_INDEX_USE_STRING) {
|
||||||
aKeyName.Truncate();
|
aKeyName.Truncate();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t offset = kKeyNameOffsets[aKeyNameIndex];
|
MOZ_RELEASE_ASSERT(static_cast<size_t>(aKeyNameIndex) <
|
||||||
uint16_t nextOffset = kKeyNameOffsets[aKeyNameIndex + 1];
|
ArrayLength(kKeyNames),
|
||||||
const char16_t* table = reinterpret_cast<const char16_t*>(&kKeyNameTable);
|
"Illegal key enumeration value");
|
||||||
|
aKeyName = kKeyNames[aKeyNameIndex];
|
||||||
// Subtract off 1 for the null terminator.
|
|
||||||
aKeyName.Assign(table + offset, nextOffset - offset - 1);
|
|
||||||
|
|
||||||
#undef KEY_STR_NUM
|
|
||||||
#undef KEY_STR_NUM_INTERNAL
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*static*/ void
|
/* static */ void
|
||||||
WidgetKeyboardEvent::GetDOMCodeName(CodeNameIndex aCodeNameIndex,
|
WidgetKeyboardEvent::GetDOMCodeName(CodeNameIndex aCodeNameIndex,
|
||||||
nsAString& aCodeName)
|
nsAString& aCodeName)
|
||||||
{
|
{
|
||||||
@@ -390,20 +366,44 @@ WidgetKeyboardEvent::GetDOMCodeName(CodeNameIndex aCodeNameIndex,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define NS_DEFINE_PHYSICAL_KEY_CODE_NAME(aCPPName, aDOMCodeName) \
|
|
||||||
MOZ_UTF16(aDOMCodeName),
|
|
||||||
static const char16_t* kCodeNames[] = {
|
|
||||||
#include "mozilla/PhysicalKeyCodeNameList.h"
|
|
||||||
MOZ_UTF16("")
|
|
||||||
};
|
|
||||||
#undef NS_DEFINE_PHYSICAL_KEY_CODE_NAME
|
|
||||||
|
|
||||||
MOZ_RELEASE_ASSERT(static_cast<size_t>(aCodeNameIndex) <
|
MOZ_RELEASE_ASSERT(static_cast<size_t>(aCodeNameIndex) <
|
||||||
ArrayLength(kCodeNames),
|
ArrayLength(kCodeNames),
|
||||||
"Illegal physical code enumeration value");
|
"Illegal physical code enumeration value");
|
||||||
aCodeName = kCodeNames[aCodeNameIndex];
|
aCodeName = kCodeNames[aCodeNameIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* static */ KeyNameIndex
|
||||||
|
WidgetKeyboardEvent::GetKeyNameIndex(const nsAString& aKeyValue)
|
||||||
|
{
|
||||||
|
if (!sKeyNameIndexHashtable) {
|
||||||
|
sKeyNameIndexHashtable =
|
||||||
|
new KeyNameIndexHashtable(ArrayLength(kKeyNames));
|
||||||
|
for (size_t i = 0; i < ArrayLength(kKeyNames); i++) {
|
||||||
|
sKeyNameIndexHashtable->Put(nsDependentString(kKeyNames[i]),
|
||||||
|
static_cast<KeyNameIndex>(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
KeyNameIndex result = KEY_NAME_INDEX_USE_STRING;
|
||||||
|
sKeyNameIndexHashtable->Get(aKeyValue, &result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* static */ CodeNameIndex
|
||||||
|
WidgetKeyboardEvent::GetCodeNameIndex(const nsAString& aCodeValue)
|
||||||
|
{
|
||||||
|
if (!sCodeNameIndexHashtable) {
|
||||||
|
sCodeNameIndexHashtable =
|
||||||
|
new CodeNameIndexHashtable(ArrayLength(kCodeNames));
|
||||||
|
for (size_t i = 0; i < ArrayLength(kCodeNames); i++) {
|
||||||
|
sCodeNameIndexHashtable->Put(nsDependentString(kCodeNames[i]),
|
||||||
|
static_cast<CodeNameIndex>(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CodeNameIndex result = CODE_NAME_INDEX_USE_STRING;
|
||||||
|
sCodeNameIndexHashtable->Get(aCodeValue, &result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/* static */ const char*
|
/* static */ const char*
|
||||||
WidgetKeyboardEvent::GetCommandStr(Command aCommand)
|
WidgetKeyboardEvent::GetCommandStr(Command aCommand)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -43,6 +43,12 @@ namespace widget {
|
|||||||
class WidgetUtils
|
class WidgetUtils
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Shutdown() is called when "xpcom-will-shutdown" is notified. This is
|
||||||
|
* useful when you need to observe the notification in XP level code under
|
||||||
|
* widget.
|
||||||
|
*/
|
||||||
|
static void Shutdown();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starting at the docshell item for the passed in DOM window this looks up
|
* Starting at the docshell item for the passed in DOM window this looks up
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "mozilla/ModuleUtils.h"
|
#include "mozilla/ModuleUtils.h"
|
||||||
|
#include "mozilla/WidgetUtils.h"
|
||||||
|
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsWidgetsCID.h"
|
#include "nsWidgetsCID.h"
|
||||||
@@ -109,6 +110,9 @@ static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
|
|||||||
static void
|
static void
|
||||||
nsWidgetAndroidModuleDtor()
|
nsWidgetAndroidModuleDtor()
|
||||||
{
|
{
|
||||||
|
// Shutdown all XP level widget classes.
|
||||||
|
mozilla::widget::WidgetUtils::Shutdown();
|
||||||
|
|
||||||
nsLookAndFeel::Shutdown();
|
nsLookAndFeel::Shutdown();
|
||||||
nsAppShellShutdown();
|
nsAppShellShutdown();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include "nsISupports.h"
|
#include "nsISupports.h"
|
||||||
#include "nsIComponentManager.h"
|
#include "nsIComponentManager.h"
|
||||||
#include "mozilla/ModuleUtils.h"
|
#include "mozilla/ModuleUtils.h"
|
||||||
|
#include "mozilla/WidgetUtils.h"
|
||||||
|
|
||||||
#include "nsWidgetsCID.h"
|
#include "nsWidgetsCID.h"
|
||||||
|
|
||||||
@@ -38,8 +39,6 @@
|
|||||||
#include "nsPrintSession.h"
|
#include "nsPrintSession.h"
|
||||||
#include "nsToolkitCompsCID.h"
|
#include "nsToolkitCompsCID.h"
|
||||||
|
|
||||||
#include "mozilla/Module.h"
|
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using namespace mozilla::widget;
|
using namespace mozilla::widget;
|
||||||
|
|
||||||
@@ -195,6 +194,9 @@ static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
|
|||||||
static void
|
static void
|
||||||
nsWidgetCocoaModuleDtor()
|
nsWidgetCocoaModuleDtor()
|
||||||
{
|
{
|
||||||
|
// Shutdown all XP level widget classes.
|
||||||
|
WidgetUtils::Shutdown();
|
||||||
|
|
||||||
NativeKeyBindings::Shutdown();
|
NativeKeyBindings::Shutdown();
|
||||||
nsLookAndFeel::Shutdown();
|
nsLookAndFeel::Shutdown();
|
||||||
nsToolkit::Shutdown();
|
nsToolkit::Shutdown();
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#include "base/basictypes.h"
|
#include "base/basictypes.h"
|
||||||
|
|
||||||
#include "mozilla/ModuleUtils.h"
|
#include "mozilla/ModuleUtils.h"
|
||||||
|
#include "mozilla/WidgetUtils.h"
|
||||||
|
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsWidgetsCID.h"
|
#include "nsWidgetsCID.h"
|
||||||
@@ -107,6 +108,9 @@ static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
|
|||||||
static void
|
static void
|
||||||
nsWidgetGonkModuleDtor()
|
nsWidgetGonkModuleDtor()
|
||||||
{
|
{
|
||||||
|
// Shutdown all XP level widget classes.
|
||||||
|
WidgetUtils::Shutdown();
|
||||||
|
|
||||||
nsLookAndFeel::Shutdown();
|
nsLookAndFeel::Shutdown();
|
||||||
nsAppShellShutdown();
|
nsAppShellShutdown();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "mozilla/ModuleUtils.h"
|
#include "mozilla/ModuleUtils.h"
|
||||||
|
#include "mozilla/WidgetUtils.h"
|
||||||
#include "NativeKeyBindings.h"
|
#include "NativeKeyBindings.h"
|
||||||
#include "nsWidgetsCID.h"
|
#include "nsWidgetsCID.h"
|
||||||
#include "nsAppShell.h"
|
#include "nsAppShell.h"
|
||||||
@@ -268,6 +269,9 @@ static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
|
|||||||
static void
|
static void
|
||||||
nsWidgetGtk2ModuleDtor()
|
nsWidgetGtk2ModuleDtor()
|
||||||
{
|
{
|
||||||
|
// Shutdown all XP level widget classes.
|
||||||
|
WidgetUtils::Shutdown();
|
||||||
|
|
||||||
NativeKeyBindings::Shutdown();
|
NativeKeyBindings::Shutdown();
|
||||||
nsLookAndFeel::Shutdown();
|
nsLookAndFeel::Shutdown();
|
||||||
nsFilePicker::Shutdown();
|
nsFilePicker::Shutdown();
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#include "base/basictypes.h"
|
#include "base/basictypes.h"
|
||||||
|
|
||||||
#include "mozilla/ModuleUtils.h"
|
#include "mozilla/ModuleUtils.h"
|
||||||
|
#include "mozilla/WidgetUtils.h"
|
||||||
|
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsWidgetsCID.h"
|
#include "nsWidgetsCID.h"
|
||||||
@@ -147,6 +148,9 @@ static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
|
|||||||
static void
|
static void
|
||||||
nsWidgetQtModuleDtor()
|
nsWidgetQtModuleDtor()
|
||||||
{
|
{
|
||||||
|
// Shutdown all XP level widget classes.
|
||||||
|
WidgetUtils::Shutdown();
|
||||||
|
|
||||||
nsLookAndFeel::Shutdown();
|
nsLookAndFeel::Shutdown();
|
||||||
nsAppShellShutdown();
|
nsAppShellShutdown();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#include "nsAppShell.h"
|
#include "nsAppShell.h"
|
||||||
#include "nsAppShellSingleton.h"
|
#include "nsAppShellSingleton.h"
|
||||||
#include "mozilla/ModuleUtils.h"
|
#include "mozilla/ModuleUtils.h"
|
||||||
|
#include "mozilla/WidgetUtils.h"
|
||||||
#include "nsIServiceManager.h"
|
#include "nsIServiceManager.h"
|
||||||
#include "nsIdleServiceWin.h"
|
#include "nsIdleServiceWin.h"
|
||||||
#include "nsLookAndFeel.h"
|
#include "nsLookAndFeel.h"
|
||||||
@@ -56,8 +57,6 @@
|
|||||||
#include "nsPrintSession.h"
|
#include "nsPrintSession.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "mozilla/Module.h"
|
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using namespace mozilla::widget;
|
using namespace mozilla::widget;
|
||||||
|
|
||||||
@@ -289,6 +288,9 @@ static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
|
|||||||
static void
|
static void
|
||||||
nsWidgetWindowsModuleDtor()
|
nsWidgetWindowsModuleDtor()
|
||||||
{
|
{
|
||||||
|
// Shutdown all XP level widget classes.
|
||||||
|
WidgetUtils::Shutdown();
|
||||||
|
|
||||||
KeyboardLayout::Shutdown();
|
KeyboardLayout::Shutdown();
|
||||||
MouseScrollHandler::Shutdown();
|
MouseScrollHandler::Shutdown();
|
||||||
nsLookAndFeel::Shutdown();
|
nsLookAndFeel::Shutdown();
|
||||||
|
|||||||
Reference in New Issue
Block a user