Closed Bug 692919 Opened 8 years ago Closed 8 years ago

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

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: ehsan, Assigned: ehsan)

Details

Attachments

(1 file, 1 obsolete file)

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
Attached patch Patch (v1) (obsolete) — Splinter Review
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #565673 - Flags: review?(matspal)
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)
Attached patch Patch (v2)Splinter Review
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
https://hg.mozilla.org/mozilla-central/rev/a375341a2a07
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.