Closed Bug 360890 Opened 18 years ago Closed 18 years ago

<xul:resizer> elements should support the 'disabled' attribute

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 357725

People

(Reporter: bent.mozilla, Assigned: bent.mozilla)

References

Details

Attachments

(1 file)

Right now the only way to disable the resizer is to hide it. Unfortunately that changes the positioning of other elements in a XUL window.
Attached patch Patch v1.0Splinter Review
Assignee: jag → bent.mozilla
Status: NEW → ASSIGNED
Attachment #245749 - Flags: review?(enndeakin)
Blocks: songbird
Hardware: PC → All
Comment on attachment 245749 [details] [diff] [review]
Patch v1.0

>-       if(mTrackingMouseMove)
>+
>+       if (mTrackingMouseMove && !mDisabled)
>        {

No big deal, but the disabled check doesn't need to happen here. 

>-
>-         doDefault = PR_FALSE;
>        }
>+
>+       doDefault = PR_FALSE;
>      }

What is this change for?

> protected:
> 	eDirection mDirection;
>-	nsRect mWidgetRect;
>+  PRBool mDisabled;
>+  nsRect mWidgetRect;
> }; // class nsResizerFrame

Align mDirection as well while you're at it
(In reply to comment #2)
> No big deal, but the disabled check doesn't need to happen here. 

Well, I guess it depends on what we want to happen here. Say you're in the middle of resizing a window and someone sets disabled to true... Should the resize be allowed to continue until you let go of the mouse? Or should the window instantly stop resizing? I went for the latter, so the disabled check is valid. But I could go either way.

> What is this change for?

If you don't set that to false then it calls the nsTitleFrame message handler... and will move the window!

> Align mDirection as well while you're at it

Will do.
The fix for this will probably be rolled into the patch in bug 357725.
Ben, can this be marked a duplicate now?
Sure thing.

*** This bug has been marked as a duplicate of 357725 ***
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Attachment #245749 - Flags: review?(enndeakin)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: