Change TypingCommand::DeleteKeyPressed() to handle anonymous placeholder
This patch changes |TypingCommand::DeleteKeyPressed()| to handle anonymous placeholder instead of |ComputeAdjustedSelection()| to limit scope of special handling for improving code health. * Anonymous placeholder is a <br> in anonymous block having only it. * Placeholder is represented by <div><br></div>. Example of special handling: <div contenteditable><img style="display:block"><br></div> Before this patch, |ComputeAdjustedSelection()| returns range selection: After:<img>, Before:<br> even if both positions specify equivalent position <div>@1. After this patch |ComputeAdjustedSelection()| returns caret selection Before:<br>. Note: |TypingCommand::DeleteKeyPressed()| basically does extend selection backward in character then applies |DeleteSelectionCommand|. Bug: 1143292 Change-Id: I33879d0fa8598b5c26b41ecbdaf134029b240cf4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2564140 Commit-Queue: Koji Ishii <kojii@chromium.org> Reviewed-by:Koji Ishii <kojii@chromium.org> Auto-Submit: Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#832082}
Showing
Please register or sign in to comment