synch with widget/nsWindow.cpp rev 3.272. code by roc+moz@cs.cmu.edu
This commit is contained in:
Родитель
35b481f220
Коммит
139cc240d5
|
@ -105,6 +105,7 @@ nsresult nsTextWidget::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
void nsTextWidget::SubclassWindow(BOOL bState)
|
void nsTextWidget::SubclassWindow(BOOL bState)
|
||||||
{
|
{
|
||||||
|
if (NULL != mWnd) {
|
||||||
NS_PRECONDITION(::IsWindow(mWnd), "Invalid window handle");
|
NS_PRECONDITION(::IsWindow(mWnd), "Invalid window handle");
|
||||||
|
|
||||||
if (bState) {
|
if (bState) {
|
||||||
|
@ -113,12 +114,14 @@ void nsTextWidget::SubclassWindow(BOOL bState)
|
||||||
(LONG)nsTextWidget::TextWindowProc);
|
(LONG)nsTextWidget::TextWindowProc);
|
||||||
NS_ASSERTION(mPrevWndProc, "Null standard window procedure");
|
NS_ASSERTION(mPrevWndProc, "Null standard window procedure");
|
||||||
// connect the this pointer to the nsWindow handle
|
// connect the this pointer to the nsWindow handle
|
||||||
::SetWindowLong(mWnd, GWL_USERDATA, (LONG)this);
|
SetNSWindowPtr(mWnd, this);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
(void) ::SetWindowLong(mWnd, GWL_WNDPROC, (LONG)mPrevWndProc);
|
(void) ::SetWindowLong(mWnd, GWL_WNDPROC, (LONG)mPrevWndProc);
|
||||||
|
SetNSWindowPtr(mWnd, NULL);
|
||||||
mPrevWndProc = NULL;
|
mPrevWndProc = NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
@ -295,7 +298,7 @@ NS_METHOD nsTextWidget::Paint(nsIRenderingContext& aRenderingContext,
|
||||||
aRenderingContext.DrawString(mText, x, y);
|
aRenderingContext.DrawString(mText, x, y);
|
||||||
} else {
|
} else {
|
||||||
nsString astricks;
|
nsString astricks;
|
||||||
PRInt32 i;
|
PRUint32 i;
|
||||||
for (i=0;i<mText.Length();i++) {
|
for (i=0;i<mText.Length();i++) {
|
||||||
astricks.AppendWithConversion("*");
|
astricks.AppendWithConversion("*");
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче