Closed Bug 1573907 Opened 2 months ago Closed 2 months ago

list item with value attribute in <ol reversed> causes the list to start too high (by one per item with value)

Categories

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

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: dbaron, Assigned: emilio)

Details

Attachments

(4 files)

Any list item with a value attribute causes an <ol reversed> to start one higher than it should. Chrome behaves correctly.

Attachment #9085511 - Attachment mime type: text/plain → text/html;charset=UTF-8
Attachment #9085512 - Attachment mime type: text/plain → text/html

I think this line should be removed and that should fix it, but I haven't checked yet since I ran out of time for the day: https://searchfox.org/mozilla-central/rev/3366c3d24f1c3818df37ec0818833bf085e41a53/layout/base/nsCounterManager.cpp#180

(actually I have a couple more minutes)

Assignee: nobody → emilio

The counting code was incrementing the start counter twice for <li value>, as it
generates both an increment and a reset.

We should instead only increment it once per list-item, that is, once per
increment.

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a9bdb526a7a0
Fix interaction of <li value> inside <ol reversed>. r=mats
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0bc9d6bfeb5a
Make non-list-items not increment the start value for <ol reversed>. r=mats
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/18451 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.