DeleteSelectionCommand::RemoveNode() updates layout for every removed node
Reported by
msaoffic...@gmail.com,
Jan 5 2018
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 Example URL: https://jsfiddle.net/hukapcfc/1/ Steps to reproduce the problem: 1. Go to https://jsfiddle.net/hukapcfc/1/ 2. Select the majority of the text (for ex: from the 2nd character in the very first word to a character in the middle of the very last word) 3. Press any key to overtype (or press backspace/delete to delete completely) 4. You will see that it takes a few seconds before the paragraph is updated. What is the expected behavior? No lag in between pressing a key and seeing the paragraph correctly reflect the update. What went wrong? The browser seems to be doing a lot of recalculating the style and redoing the layout (seems to be correlated to the # of spans). See attached files for images of the profile related to the linked JSFiddle repro. This works without the performance lag in IE, Edge, and Firefox. Does it occur on multiple sites: N/A Is it a problem with a plugin? N/A Did this work before? N/A Does this work in other browsers? Yes Chrome version: 63.0.3239.132 Channel: stable OS Version: 6.3 Flash Version: Repro exists on the most recently updated version of Chrome (Version 63.0.3239.132)
,
Jan 8 2018
Culprit: DeleteSelectionCommand::RemoveNode() performs a layout update for every general node removal: https://chromium.googlesource.com/chromium/src/+/5f4ce8d92827e65b4049af367de043f1f6b02c3d/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp#523 Although the layout update is added by my CL, this shouldn't be considered as a performance regression because calculation of VisiblePosition requires clean layout, and the CL ensures correct behavior. Lowered to P3 as it's an editing performance bug.
,
Jan 8 2018
I'm assigned with something else, and there's no easy fix. Marking as available so that anyone may contribute :)
,
Jan 10
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
||||
►
Sign in to add a comment |
||||
Comment 1 by sc00335...@techmahindra.com
, Jan 8 2018Components: Blink>Layout
Labels: -Pri-2 -Type-Compat hasbisect-per-revision Triaged-ET M-65 Needs-Triage-M63 OS-Linux OS-Mac Pri-1 Type-Bug-Regression
Owner: xiaoche...@chromium.org
Status: Assigned (was: Unconfirmed)