зеркало из https://github.com/mozilla/gecko-dev.git
Bug 840031 - Use IsTextControl() in nsEventStateManager.cpp. r=smaug
This commit is contained in:
Родитель
d561628a63
Коммит
e9154483f4
|
@ -1882,21 +1882,8 @@ nsEventStateManager::FireContextClick()
|
|||
nsCOMPtr<nsIFormControl> formCtrl(do_QueryInterface(mGestureDownContent));
|
||||
|
||||
if (formCtrl) {
|
||||
// of all form controls, only ones dealing with text are
|
||||
// allowed to have context menus
|
||||
int32_t type = formCtrl->GetType();
|
||||
|
||||
allowedToDispatch = (type == NS_FORM_INPUT_TEXT ||
|
||||
type == NS_FORM_INPUT_EMAIL ||
|
||||
type == NS_FORM_INPUT_SEARCH ||
|
||||
type == NS_FORM_INPUT_TEL ||
|
||||
type == NS_FORM_INPUT_URL ||
|
||||
type == NS_FORM_INPUT_PASSWORD ||
|
||||
type == NS_FORM_INPUT_FILE ||
|
||||
type == NS_FORM_INPUT_NUMBER ||
|
||||
type == NS_FORM_INPUT_DATE ||
|
||||
type == NS_FORM_INPUT_TIME ||
|
||||
type == NS_FORM_TEXTAREA);
|
||||
allowedToDispatch = formCtrl->IsTextControl(false) ||
|
||||
formCtrl->GetType() == NS_FORM_INPUT_FILE;
|
||||
}
|
||||
else if (tag == nsGkAtoms::applet ||
|
||||
tag == nsGkAtoms::embed ||
|
||||
|
|
Загрузка…
Ссылка в новой задаче