зеркало из https://github.com/mozilla/gecko-dev.git
Bug 669028 part.7 content should use mozilla::LookAndFeel rather than nsILookAndFeel r=roc
This commit is contained in:
Родитель
bba85a3008
Коммит
cd3991ef82
|
@ -104,8 +104,6 @@
|
|||
#include "nsIDOMNSEditableElement.h"
|
||||
|
||||
#include "nsCaret.h"
|
||||
#include "nsILookAndFeel.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
|
||||
#include "nsSubDocumentFrame.h"
|
||||
#include "nsIFrameTraversal.h"
|
||||
|
@ -138,6 +136,7 @@
|
|||
#include "nsHTMLLabelElement.h"
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#import <ApplicationServices/ApplicationServices.h>
|
||||
|
@ -152,8 +151,6 @@ using namespace mozilla::dom;
|
|||
|
||||
static NS_DEFINE_CID(kFrameTraversalCID, NS_FRAMETRAVERSAL_CID);
|
||||
|
||||
static NS_DEFINE_CID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
|
||||
|
||||
static PRBool sLeftClickOnly = PR_TRUE;
|
||||
static PRBool sKeyCausesActivation = PR_TRUE;
|
||||
static PRUint32 sESMInstanceCount = 0;
|
||||
|
@ -2050,9 +2047,10 @@ nsEventStateManager::GenerateDragGesture(nsPresContext* aPresContext,
|
|||
static PRInt32 pixelThresholdY = 0;
|
||||
|
||||
if (!pixelThresholdX) {
|
||||
nsILookAndFeel *lf = aPresContext->LookAndFeel();
|
||||
lf->GetMetric(nsILookAndFeel::eMetric_DragThresholdX, pixelThresholdX);
|
||||
lf->GetMetric(nsILookAndFeel::eMetric_DragThresholdY, pixelThresholdY);
|
||||
pixelThresholdX =
|
||||
LookAndFeel::GetInt(LookAndFeel::eIntID_DragThresholdX, 0);
|
||||
pixelThresholdY =
|
||||
LookAndFeel::GetInt(LookAndFeel::eIntID_DragThresholdY, 0);
|
||||
if (!pixelThresholdX)
|
||||
pixelThresholdX = 5;
|
||||
if (!pixelThresholdY)
|
||||
|
|
|
@ -85,8 +85,6 @@
|
|||
#include "nsUnicharUtils.h"
|
||||
#include "nsEventDispatcher.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsILookAndFeel.h"
|
||||
|
||||
#include "nsIDOMMutationEvent.h"
|
||||
#include "nsIDOMEventTarget.h"
|
||||
|
@ -118,12 +116,14 @@
|
|||
#include "nsContentUtils.h"
|
||||
#include "nsRadioVisitor.h"
|
||||
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
// XXX align=left, hspace, vspace, border? other nav4 attrs
|
||||
|
||||
static NS_DEFINE_CID(kXULControllersCID, NS_XULCONTROLLERS_CID);
|
||||
static NS_DEFINE_CID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
|
||||
|
||||
// First bits are needed for the control type.
|
||||
#define NS_OUTER_ACTIVATE_EVENT (1 << 9)
|
||||
|
@ -1923,15 +1923,14 @@ static PRBool
|
|||
SelectTextFieldOnFocus()
|
||||
{
|
||||
if (!gSelectTextFieldOnFocus) {
|
||||
nsCOMPtr<nsILookAndFeel> lookNFeel(do_GetService(kLookAndFeelCID));
|
||||
if (lookNFeel) {
|
||||
PRInt32 selectTextfieldsOnKeyFocus = -1;
|
||||
lookNFeel->GetMetric(nsILookAndFeel::eMetric_SelectTextfieldsOnKeyFocus,
|
||||
selectTextfieldsOnKeyFocus);
|
||||
gSelectTextFieldOnFocus = selectTextfieldsOnKeyFocus != 0 ? 1 : -1;
|
||||
}
|
||||
else {
|
||||
PRInt32 selectTextfieldsOnKeyFocus = -1;
|
||||
nsresult rv =
|
||||
LookAndFeel::GetInt(LookAndFeel::eIntID_SelectTextfieldsOnKeyFocus,
|
||||
&selectTextfieldsOnKeyFocus);
|
||||
if (NS_FAILED(rv)) {
|
||||
gSelectTextFieldOnFocus = -1;
|
||||
} else {
|
||||
gSelectTextFieldOnFocus = selectTextfieldsOnKeyFocus != 0 ? 1 : -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче