New issue
Advanced search Search tips

Issue 866120 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task



Sign in to add a comment

PositionForPoint() should stop checking editor behavior

Project Member Reported by xiaoche...@chromium.org, Jul 20

Issue description

Editing behavior ShouldMoveCaretToHorizontalBoundaryWhenPastTopOrBottom controls a selection/hittest-related behavior that, when hit testing a point in an inline formatting context:
- When hit test location is above the first line, return the start position of the first line
- When hit test location is below the last line, return the end position of the last line

Current LayoutBlockFlow::PositionForPoint() checks editing behavior directly, resulting in bad code dependency as the layout_block_flow.cc includes editor.h and editing_behavior.h only for this purpose.

We should try to move relevant fixup to SelectionController.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 23

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

commit e3540f40cb15b3d0013259b504d66a1d2b8395c0
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Mon Jul 23 02:08:06 2018

Stop including editing_behavior.h in editor.h

This patch removes a header inclusion for better build performance, and
clearer code dependency.

Bug: 866120
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I8d3bb813807bbae08350f1b649043752a1198d42
Reviewed-on: https://chromium-review.googlesource.com/1145694
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577103}
[modify] https://crrev.com/e3540f40cb15b3d0013259b504d66a1d2b8395c0/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc
[modify] https://crrev.com/e3540f40cb15b3d0013259b504d66a1d2b8395c0/third_party/blink/renderer/core/editing/commands/move_commands.cc
[modify] https://crrev.com/e3540f40cb15b3d0013259b504d66a1d2b8395c0/third_party/blink/renderer/core/editing/commands/style_commands.cc
[modify] https://crrev.com/e3540f40cb15b3d0013259b504d66a1d2b8395c0/third_party/blink/renderer/core/editing/commands/typing_command.cc
[modify] https://crrev.com/e3540f40cb15b3d0013259b504d66a1d2b8395c0/third_party/blink/renderer/core/editing/editor.cc
[modify] https://crrev.com/e3540f40cb15b3d0013259b504d66a1d2b8395c0/third_party/blink/renderer/core/editing/editor.h
[modify] https://crrev.com/e3540f40cb15b3d0013259b504d66a1d2b8395c0/third_party/blink/renderer/core/editing/editor_key_bindings.cc
[modify] https://crrev.com/e3540f40cb15b3d0013259b504d66a1d2b8395c0/third_party/blink/renderer/core/editing/frame_selection.cc
[modify] https://crrev.com/e3540f40cb15b3d0013259b504d66a1d2b8395c0/third_party/blink/renderer/core/editing/selection_controller.cc
[modify] https://crrev.com/e3540f40cb15b3d0013259b504d66a1d2b8395c0/third_party/blink/renderer/core/editing/selection_editor.cc
[modify] https://crrev.com/e3540f40cb15b3d0013259b504d66a1d2b8395c0/third_party/blink/renderer/core/editing/selection_modifier.cc
[modify] https://crrev.com/e3540f40cb15b3d0013259b504d66a1d2b8395c0/third_party/blink/renderer/core/html/forms/text_control_element.cc
[modify] https://crrev.com/e3540f40cb15b3d0013259b504d66a1d2b8395c0/third_party/blink/renderer/core/input/event_handler_test.cc
[modify] https://crrev.com/e3540f40cb15b3d0013259b504d66a1d2b8395c0/third_party/blink/renderer/core/layout/layout_block_flow.cc
[modify] https://crrev.com/e3540f40cb15b3d0013259b504d66a1d2b8395c0/third_party/blink/renderer/core/page/touch_adjustment.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Aug 7

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

commit 3be6290ce53f80af308cd3d0f4e64a8a963e84f7
Author: Yoichi Osato <yoichio@chromium.org>
Date: Tue Aug 07 05:21:35 2018

[LayoutNG] Simplify a failing continuations-with-move-caret-to-boundary.html.

This patch simplifies the tests that confirms text selection upon drag
selects differently on mac.
I will move the test to selection/mouse.

Bug: 811502, 866120
Change-Id: Id9bb292236b709b65a98be1eff3fc778da02264b
Reviewed-on: https://chromium-review.googlesource.com/1163348
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581139}
[modify] https://crrev.com/3be6290ce53f80af308cd3d0f4e64a8a963e84f7/third_party/WebKit/LayoutTests/editing/selection/continuations-with-move-caret-to-boundary.html
[delete] https://crrev.com/4f08052f98dee02f9ec6912ce3050e41143ee599/third_party/WebKit/LayoutTests/editing/selection/continuations-without-move-caret-to-boundary.html

Sign in to add a comment