зеркало из https://github.com/mozilla/pjs.git
fix bustage
This commit is contained in:
Родитель
fa42476fae
Коммит
eb2b8ef385
|
@ -32,6 +32,7 @@
|
|||
#include "nsINameSpaceManager.h"
|
||||
|
||||
|
||||
|
||||
//
|
||||
// NS_NewTriStateCheckboxFrame
|
||||
//
|
||||
|
@ -53,7 +54,11 @@ NS_NewTriStateCheckboxFrame(nsIFrame*& aResult)
|
|||
nsTriStateCheckboxFrame::nsTriStateCheckboxFrame()
|
||||
: mMouseDownOnCheckbox(PR_FALSE), nsLeafFrame()
|
||||
{
|
||||
}
|
||||
// create an atom for the "depress" attribute if it hasn't yet been created.
|
||||
// if ( !sDepressAtom )
|
||||
// sDepressAtom = dont_QueryInterface(NS_NewAtom("depress"));
|
||||
|
||||
} // cntr
|
||||
|
||||
|
||||
//
|
||||
|
@ -214,12 +219,16 @@ nsTriStateCheckboxFrame::HandleEvent(nsIPresContext& aPresContext,
|
|||
break;
|
||||
|
||||
case NS_MOUSE_LEFT_BUTTON_DOWN:
|
||||
// set "hover" state so CSS redraws us
|
||||
// set "depressed" state so CSS redraws us
|
||||
// if ( NS_SUCCEEDED(mContent->SetAttribute(kNameSpaceID_None, sDepressAtom, NS_STRING_TRUE, PR_TRUE)) )
|
||||
// Invalidate(nsRect(0, 0, mRect.width, mRect.height), PR_TRUE);
|
||||
mMouseDownOnCheckbox = PR_TRUE;
|
||||
break;
|
||||
|
||||
case NS_MOUSE_EXIT:
|
||||
// clear hover state so css redraws us
|
||||
// clear "depressed" state so css redraws us
|
||||
if ( NS_SUCCEEDED(mContent->UnsetAttribute(kNameSpaceID_None, sDepressAtom, PR_TRUE)) )
|
||||
Invalidate(nsRect(0, 0, mRect.width, mRect.height), PR_TRUE);
|
||||
mMouseDownOnCheckbox = PR_FALSE;
|
||||
break;
|
||||
|
||||
|
|
|
@ -42,14 +42,14 @@
|
|||
#define nsTriStateCheckboxFrame_h__
|
||||
|
||||
|
||||
#include "nsFormControlFrame.h"
|
||||
#include "nsLeafFrame.h"
|
||||
#include "prtypes.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
class nsIPresContext;
|
||||
class nsString;
|
||||
class nsIContent;
|
||||
class nsIAtom;
|
||||
|
||||
|
||||
nsresult NS_NewTriStateCheckboxFrame(nsIFrame*& aResult) ;
|
||||
|
@ -102,6 +102,10 @@ protected:
|
|||
|
||||
//GFX-rendered state variables
|
||||
PRBool mMouseDownOnCheckbox;
|
||||
|
||||
// atom for the "depress" attribute. We will have a CSS rule that
|
||||
// when this is set, draws the button depressed.
|
||||
//static nsCOMPtr<nsIAtom> sDepressAtom;
|
||||
|
||||
}; // class nsTriStateCheckboxFrame
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче