Fix for bug 25161 -- allow editor to handle pages with forms by implementing user-select and user-input for form controls. r=rods, pierre, mjudge.

git-svn-id: svn://10.0.0.236/trunk@75830 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sfraser%netscape.com
2000-08-08 23:38:00 +00:00
parent d2a1daeb55
commit 7726da891c
42 changed files with 645 additions and 56 deletions

View File

@@ -441,8 +441,8 @@ nsFormControlFrame::Paint(nsIPresContext* aPresContext,
nsresult rv = nsLeafFrame::Paint(aPresContext, aRenderingContext, aDirtyRect,
aWhichLayer);
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer){
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer)
{
nsRect rect(0, 0, mRect.width, mRect.height);
PaintSpecialBorder(aPresContext,
aRenderingContext,
@@ -782,6 +782,12 @@ nsFormControlFrame::HandleEvent(nsIPresContext* aPresContext,
return NS_OK;
}
// Check for user-input:none style
const nsStyleUserInterface* uiStyle;
GetStyleData(eStyleStruct_UserInterface, (const nsStyleUserInterface *&)uiStyle);
if (uiStyle->mUserInput == NS_STYLE_USER_INPUT_NONE || uiStyle->mUserInput == NS_STYLE_USER_INPUT_DISABLED)
return nsFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
// if not native then use the NS_MOUSE_LEFT_CLICK to see if pressed
// unfortunately native widgets don't seem to handle this right.
// so use the old code for native stuff. -EDV