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

Issue 849107 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

CSS Counters show wrong numbers when display property is changed from 'none' to default value

Reported by d66n...@gmail.com, Jun 3 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36

Steps to reproduce the problem:
1. I created a html page with simple 2 level nested list, where nested ol has display property set to 'none'. If user clicks on first level list item "Item 1", display property of nested ol is set to default and second level list item "Item 1.1" is displayed;
2. Click on first Level list "Item 1";
3. Second level list item "Item 1.1" is displayed, but first level list "Item 2" now gets wrong number "1.2";

What is the expected behavior?
After user clicks "Item 1", number displayed by CSS counter on first level list item "Item 2" should remain unchanged "2". 

What went wrong?
After user clicks "Item 1", number displayed by CSS counter on "Item 2" changes from "2" to "1.2".

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 67.0.3396.62  Channel: stable
OS Version: 6.3
Flash Version: 

No such issue is observed in Firefox 60 and IE 11.
 
cb.html
791 bytes View Download
Labels: Needs-Triage-M67
Cc: pbomm...@chromium.org
user-talk:/*
Labels: -Type-Bug -Pri-2 hasbisect-per-revision Triaged-ET M-69 RegressedIn-65 Target-67 FoundIn-67 Target-68 Target-69 FoundIn-69 FoundIn-68 OS-Linux OS-Mac Pri-1 Type-Bug-Regression
Owner: shend@chromium.org
Status: Assigned (was: Unconfirmed)
Able to reproduce the issue on reported chrome version 67.0.3396.62 and latest chrome# 69.0.3448.0 using Windows-10, Mac 10.12.6 & Ubuntu 14.04  hence providing Bisect Info
Bisect Info:
================
Good build: 65.0.3292.0
Bad build: 65.0.3293.0

You are probably looking for a change made after 523332 (known good), but no later than 523333 (first known bad).
https://chromium.googlesource.com/chromium/src/+log/7d3a2280ccdfb7c1bb1ace857edf678dcf519fdf..03c0c40d9fd01a01d3ea7992fa3779a876a3740e
Reviewed-on: https://chromium-review.googlesource.com/809984

@Darren Shen: Please confirm the issue and help in re-assigning if it is not related to your change.

Thanks!

Comment 5 by shend@chromium.org, Jun 4 2018

Cc: kojii@chromium.org
Hi kojii-san, do you know if someone on the Blink Render team could take this? Otherwise, I'll try to find some time to fix it.

Comment 6 by kojii@chromium.org, Jun 5 2018

Cc: cathiec...@tencent.com

Comment 7 by d66n...@gmail.com, Jun 5 2018

More simplified testcase
css_counters_bug_in_chrome.html
913 bytes View Download
#7 Thanks! I'm starting to work on it.
Owner: cathiec...@tencent.com
Project Member

Comment 10 by bugdroid1@chromium.org, Jun 14 2018

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

commit 73dff2a04425c1c9e40f7800d900103dcb60cf2a
Author: cathiechen <cathiechen@tencent.com>
Date: Thu Jun 14 02:55:49 2018

Fix the nested layer of counter uncorrected when display changed

In order to update counter-reset correctly, MoveNonResetSiblingsToChildOf
is called, so the non-reset sibling will become the child of this reset
CounterNode. If this reset node is nested inside another CounterNode,
the sibling's nested layer won't be correct. So we should skip calling
MoveNonResetSiblingsToChildOf() in the nested case.

Bug:  849107 
Change-Id: I8c59e18785dfec18c4bc2053e9c01041c23e4183
Reviewed-on: https://chromium-review.googlesource.com/1098867
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Darren Shen <shend@chromium.org>
Commit-Queue: cathie chen <cathiechen@tencent.com>
Cr-Commit-Position: refs/heads/master@{#567103}
[add] https://crrev.com/73dff2a04425c1c9e40f7800d900103dcb60cf2a/third_party/WebKit/LayoutTests/fast/css/counters/nested-counter-with-display-changed.html
[modify] https://crrev.com/73dff2a04425c1c9e40f7800d900103dcb60cf2a/third_party/blink/renderer/core/layout/layout_counter.cc

Status: Fixed (was: Assigned)
Labels: TE-Verified-M69 TE-Verified-69.0.3466.0
Able to reproduce the issue on chrome reported version 67.0.3396.62
Verified the fix on Mac 10.12.6, Windows-10 & Ubuntu 14.04 on Chrome version #69.0.3466.0 as per the comment#0
Attaching screen cast for reference.
Observed "After clicking on 'Item 1', 'Item 2' number remains unchanged as '2' "
Hence, the fix is working as expected.
Adding the verified label.

Thanks!
849107.mp4
911 KB View Download
Can anyone verify if this fix also addresses the issue from https://bugs.chromium.org/p/chromium/issues/detail?id=822260 ?
Cc: vamshi.kommuri@chromium.org
 Issue 822260  has been merged into this issue.

Sign in to add a comment