Closed
Bug 18766
Opened 26 years ago
Closed 26 years ago
[CODE CLEANUP] Add method to clear struct nsHTMLReflowMetrics
Categories
(Core :: Layout, defect, P3)
Tracking
()
VERIFIED
WONTFIX
People
(Reporter: rbs, Assigned: troy)
Details
In a number of places in the layout frame constrution code, one can
see snippets like:
aMetrics.width = 0;
aMetrics.height = 0;
aMetrics.ascent = 0;
aMetrics.descent = 0;
if (nsnull != aMetrics.maxElementSize) {
aMetrics.maxElementSize->width = 0;
aMetrics.maxElementSize->height = 0;
}
}
Since this is done in a number of places, it would look nice to
use a simple method, say aMetrics.Clear(), to do job. I have seen
a XXX comment somewhere suggesting to do just that, and I am filing
this bug to give prominence to the suggestion and to ensure that
it doesn't falled into oblivion.
I could go ahead and add the method as indicated below, but frame
owners know best where they have zeroed their metrics.
struct nsHTMLReflowMetrics { // defined in nsIFrame.h
...
void Clear {
width = height = 0;
ascent = descent = 0;
if (nsnull != maxElementSize) {
maxElementSize->width = 0;
maxElementSize->height = 0;
}
}
...
}
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → WONTFIX
Summary: [CODE CLEANUP] Add method to clear struct nsHTMLReflowMetrics → [CODE CLEANUP] Add method to clear struct nsHTMLReflowMetrics
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
I forgot to add that the reason I'm marking this WONTFIX is that it seems
undesirable that we have a number of places that are clearing (reseting to the
default values) the nsHTMLReflowMetrics struct.
I question whether people should be doing that, and maybe that problem should be
fixed rather than making it easier for people
| Comment hidden (collapsed) |
You need to log in
before you can comment on or make changes to this bug.
Description
•