Closed Bug 855917 Opened 8 years ago Closed 8 years ago

Minor nsAbsoluteContainingBlock code cleanup

Categories

(Core :: Layout: Block and Inline, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: mats, Assigned: mats)

Details

Attachments

(1 file)

No description provided.
Attached patch fixSplinter Review
Remove unnecessary includes, convert comment to doc-comment style, etc
Attachment #731000 - Flags: review?(dholbert)
Comment on attachment 731000 [details] [diff] [review]
fix

>+++ b/layout/generic/nsAbsoluteContainingBlock.h
[...]
>+    MOZ_ASSERT(mChildListID == nsIFrame::kAbsoluteList ||
>+               mChildListID == nsIFrame::kFixedList,
>+               "should either represent position:fixed or absolute content");
>   }
> 
> #ifdef DEBUG
>   ChildListID GetChildListID() const { return mChildListID; }
> #endif

While you're here, it might be worth getting rid of GetChildListID() entirely, too.  It's only ever called from inside this class (and only in assertions), so we can replace all its invocations with just "mChildListID".  No need for a getter.

(Might be worth separating into a second patch on this bug. rs=me on that patch, if you want to do it.)

The attached patch looks good, regardless -- r=me
Attachment #731000 - Flags: review?(dholbert) → review+
> While you're here, it might be worth getting rid of GetChildListID() entirely, too.

Did so.

I took the liberty of making HasAbsoluteFrames() const too.

https://hg.mozilla.org/integration/mozilla-inbound/rev/17b3ba7a38f2
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/17b3ba7a38f2
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.