Bug 38291 - CSS counters in :before pseudo-elements do not always update
Summary: CSS counters in :before pseudo-elements do not always update
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Julien Chaffraix
Keywords: HasReduction
Depends on:
Reported: 2010-04-28 16:01 PDT by Nate Whetsell
Modified: 2011-04-28 19:24 PDT (History)
2 users (show)

See Also:

Test HTML document (1.02 KB, text/html)
2010-04-28 16:01 PDT, Nate Whetsell
no flags Details
Patch (4.11 KB, patch)
2011-04-28 13:29 PDT, Julien Chaffraix
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Whetsell 2010-04-28 16:01:36 PDT
Created attachment 54634 [details]
Test HTML document

When using more than one CSS counter and generating counted elements using JavaScript, counters placed in the content of a :before pseudo-element do not update themselves, but counters placed in the content of an :after pseudo-element do. I will attach a test HTML document illustrating the problem. In this test document, the number of red "xxx" strings should be counted; there are counters placed before and after the x's. The counters placed after the x's update appropriately as elements are added. The counters placed before the x's do not update as expected. In Firefox, both counters show the same number as elements are added.
Comment 1 Nate Whetsell 2010-04-28 16:11:19 PDT
This issue may be related to bug #11033.
Comment 2 Julien Chaffraix 2010-09-13 17:38:34 PDT
Confirmed on nightly build (Chromium Windows).
Comment 3 Julien Chaffraix 2011-04-27 16:25:21 PDT
Some refactoring went into the CSS counter code and this bug got solved (tested on Qt/Linux ToT and Chromium Canary build). It is still reproducible in Chromium stable.
I will turn the test case into an regression test and have it landed.
Comment 4 Nate Whetsell 2011-04-27 18:41:38 PDT
For posterity's sake, the last Mac OS X nightly build where I can reproduce the bug is r81689. The bug is fixed in r81756.
Comment 5 Julien Chaffraix 2011-04-28 13:29:59 PDT
Created attachment 91544 [details]
Comment 6 Julien Chaffraix 2011-04-28 15:11:06 PDT
Comment on attachment 91544 [details]

Thanks for confirming Nate!
Comment 7 WebKit Commit Bot 2011-04-28 19:24:33 PDT
Comment on attachment 91544 [details]

Clearing flags on attachment: 91544

Committed r85288: <http://trac.webkit.org/changeset/85288>
Comment 8 WebKit Commit Bot 2011-04-28 19:24:38 PDT
All reviewed patches have been landed.  Closing bug.