Closed Bug 208731 Opened 21 years ago Closed 20 years ago

possible improvements to nsCSSRect type

Categories

(Core :: CSS Parsing and Computation, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.8alpha1

People

(Reporter: dbaron, Assigned: bzbarsky)

Details

Attachments

(1 file)

nsCSSRect could probably use a few more methods to simplify callers' use of it.
 In bug 125246 comment 45, bzbarsky wrote:

  1) Maybe add a function on nsCSSRect that returns true if and only if at least
     one of the members has non-null unit.
  2) Maybe add a Reset() function on nsCSSRect.

From bug 125246 comment 33:

  We may want to add a function on nsCSSRect that checks whether any of the
  sub-values is null.  We're ending up doing that check in a number of places...
  Maybe nsCSSRect::HasValue() or something?  (Not necessarily as part of this
  patch; I can file a separate bug on this.)

and:

  We may want a Reset() on nsCSSRect too (looking at ClearProperty here).
Severity: major → normal
I looked around, and there wouldn't be any other callers of these functions at
the moment... that makes me somewhat question how much we need them, to be
truthful.
Comment on attachment 127509 [details] [diff] [review]
Something like this....

On the other hand, I do think this makes the code more readable... David,
there's no rush on this review, clearly; I'd pick on someone else, but no one
else knows this code.  :(
Attachment #127509 - Flags: superreview?(dbaron)
Attachment #127509 - Flags: review?(dbaron)
Attachment #127509 - Flags: superreview?(dbaron)
Attachment #127509 - Flags: superreview+
Attachment #127509 - Flags: review?(dbaron)
Attachment #127509 - Flags: review+
Taking.
Assignee: dbaron → bzbarsky
Priority: -- → P1
Target Milestone: --- → mozilla1.8alpha
Checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: