Open Bug 1293215 Opened 8 years ago Updated 2 years ago

Give nsStyleContent contents iterator style interface

Categories

(Core :: CSS Parsing and Computation, defect, P3)

defect

Tracking

()

Tracking Status
firefox51 --- affected

People

(Reporter: xidorn, Unassigned)

Details

nsStyleContent has three iterable lists: mContents, mIncrements, and mResets. Currently, users of nsStyleContent need to get the length of the list first, then query items individually via specific method.

It would be great if the items can be iterated via range-for, which would significant the code. e.g.
> for (nsStyleContentData& data : styleContent.Contents()) {
>   doSomething(data);
> }

To have this, we would need to create three methods which returns a pointer range which implements begin() and end(), so that range-for can be used with it.
Actually we would need 6 methods, 3 for const and 3 for non-const.
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.