Bug 261054. Make caret consistently the same width throughout Gecko/Mozilla. Configurable through ui.caretWidth. r=glazou, sr=rbs
This commit is contained in:
@@ -555,7 +555,6 @@ public:
|
||||
NS_IMETHOD RepaintSelection(PRInt16 type);
|
||||
NS_IMETHOD RepaintSelection(nsPresContext* aPresContext, SelectionType aSelectionType);
|
||||
NS_IMETHOD SetCaretEnabled(PRBool enabled);
|
||||
NS_IMETHOD SetCaretWidth(PRInt16 twips);
|
||||
NS_IMETHOD SetCaretReadOnly(PRBool aReadOnly);
|
||||
NS_IMETHOD GetCaretEnabled(PRBool *_retval);
|
||||
NS_IMETHOD SetCaretVisibilityDuringSelection(PRBool aVisibility);
|
||||
@@ -736,23 +735,6 @@ nsTextInputSelectionImpl::SetCaretEnabled(PRBool enabled)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTextInputSelectionImpl::SetCaretWidth(PRInt16 pixels)
|
||||
{
|
||||
if (!mPresShellWeak) return NS_ERROR_NOT_INITIALIZED;
|
||||
nsresult result;
|
||||
nsCOMPtr<nsIPresShell> shell = do_QueryReferent(mPresShellWeak, &result);
|
||||
if (shell)
|
||||
{
|
||||
nsCOMPtr<nsICaret> caret;
|
||||
if (NS_SUCCEEDED(result = shell->GetCaret(getter_AddRefs(caret))))
|
||||
{
|
||||
return caret->SetCaretWidth(pixels);
|
||||
}
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTextInputSelectionImpl::SetCaretReadOnly(PRBool aReadOnly)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user