Closed Bug 12405 Opened 21 years ago Closed 21 years ago

Is it worth setting maxElementSize=nsnull in struct nsReflowMetrics?

Categories

(Core :: Layout, defect, P3)

x86
Windows 95
defect

Tracking

()

VERIFIED WONTFIX

People

(Reporter: rbs, Assigned: troy)

References

()

Details

Looking at struct nsReflowMetrics defined in
layout\base\public\nsIFrameReflow.h,
I was wondering if it wouldn't be worthwhile to also default maxElementSize
to null in the constructor nsReflowMetrics(nsSize* aMaxElementSize=nsnull)?
(this will fit nicely with what the comments rightly say...).
RBS


struct nsReflowMetrics {
  nscoord width, height;        // [OUT] desired width and height
  nscoord ascent, descent;      // [OUT] ascent and descent information

  // Set this to null if you don't need to compute the max element size
  nsSize* maxElementSize;       // [IN OUT]

  nsReflowMetrics(nsSize* aMaxElementSize) {
    maxElementSize = aMaxElementSize;

    // XXX These are OUT parameters and so they shouldn't have to be
    // initialized, but there are some bad frame classes that aren't
    // properly setting them when returning from Reflow()...
    width = height = 0;
    ascent = descent = 0;
  }
};
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → WONTFIX
No probably not, because that would make it too easy for people to accidentally
reset it to NULL. What generally happens is that the table row code asks the
table cells for their max-element-size. From that point down in the tree we need
to request the value and then it propagates back up.

It certainly needs more documentation on how it works, though. Thanks for
raising the issue
Status: RESOLVED → VERIFIED
Based on troy's comments, marking as verified wont fix.
You need to log in before you can comment on or make changes to this bug.