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

Issue 591267 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

CSS counter-reset not working on JS-inserted node

Reported by ryan.gos...@gmail.com, Mar 2 2016

Issue description

Chrome Version       : 48.0.2564.116 (Official Build) (64-bit)
URLs (if applicable) : https://jsfiddle.net/oa2cua45/
Other browsers tested:
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari: FAIL (Version 9.0.3 (11601.4.4))
    Firefox: OK (38.0.1)
       Edge: OK (25.10586.0.0)
     Opera: FAIL (35.0.2066.82)

What steps will reproduce the problem?

See the js fiddle ( https://jsfiddle.net/oa2cua45/ )

What is the expected result?

The last line should be "1. stuff three", since the inserted element "blah blah blah" should reset the counter being used.

What happens instead?

The last line is "3. stuff three" despite the counter reset.
 
Cc: kavvaru@chromium.org timloh@chromium.org
Components: Blink>CSS
Labels: -Type-Bug M-51 hasbisect Type-Bug-Regression OS-All
Owner: ande...@opera.com
Status: Assigned (was: Unconfirmed)
Able to reproduce the issue on windows 7, Linux Ubuntu 14.04 and Mac 10.11.3 using chrome version 49.0.2623.75 and canary 51.0.2665.0.
This is regression issue broken in M34.Please find the bisect information as below

Narrow Bisect::
Good:: 34.0.1804.2  --  (official build 246912)
Bad:: 34.0.1805.0   --- (official build 247014)


CHANGELOG URL:  https://chromium.googlesource.com/chromium/src/+log/f9f1fefbc3b6fe1acbc5cc04896c1019eccf4fb9..40671a31ae591dcde885639727cda110dd18adc8

Blink CL ::
https://build.chromium.org/f/chromium/perf/dashboard/ui/changelog_blink.html?url=/trunk&range=165678:165774&mode=html

getting the blank page while navigating to the blink CL.Hence providing the manual blink CL from omahaproxy.

Omahaproxy Blink CL::
https://chromium.googlesource.com/chromium/blink/+log/a9af19bc40eddbd8ab94084ecc12c5260a737e59..fc47ccacc41f26342a6f55d87fdcb651d4e9f47a?pretty=fuller&n=10000

Possible suspect from the above Blink CL
https://codereview.chromium.org/141763003

andersr@ could you please look into this issue if it is related to your change,else please route this to an appropriate owner for this issue.

Thanks,

As per https://bugs.chromium.org/p/chromium/issues/detail?id=371814#c_id25016412 it looks like andersr@ doesn't actively contribute any more -- is it possible to route this to someone else?

Comment 3 by timloh@chromium.org, Mar 11 2016

Cc: -timloh@chromium.org ande...@opera.com ramy...@samsung.com
Owner: ----
Status: Untriaged (was: Assigned)
Setting as untriaged so this can go through the normal triage process. Also cc-ing ramya.v who has looked at some counter stuff in the past.

Comment 4 by meade@chromium.org, Mar 14 2016

Cc: nainar@chromium.org
Labels: -Pri-3 Hotlist-Interop Pri-2
Status: Available (was: Untriaged)

Comment 5 by meade@chromium.org, Apr 15 2016

This is probably related to  issue 599359 , but not sure if it is the same so leaving both bugs open.

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

Cc: brajkumar@chromium.org
 Issue 605725  has been merged into this issue.
Owner: timloh@chromium.org
Status: Assigned (was: Available)

Comment 8 by timloh@chromium.org, May 18 2016

Labels: -Type-Bug-Regression Type-Bug
Owner: ----
Status: Available (was: Assigned)
Doesn't seem like a regression as per comment 1

Comment 9 by timloh@chromium.org, May 18 2016

(in particular, the patch linked in comment 1 was fixing some behavior with counter-reset:none, so I expect that before that patch we were more broken?)
Is there some timeline when we can expect this to be fixed? This bug has been causing production issues in Quora's rich text editor, and while we've got a workaround right now of rerendering editor contents whenever counters would be affected, it would be nice if we didn't have to do this.
Labels: Update-Quarterly
Labels: Code-RecalcStyle

Comment 13 by shend@chromium.org, Oct 31 2017

Labels: ApproachableBug
Should be approachable, but could potentially be a bug in Blink>Layout.
Labels: -Update-Quarterly
Project Member

Comment 15 by bugdroid1@chromium.org, Dec 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/03c0c40d9fd01a01d3ea7992fa3779a876a3740e

commit 03c0c40d9fd01a01d3ea7992fa3779a876a3740e
Author: Darren Shen <shend@chromium.org>
Date: Tue Dec 12 04:21:51 2017

[css-counters] Update counters correctly under counter-reset changes.

Currently we are not updating counter values correctly when we change
or add counter-resets. For example, if we have something like:

<div style="counter-reset: c">
  <p style="counter-increment: c">First</p>
  <p style="counter-increment: c">Second</p>
</div>

we would construct the following counter tree (approximately):

reset
  increment // first
  increment // second

When we insert a new reset node after the first item, we would get
something like:

reset
  increment // first
  increment // second
reset

The correct behaviour would be to move every (non-reset) counter
node after the first node to be a child of the new node:

reset
  increment // first
reset
  increment // second

Bug:  463513 ,  599359 ,  591267 
Change-Id: I28cbf3c13c86336ad3f6f44bf865c59d9f82d98a
Reviewed-on: https://chromium-review.googlesource.com/809984
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523333}
[add] https://crrev.com/03c0c40d9fd01a01d3ea7992fa3779a876a3740e/third_party/WebKit/LayoutTests/fast/css/counters/update-reset-counter-parent-sibling.html
[add] https://crrev.com/03c0c40d9fd01a01d3ea7992fa3779a876a3740e/third_party/WebKit/LayoutTests/fast/css/counters/update-reset-counter-sibling.html
[modify] https://crrev.com/03c0c40d9fd01a01d3ea7992fa3779a876a3740e/third_party/WebKit/Source/core/layout/CounterNode.cpp
[modify] https://crrev.com/03c0c40d9fd01a01d3ea7992fa3779a876a3740e/third_party/WebKit/Source/core/layout/CounterNode.h
[modify] https://crrev.com/03c0c40d9fd01a01d3ea7992fa3779a876a3740e/third_party/WebKit/Source/core/layout/LayoutCounter.cpp

Comment 16 by shend@chromium.org, Dec 12 2017

Components: -Blink>CSS Blink>Layout
Owner: shend@chromium.org
Status: Fixed (was: Available)

Sign in to add a comment