mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 669028 part.9 editor should use mozilla::LookAndFeel rather than nsILookAndFeel r=ehsan
This commit is contained in:
parent
6dbdf2a345
commit
c3dc8121ea
@ -1964,7 +1964,7 @@ nsEditor::ForceCompositionEnd()
|
||||
// We can test mInIMEMode and do some optimization for Mac and Window
|
||||
// Howerver, since UNIX support over-the-spot, we cannot rely on that
|
||||
// flag for Unix.
|
||||
// We should use nsILookAndFeel to resolve this
|
||||
// We should use LookAndFeel to resolve this
|
||||
|
||||
#if defined(XP_MACOSX) || defined(XP_WIN) || defined(XP_OS2)
|
||||
// XXXmnakano see bug 558976, ResetInputState() has two meaning which are
|
||||
|
@ -53,7 +53,6 @@
|
||||
#include "nsIDOMMouseEvent.h"
|
||||
#include "nsIPrivateTextEvent.h"
|
||||
#include "nsIEditorMailSupport.h"
|
||||
#include "nsILookAndFeel.h"
|
||||
#include "nsFocusManager.h"
|
||||
#include "nsEventListenerManager.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
@ -62,15 +62,12 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
#include "nsILookAndFeel.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
class nsHTMLEditUtils;
|
||||
|
||||
static NS_DEFINE_CID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
|
||||
|
||||
// ==================================================================
|
||||
// DocumentResizeEventListener
|
||||
// ==================================================================
|
||||
@ -895,12 +892,10 @@ nsHTMLEditor::MouseMove(nsIDOMEvent* aMouseEvent)
|
||||
mouseEvent->GetClientX(&clientX);
|
||||
mouseEvent->GetClientY(&clientY);
|
||||
|
||||
nsCOMPtr<nsILookAndFeel> look = do_GetService(kLookAndFeelCID);
|
||||
NS_ASSERTION(look, "Look and feel service must be implemented for this toolkit");
|
||||
|
||||
PRInt32 xThreshold=1, yThreshold=1;
|
||||
look->GetMetric(nsILookAndFeel::eMetric_DragThresholdX, xThreshold);
|
||||
look->GetMetric(nsILookAndFeel::eMetric_DragThresholdY, yThreshold);
|
||||
PRInt32 xThreshold =
|
||||
LookAndFeel::GetInt(LookAndFeel::eIntID_DragThresholdX, 1);
|
||||
PRInt32 yThreshold =
|
||||
LookAndFeel::GetInt(LookAndFeel::eIntID_DragThresholdY, 1);
|
||||
|
||||
if (NS_ABS(clientX - mOriginalX ) * 2 >= xThreshold ||
|
||||
NS_ABS(clientY - mOriginalY ) * 2 >= yThreshold) {
|
||||
|
@ -59,8 +59,6 @@
|
||||
#include "EditTxn.h"
|
||||
#include "nsEditProperty.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsILookAndFeel.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "DeleteTextTxn.h"
|
||||
#include "nsNodeIterator.h"
|
||||
#include "nsIDOMNodeFilter.h"
|
||||
@ -69,11 +67,10 @@
|
||||
#include "nsFrameSelection.h"
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
static NS_DEFINE_CID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
|
||||
|
||||
#define CANCEL_OPERATION_IF_READONLY_OR_DISABLED \
|
||||
if (IsReadonly() || IsDisabled()) \
|
||||
{ \
|
||||
@ -682,8 +679,7 @@ nsTextEditRules::WillInsertText(PRInt32 aAction,
|
||||
// manage the password buffer
|
||||
mPasswordText.Insert(*outString, start);
|
||||
|
||||
nsCOMPtr<nsILookAndFeel> lookAndFeel = do_GetService(kLookAndFeelCID);
|
||||
if (lookAndFeel->GetEchoPassword() && !DontEchoPassword()) {
|
||||
if (LookAndFeel::GetEchoPassword() && !DontEchoPassword()) {
|
||||
HideLastPWInput();
|
||||
mLastStart = start;
|
||||
mLastLength = outString->Length();
|
||||
@ -832,9 +828,8 @@ nsTextEditRules::WillDeleteSelection(nsISelection *aSelection,
|
||||
PRUint32 start, end;
|
||||
mEditor->GetTextSelectionOffsets(aSelection, start, end);
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
nsCOMPtr<nsILookAndFeel> lookAndFeel = do_GetService(kLookAndFeelCID);
|
||||
|
||||
if (lookAndFeel->GetEchoPassword()) {
|
||||
if (LookAndFeel::GetEchoPassword()) {
|
||||
HideLastPWInput();
|
||||
mLastStart = start;
|
||||
mLastLength = 0;
|
||||
@ -1338,12 +1333,7 @@ nsTextEditRules::FillBufWithPWChars(nsAString *aOutString, PRInt32 aLength)
|
||||
if (!aOutString) {return NS_ERROR_NULL_POINTER;}
|
||||
|
||||
// change the output to the platform password character
|
||||
PRUnichar passwordChar = PRUnichar('*');
|
||||
nsCOMPtr<nsILookAndFeel> lookAndFeel = do_GetService(kLookAndFeelCID);
|
||||
if (lookAndFeel)
|
||||
{
|
||||
passwordChar = lookAndFeel->GetPasswordCharacter();
|
||||
}
|
||||
PRUnichar passwordChar = LookAndFeel::GetPasswordCharacter();
|
||||
|
||||
PRInt32 i;
|
||||
aOutString->Truncate();
|
||||
|
Loading…
Reference in New Issue
Block a user