Bug 669028 part.5 accessible should use mozilla::LookAndFeel rather than nsILookAndFeel r=surkov.alexander

This commit is contained in:
Masayuki Nakano 2011-09-09 11:27:12 +09:00
parent f1847a7e6c
commit 9494e70c61

View File

@ -54,17 +54,14 @@
#include "nsIPresShell.h"
#include "nsIContent.h"
#include "nsGUIEvent.h"
#include "nsILookAndFeel.h"
#include "nsWidgetsCID.h"
#include "mozilla/Preferences.h"
#include "mozilla/LookAndFeel.h"
#include "mozilla/dom/Element.h"
using namespace mozilla;
using namespace mozilla::a11y;
static NS_DEFINE_CID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
////////////////////////////////////////////////////////////////////////////////
// nsXULSelectableAccessible
////////////////////////////////////////////////////////////////////////////////
@ -360,10 +357,8 @@ nsXULMenuitemAccessible::NativeState()
// and whose metric setting does allow disabled items to be focused.
if (state & states::UNAVAILABLE) {
// Honour the LookAndFeel metric.
nsCOMPtr<nsILookAndFeel> lookNFeel(do_GetService(kLookAndFeelCID));
PRInt32 skipDisabledMenuItems = 0;
lookNFeel->GetMetric(nsILookAndFeel::eMetric_SkipNavigatingDisabledMenuItem,
skipDisabledMenuItems);
PRInt32 skipDisabledMenuItems =
LookAndFeel::GetInt(LookAndFeel::eIntID_SkipNavigatingDisabledMenuItem);
// We don't want the focusable and selectable states for combobox items,
// so exclude them here as well.
if (skipDisabledMenuItems || isComboboxOption) {