Need to somehow check to make sure that the list returned from GetChildLists doesn't have duplicates

RESOLVED FIXED in mozilla10

Status

()

Core
Layout
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

Trunk
mozilla10
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

In order to prevent the likes of bug 691824 in the future.  Where do you guys think it would make sense for that check to live?  (Anything I can think of involves adding it to multiple places)
After GetChildLists here should cover most consumers I think:
http://mxr.mozilla.org/mozilla-central/source/layout/generic/FrameChildList.cpp#49
Created attachment 565673 [details] [diff] [review]
Patch (v1)
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #565673 - Flags: review?(matspal)
http://tbpl.mozilla.org/?tree=Try&rev=a2a41ffd3ba3
Comment on attachment 565673 [details] [diff] [review]
Patch (v1)

Couldn't you just loop through mLists and build a FrameChildListIDs
using |= mID after asserting you haven't seen it yet with !Contains(mID)
Created attachment 566536 [details] [diff] [review]
Patch (v2)

Done.
Attachment #565673 - Attachment is obsolete: true
Attachment #565673 - Flags: review?(matspal)
Attachment #566536 - Flags: review?(matspal)
Comment on attachment 566536 [details] [diff] [review]
Patch (v2)

Let's take the opportunity to add a constructor for the empty set:
  FrameChildListIDs() : mIDs(0) {}

I think it's useful to have in the public part of the API.
(use it for 'ids')

r=mats
Attachment #566536 - Flags: review?(matspal) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/a375341a2a07
Target Milestone: --- → mozilla10

Comment 8

6 years ago
https://hg.mozilla.org/mozilla-central/rev/a375341a2a07
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.