Closed Bug 515534 Opened 15 years ago Closed 15 years ago

Simplify nsTableRowGroupFrame::GetRowCount() / GetStartRowIndex()

Categories

(Core :: Layout: Tables, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: MatsPalmgren_bugz, Assigned: bzbarsky)

Details

Attachments

(2 files)

Followup from bug 233463 comment 63 --
From  Boris Zbarsky (:bz) 2009-08-25 08:54:42 PDT:

>+++ b/layout/tables/nsTableRowGroupFrame.cpp
> nsTableRowGroupFrame::GetRowCount()

I would be pretty happy with this becoming |return mFrames.GetLength()|
possibly with some asserts about all the frames having the right display type

> PRInt32 nsTableRowGroupFrame::GetStartRowIndex()

Again, this could just nix the loop in favor of:

 if (mFrames.NotEmpty()) {
  // Assert display of mFrames.FirstChild()
  result =
   static_cast<nsTableRowFrame*>(mFrames.FirstChild())->GetRowIndex();
 }

or some such
Attached patch Proposed fixSplinter Review
This applies on top of the patch for bug 233463.
Assignee: nobody → bzbarsky
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #400534 - Flags: review?
Attachment #400534 - Flags: review? → review?(bernd_mozilla)
Attached patch Even compilingSplinter Review
Attachment #400535 - Flags: review?(bernd_mozilla)
Attachment #400534 - Flags: review?(bernd_mozilla)
Attachment #400535 - Flags: review?(bernd_mozilla) → review+
Pushed http://hg.mozilla.org/mozilla-central/rev/7e9a167a9c7f
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: