small performance improvement. weeded out some obsolete code that was
causing round trips through the editor unnecessarily. thanks for pointing out the problem, akkana and bruce m. git-svn-id: svn://10.0.0.236/trunk@48310 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1540,18 +1540,10 @@ nsGfxTextControlFrame::InitializeTextControl(nsIPresShell *aPresShell, nsIDOMDoc
|
||||
return result;
|
||||
}
|
||||
|
||||
// this is where we'll propogate a state changed event, once hyatt defines it.
|
||||
NS_IMETHODIMP
|
||||
nsGfxTextControlFrame::InternalContentChanged()
|
||||
{
|
||||
if (!IsInitialized()) { return NS_ERROR_NOT_INITIALIZED; }
|
||||
nsAutoString textValue;
|
||||
// XXX: need to check here if we're an HTML edit field or a text edit field
|
||||
nsString format ("text/plain");
|
||||
mEditor->OutputToString(textValue, format, 0);
|
||||
if (IsSingleLineTextControl()) {
|
||||
RemoveNewlines(textValue);
|
||||
}
|
||||
SetTextControlFrameState(textValue); // set new text value
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user