Open Bug 703405 Opened 14 years ago Updated 3 years ago

Support resizable <panel>s

Categories

(Core :: XUL, defect)

x86_64
Windows 7
defect

Tracking

()

People

(Reporter: mark.yen, Unassigned)

Details

Attachments

(2 files, 2 obsolete files)

It would be nice to be able to create <panel>s that are resizable; on Windows, this would be roughly equivalent to having WS_THICKFRAME / WS_SIZEBOX on the panel hwnd. (Hacking something up as a test says this doesn't work - the panel keeps trying to animate towards the size it wants to have.) I see that the devtools inspector panel thing currently sticks a <resizer> below the vertical scrollbar. Having this means being able to resize via any window edge.
This patch _mostly_ works, with the follow caveats: - This does not support OSX; resizable panels don't make sense there, having a <resizer> instead fits the platform UI better. (Presumably whoever did the Firefox devtools inspector is a Mac user; it does this.) - On Windows, resizing the panel has... issues. - Resizing the left/right edges does not resize the contents; newly exposed areas draw black. - Resizing the topleft/topright/bottomleft corners cause weird jumps; as the panel is resized, the size changes but position doesn't. After releasing the mouse the panel snaps to where it should be. - The patch is against Gecko 7.0, which is the branch I'm working on. Might need some adaptation for trunk. - Probably needs lots more testing.
Attached file xul file for testing
Attaching a XUL file to test this. Not sure how to roll this into an automated test... it will need to involve synthesizing an OS-level mouse drag a few pixels outside the panel's screen position.
Rebased to trunk. If possible, pointers for the following would be appreciated: - tips on testing. (which suite, etc.) - any ideas about why resizing is odd on windows (see comment 1).
Attachment #576044 - Attachment is obsolete: true
Attachment #576322 - Flags: feedback?(neil)
Comment on attachment 576322 [details] [diff] [review] win32/linux support, rebased to trunk >+ widgetData.mBorderStyle = >+ static_cast<enum nsBorderStyle>(widgetData.mBorderStyle | eBorderStyle_resizeh); I don't see any change in the border, and my breakpoint here wasn't hit. >+ if (mBorderStyle != eBorderStyle_default) Shouldn't you test if (mBorderStyle & eBorderStyle_resizeh)?
Attachment #576322 - Flags: feedback?(neil) → feedback-
(refreshed to trunk again; sorry for the delay) (In reply to neil@parkwaycc.co.uk from comment #4) > Comment on attachment 576322 [details] [diff] [review] [diff] [details] [review] > win32/linux support, rebased to trunk > > >+ widgetData.mBorderStyle = > >+ static_cast<enum nsBorderStyle>(widgetData.mBorderStyle | eBorderStyle_resizeh); > I don't see any change in the border, and my breakpoint here wasn't hit. Odd, I do (using attachment 576317 [details] in https://addons.mozilla.org/en-US/firefox/addon/extension-developer/ ). The breakpoint was hit, for me :( (Win7/WoW64; Ubuntu 11.10 with default-ish things, x64.) Tried Aero-with-glass, themes-without-glass, and classic. (The most notable effect was that it got silly double borders in class mode - once for the window, and once for the panel.) > > >+ if (mBorderStyle != eBorderStyle_default) > Shouldn't you test if (mBorderStyle & eBorderStyle_resizeh)? Yes, I should (that is, it needs both parts); fixed.
Attachment #576322 - Attachment is obsolete: true
Attachment #577792 - Flags: feedback?(neil)
Comment on attachment 577792 [details] [diff] [review] with the right check in nsWindow.cpp I see the aforementioned behaviour on Windows (except I don't have acceleration, so I just get lack-of-paint artefacts instead of black), but I don't know why.
Attachment #577792 - Flags: feedback?(neil) → feedback+
Reviving this. Looking at the most recent 'nit-list' at http://www.reddit.com/r/IAmA/comments/19x7up/we_are_the_firefox_user_experience_team_this_is/c8sshgy , it would decently easy to solve the "bookmark entry box is really small" sort of issues if arrow panels were resizable on the two corners away from the arrow. in: ---------^--- | | ------------- lower right and could / should be draggable. I have been trying to recreate a sensible effect there using `resizers` and having trouble. (code at: "editBookmarkPanel" in `browser.xul` at http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.xul#130)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: