Bug 261054. Make caret consistently the same width throughout Gecko/Mozilla. Configurable through ui.caretWidth. r=glazou, sr=rbs

git-svn-id: svn://10.0.0.236/trunk@163639 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
aaronleventhal%moonset.net
2004-10-13 01:12:14 +00:00
parent 951a2bbbb2
commit 2ed5e7dde3
26 changed files with 53 additions and 202 deletions

View File

@@ -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)
{