Closed Bug 89998 Opened 24 years ago Closed 24 years ago

[XUL Syntax] Deprecate <titledbox> in favor of the new <groupbox>

Categories

(Core :: XUL, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: hamfastgamgee, Assigned: hamfastgamgee)

References

Details

Attachments

(6 files)

This is a spinoff from bug 70748. Now that <groupbox> is in, eventually <titledbox> will be deprecated and removed. It's a fairly easy change to make, but chromes from third parties will need to make this change, so it won't be happening without a grace period.
xbl/xul changes
Assignee: trudelle → ben
Blocks: 70753
See bug 94261 about copying the titledbox files to groupbox names.
Gah. A couple of <titledbox> tags slipped back into a security dialog (changepassword.xul). Attaching a patch to switch them back to <groupbox>.
r=kavo
r=javi (Damn those off by one errors.)
sr=hewitt
Temporarily reassigning to javi for checkin, at his request (there's more to this bug than just the one patch, so it won't be closed until the original issue is dealt with).
Assignee: ben → javi
security patch checked in. Sending back.
Assignee: javi → andersma
I've filed http://bugscape/show_bug.cgi?id=8945 to cover the Netscape side of this bug. When is the switch from a default orient of horizontal to vertical?
Later on. :) (Actually, hyatt might be doing it. I need to talk to him, as the <groupbox> changes in the spec will require other changes, but I'd like to get this done, too.)
Attaching a patch that moves the groupbox functionality to files named groupbox.* instead of titledbox.*. The C++ changes (to use nsGroupBoxFrame.cpp and not nsTitledBoxFrame.cpp) are *not* included yet.
Comment on attachment 48812 [details] [diff] [review] Patch to move to groupbox.* (since jag's checkin for <caption> did most of the dirty work) sr=hewitt
Attachment #48812 - Flags: superreview+
Comment on attachment 48812 [details] [diff] [review] Patch to move to groupbox.* (since jag's checkin for <caption> did most of the dirty work) r=bryner
Attachment #48812 - Flags: review+
Checked in... should this bug be closed out now?
Comment on attachment 50481 [details] [diff] [review] And the C++ changes and build system updates for Windows and Linux >Index: layout/xul/base/src/nsGroupBoxFrame.cpp >=================================================================== >RCS file: /cvsroot/mozilla/layout/xul/base/src/nsGroupBoxFrame.cpp,v >retrieving revision 1.14 >diff -u -r1.14 nsGroupBoxFrame.cpp >--- layout/xul/base/src/nsGroupBoxFrame.cpp 2001/08/05 19:18:46 1.14 >+++ layout/xul/base/src/nsGroupBoxFrame.cpp 2001/09/23 23:48:59 >@@ -91,17 +92,18 @@ > return NS_OK; > } > >-nsTitledBoxFrame::nsTitledBoxFrame(nsIPresShell* aShell):nsBoxFrame(aShell) >+nsGroupBoxFrame::nsGroupBoxFrame(nsIPresShell* aShell):nsBoxFrame(aShell) > { > } > > > // this is identical to nsHTMLContainerFrame::Paint except for the background and border. > NS_IMETHODIMP >-nsTitledBoxFrame::Paint(nsIPresContext* aPresContext, >- nsIRenderingContext& aRenderingContext, >- const nsRect& aDirtyRect, >- nsFramePaintLayer aWhichLayer) >+nsGroupBoxFrame::Paint(nsIPresContext* aPresContext, >+ nsIRenderingContext& aRenderingContext, >+ const nsRect& aDirtyRect, >+ nsFramePaintLayer aWhichLayer, >+ PRUint32 aFlags) It seems you're re-indenting these needlessly (the arguments don't match up) >@@ -224,7 +226,7 @@ > } > > nsIBox* >-nsTitledBoxFrame::GetTitleBox(nsIPresContext* aPresContext, nsRect& aTitleRect) >+nsGroupBoxFrame::GetTitleBox(nsIPresContext* aPresContext, nsRect& aTitleRect) > { > // first child is out titled area > nsIBox* box; >@@ -235,25 +237,30 @@ > return nsnull; > > // get the first child in the titled area that is the title >- nsIBox* child; >- box->GetChildBox(&child); >+ box->GetChildBox(&box); > > // nothing in the area? fail >- if (!child) >+ if (!box) > return nsnull; >+ >+ // now get the title itself. It is in the title frame. >+ nsIBox* child = nsnull; >+ box->GetChildBox(&child); >+ >+ if (child) { >+ // convert to our coordinates. >+ nsRect parentRect; >+ box->GetBounds(parentRect); >+ child->GetBounds(aTitleRect); >+ aTitleRect.x += parentRect.x; >+ aTitleRect.y += parentRect.y; >+ } > >- // convert to our coordinates. >- nsRect parentRect; >- box->GetBounds(parentRect); >- child->GetBounds(aTitleRect); >- aTitleRect.x += parentRect.x; >- aTitleRect.y += parentRect.y; >- > return child; > } I don't think you wanted to make the above change.
Actually, you did want to make that change to bring it in line with what's in nsTitledBoxFrame.cpp. r=jag if you fix the nits I mentioned above.
Attachment #50481 - Flags: review+
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
All checked in. Marking this bug fixed. Thanks for your help, FrodoB :-)
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: