Code bloat: the BoxFrame debug code (NS_STATE_CURRENTLY_IN_DEBUG) is not in a #if DEBUG. This also (slightly) slows down a host of BoxFrame methods in release builds. If the argument is that "we need to be able to turn on frame debugs even in a non-debug build", then let's have something like #if DEBUG_MENU or DEBUG_PREF and turn it off for "release" builds. In truth, I don't see a need for this code to be enabled for nightlies or dot-release builds either.
That's evaughan's code according to LXR -> reassign
Assignee: attinasi → evaughan
This is always turned on so 3rd parties who write XUL pages don't need to have debug builds. There is great hope that someday XUL pages and xul applications will become popular. We can't expect people to have special versons of Navigator to test them, just as you can expect people to have special versions to test HTML pages. I have not see this show up on quantify. Do you have data to showing this is a performance problem? -Erc
Target Milestone: --- → Future
Ok, subject change. Severity to trivial. Do people know how to actually turn on this to debug their XUL?
Severity: normal → trivial
Summary: BoxFrame debug code is not #if DEBUG → Comment why BoxFrame debug code is not #if DEBUG
How about controlling whether or not this code is executed with a pref? We'll pay the code bloat cost, but not the performance cost (except for a really marginal cost) for checking the pref and a few if (foo) cheks here n' there)?
I'd make the argument that these days, DOM Inspector is much more useful for third-party app developers than the box debug code would be. Also, with the advent of nsITheme, asking for a box's border as GetDebugBoxAt() does may call into non-trivial platform code. I'd like to #ifdef this DEBUG_LAYOUT... dbaron and roc agree per IRC conversation.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: chrispetersen → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.