Minor nsAbsoluteContainingBlock code cleanup

RESOLVED FIXED in mozilla22

Status

()

defect
--
trivial
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: mats, Assigned: mats)

Tracking

Trunk
mozilla22
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

No description provided.
Posted 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: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.