mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 10:27:03 +00:00
Bug 1436508 part 9. Remove nsIDOMKeyEvent::DOM_KEY* constants. r=masayuki
MozReview-Commit-ID: JXCCrbaMcn
This commit is contained in:
parent
29c1a6e2e2
commit
53daea632f
@ -369,7 +369,7 @@ KeyboardEvent::ShouldResistFingerprinting(CallerType aCallerType)
|
||||
mEvent->mFlags.mInSystemGroup ||
|
||||
!nsContentUtils::ShouldResistFingerprinting() ||
|
||||
mEvent->AsKeyboardEvent()->mLocation ==
|
||||
nsIDOMKeyEvent::DOM_KEY_LOCATION_NUMPAD) {
|
||||
KeyboardEventBinding::DOM_KEY_LOCATION_NUMPAD) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -224,9 +224,4 @@ interface nsIDOMKeyEvent : nsIDOMUIEvent
|
||||
// OEM specific virtual keyCode of Windows should pass through DOM keyCode
|
||||
// for compatibility with the other web browsers on Windows.
|
||||
const unsigned long DOM_VK_WIN_OEM_CLEAR = 0xFE;
|
||||
|
||||
const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00;
|
||||
const unsigned long DOM_KEY_LOCATION_LEFT = 0x01;
|
||||
const unsigned long DOM_KEY_LOCATION_RIGHT = 0x02;
|
||||
const unsigned long DOM_KEY_LOCATION_NUMPAD = 0x03;
|
||||
};
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "mozilla/TextEvents.h"
|
||||
#include "mozilla/dom/KeyboardEventBinding.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsCoord.h"
|
||||
@ -620,7 +621,8 @@ nsRFPService::GetSpoofedCode(const nsIDocument* aDoc,
|
||||
|
||||
// We need to change the 'Left' with 'Right' if the location indicates
|
||||
// it's a right key.
|
||||
if (aKeyboardEvent->mLocation == nsIDOMKeyEvent::DOM_KEY_LOCATION_RIGHT &&
|
||||
if (aKeyboardEvent->mLocation ==
|
||||
dom::KeyboardEventBinding::DOM_KEY_LOCATION_RIGHT &&
|
||||
StringEndsWith(aOut, NS_LITERAL_STRING("Left"))) {
|
||||
aOut.ReplaceLiteral(aOut.Length() - 4, 4, u"Right");
|
||||
}
|
||||
|
@ -15,8 +15,8 @@
|
||||
#include "mozilla/FontRange.h"
|
||||
#include "mozilla/TextRange.h"
|
||||
#include "mozilla/WritingModes.h"
|
||||
#include "mozilla/dom/KeyboardEventBinding.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIDOMKeyEvent.h"
|
||||
#include "nsISelectionController.h"
|
||||
#include "nsISelectionListener.h"
|
||||
#include "nsITransferable.h"
|
||||
@ -43,10 +43,10 @@ namespace mozilla {
|
||||
|
||||
enum : uint32_t
|
||||
{
|
||||
eKeyLocationStandard = nsIDOMKeyEvent::DOM_KEY_LOCATION_STANDARD,
|
||||
eKeyLocationLeft = nsIDOMKeyEvent::DOM_KEY_LOCATION_LEFT,
|
||||
eKeyLocationRight = nsIDOMKeyEvent::DOM_KEY_LOCATION_RIGHT,
|
||||
eKeyLocationNumpad = nsIDOMKeyEvent::DOM_KEY_LOCATION_NUMPAD
|
||||
eKeyLocationStandard = dom::KeyboardEventBinding::DOM_KEY_LOCATION_STANDARD,
|
||||
eKeyLocationLeft = dom::KeyboardEventBinding::DOM_KEY_LOCATION_LEFT,
|
||||
eKeyLocationRight = dom::KeyboardEventBinding::DOM_KEY_LOCATION_RIGHT,
|
||||
eKeyLocationNumpad = dom::KeyboardEventBinding::DOM_KEY_LOCATION_NUMPAD
|
||||
};
|
||||
|
||||
const nsCString GetDOMKeyCodeName(uint32_t aKeyCode);
|
||||
|
Loading…
x
Reference in New Issue
Block a user