New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 605725 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 591267
Owner: ----
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Compat



Sign in to add a comment

CSS counters do not properly handle DOM modifications

Reported by jacobcar...@gmail.com, Apr 21 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36

Example URL:

Steps to reproduce the problem:
Here are two examples of incorrect behavior in Chrome:

Dynamically inserting an item w/ counter-reset applied: http://codepen.io/anon/pen/bpKZqb

Dynamically inserting a non-item and applying counter-reset to the following item: http://codepen.io/anon/pen/bpKZqb

What is the expected behavior?
Starting with the list:
   1. one
   2. two
   3. three

In the first case, a new item is inserted w/ a reset and the list should become

   1. one
   2. two
   1. inserted [inserted and resets the counter]
   2. three

In the second case, a non-item is inserted, and the list should be reset following the non-item: 

   1. one
   2. two
   non item [inserted]
   1. three [resets the counter]

What went wrong?
In both cases, Chrome gives the wrong results. In the first case, the list becomes:

   1. one
   2. two
   1. inserted
   3. three [counter should be 2]

In the second case, the list becomes:

   1. one
   2. two
   non item
   2. three [counter should be 1]

Does it occur on multiple sites: N/A

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 50.0.2661.86  Channel: stable
OS Version: OS X 10.10.5
Flash Version: Shockwave Flash 21.0 r0

I found two other similar-sounding issues related to CSS counters, but I couldn't tell from their provided repros whether they were exact duplicates:

https://bugs.chromium.org/p/chromium/issues/detail?id=591267
https://bugs.chromium.org/p/chromium/issues/detail?id=599359
 
Both Firefox 45.0.2 (on OS X 10.10.5) and Microsoft Edge 20.10240.16384.0 render the correct numbering for those examples.
Cc: ramy...@samsung.com nainar@chromium.org brajkumar@chromium.org
Components: Blink>CSS
Labels: Needs-Feedback OS-Linux OS-Windows
The above issue looks similar to  bug 591267 . For confirmation cc'ing to few persons who is working on it. 


Could anyone please confirm is this issue is related to previous  bug 591267 ?

Comment 3 by nainar@chromium.org, Apr 22 2016

Mergedinto: 591267
Status: Duplicate (was: Unconfirmed)
Hi, 

Yup definitely a dupe of  bug 591267 . Marking as such. Thanks!

Sign in to add a comment