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

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
18 years ago
11 years ago

People

(Reporter: hamfastgamgee, Assigned: hamfastgamgee)

Tracking

Trunk
x86
All
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(6 attachments)

Assignee

Description

18 years ago
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
Assignee

Updated

18 years ago
Blocks: 70753
Assignee

Comment 2

18 years ago
See bug 94261 about copying the titledbox files to groupbox names.
Assignee

Comment 3

18 years ago
Gah.  A couple of <titledbox> tags slipped back into a security dialog 
(changepassword.xul).  Attaching a patch to switch them back to <groupbox>.
Assignee

Comment 4

18 years ago

Comment 5

18 years ago
r=kavo

Comment 6

18 years ago
r=javi (Damn those off by one errors.)

Comment 7

18 years ago
sr=hewitt
Assignee

Comment 8

18 years ago
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

Comment 9

18 years ago
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?
Assignee

Comment 12

18 years ago
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.)
Assignee

Comment 13

18 years ago
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 15

18 years ago
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.

Updated

18 years ago
Attachment #50481 - Flags: review+
Assignee

Comment 21

18 years ago

Updated

18 years ago
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
All checked in. Marking this bug fixed. Thanks for your help, FrodoB :-)

Updated

11 years ago
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.