Appending more than one element not fire repaint for previous :last-child element
Reported by
nikolay....@ewave.com,
Mar 16 2017
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Steps to reproduce the problem: 1. Set :last-child style 2. Append more than one element at once What is the expected behavior? Previous :last-child element repaint What went wrong? Previous :last-child element doesn't repaint Did this work before? N/A Chrome version: 56.0.2924.87 Channel: n/a OS Version: 10.0 Flash Version: Shockwave Flash 25.0 r0 https://jsfiddle.net/jLxyq811/ Not actual for :last-of-type
,
Mar 17 2017
,
Mar 22 2017
It seems the change of childrenChange() in the CL caused this issue.
,
Mar 23 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e89e9ca08e4abca7bf13d7424434b301caf5b4a5 commit e89e9ca08e4abca7bf13d7424434b301caf5b4a5 Author: tkent <tkent@chromium.org> Date: Thu Mar 23 08:08:16 2017 CSS Selector: Fix a regression of :first-child and :last-child invalidation https://codereview.chromium.org/2306323002 caused a regression of :first-child and :last-child invalidation because the timing of ContainerNode::childrenChanged was slightly changed for multiple nodes insertion. Before: childrenChanged was called on every node insertion After: childrenChanged was called after inserting all nodes This CL changes the definition of ChildrenChanged::siblingBeforeChange and siblingAfterChange so that they always point existing nodes before insertion operations. It fixes the behavior of ContainerNode::checkForSiblingStyleChanges, which is called from Element::childrenChanged and ShadowRoot::childrenChanged. siblingBeforeChange and siblingAfterChange are used only by checkForSiblingStyleChanges. So this definition change is safe. BUG= 702104 Review-Url: https://codereview.chromium.org/2772463004 Cr-Commit-Position: refs/heads/master@{#459023} [add] https://crrev.com/e89e9ca08e4abca7bf13d7424434b301caf5b4a5/third_party/WebKit/LayoutTests/fast/css/invalidation/firstchild-lastchild-for-multiple-node-insertion.html [modify] https://crrev.com/e89e9ca08e4abca7bf13d7424434b301caf5b4a5/third_party/WebKit/Source/core/dom/ContainerNode.cpp [modify] https://crrev.com/e89e9ca08e4abca7bf13d7424434b301caf5b4a5/third_party/WebKit/Source/core/dom/ContainerNode.h
,
Mar 24 2017
,
Mar 24 2017
Your change meets the bar and is auto-approved for M58. Please go ahead and merge the CL to branch 3029 manually. Please contact milestone owner if you have questions. Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), govind@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Mar 24 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/404689093a8d2aeb6345635948f614e35d0fdf3a commit 404689093a8d2aeb6345635948f614e35d0fdf3a Author: Kent Tamura <tkent@chromium.org> Date: Fri Mar 24 08:20:24 2017 Merge "CSS Selector: Fix a regression of :first-child and :last-child invalidation" to M58. https://codereview.chromium.org/2306323002 caused a regression of :first-child and :last-child invalidation because the timing of ContainerNode::childrenChanged was slightly changed for multiple nodes insertion. Before: childrenChanged was called on every node insertion After: childrenChanged was called after inserting all nodes This CL changes the definition of ChildrenChanged::siblingBeforeChange and siblingAfterChange so that they always point existing nodes before insertion operations. It fixes the behavior of ContainerNode::checkForSiblingStyleChanges, which is called from Element::childrenChanged and ShadowRoot::childrenChanged. siblingBeforeChange and siblingAfterChange are used only by checkForSiblingStyleChanges. So this definition change is safe. BUG= 702104 Review-Url: https://codereview.chromium.org/2772463004 Cr-Commit-Position: refs/heads/master@{#459023} (cherry picked from commit e89e9ca08e4abca7bf13d7424434b301caf5b4a5) Review-Url: https://codereview.chromium.org/2774753003 . Cr-Commit-Position: refs/branch-heads/3029@{#405} Cr-Branched-From: 939b32ee5ba05c396eef3fd992822fcca9a2e262-refs/heads/master@{#454471} [add] https://crrev.com/404689093a8d2aeb6345635948f614e35d0fdf3a/third_party/WebKit/LayoutTests/fast/css/invalidation/firstchild-lastchild-for-multiple-node-insertion.html [modify] https://crrev.com/404689093a8d2aeb6345635948f614e35d0fdf3a/third_party/WebKit/Source/core/dom/ContainerNode.cpp [modify] https://crrev.com/404689093a8d2aeb6345635948f614e35d0fdf3a/third_party/WebKit/Source/core/dom/ContainerNode.h
,
Mar 29 2017
Verified this issue on Ubuntu 14.04, Mac OS 10.12 and Windows-10 using chrome latest Beta M58-58.0.3029.41. By opening the test case provided in the original comment observed the last child element get repainted as expected. Hence adding TE-Verified label.
,
Mar 29 2017
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by krajshree@chromium.org
, Mar 17 2017Labels: -Type-Bug -Pri-2 M-59 OS-Linux OS-Mac Pri-1 Type-Bug-Regression
Owner: tkent@chromium.org
Status: Assigned (was: Unconfirmed)