[LayoutNG] Hit test finds wrong text node in multi-line text |
||
Issue descriptionChrome Version: ToT r535113 What steps will reproduce the problem? (1) Load HTML "data:text/html, foo<br>bar" (2)a Click on "foo" Hit test finds node "bar" instead (2)b Click on "bar" The cursor doesn't change into "I". Hit test doesn't find "bar" as the node, either.
,
Feb 8 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/137c9a644fc5355526dde26a4ac19a5bc710e1cf commit 137c9a644fc5355526dde26a4ac19a5bc710e1cf Author: Xiaocheng Hu <xiaochengh@chromium.org> Date: Thu Feb 08 23:30:37 2018 [LayoutNG] Fix hit test offset accumulation in line boxes Current NG hit test code doesn't accumulate offset when entering line boxes, causing wrong result when hit testing multi-line content. This patch fixes that. However, hit test code on legacy layout accumulates offset in a different way, which doesn't consider line boxes at all. Hence, this patch introduces another parameter |accumulated_offset_for_legacy|, which is accumulated in a legacy-like manner, to be passed to legacy code when falling back to legacy layout. Bug: 810177 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I2292612c909536febc489c879340f98ecb12261a Reviewed-on: https://chromium-review.googlesource.com/907495 Reviewed-by: Emil A Eklund <eae@chromium.org> Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/master@{#535574} [modify] https://crrev.com/137c9a644fc5355526dde26a4ac19a5bc710e1cf/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG [modify] https://crrev.com/137c9a644fc5355526dde26a4ac19a5bc710e1cf/third_party/WebKit/Source/core/layout/ng/layout_ng_mixin.cc [modify] https://crrev.com/137c9a644fc5355526dde26a4ac19a5bc710e1cf/third_party/WebKit/Source/core/paint/ng/ng_block_flow_painter.cc [modify] https://crrev.com/137c9a644fc5355526dde26a4ac19a5bc710e1cf/third_party/WebKit/Source/core/paint/ng/ng_block_flow_painter.h [modify] https://crrev.com/137c9a644fc5355526dde26a4ac19a5bc710e1cf/third_party/WebKit/Source/core/paint/ng/ng_box_fragment_painter.cc [modify] https://crrev.com/137c9a644fc5355526dde26a4ac19a5bc710e1cf/third_party/WebKit/Source/core/paint/ng/ng_box_fragment_painter.h
,
Feb 8 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by e...@chromium.org
, Feb 8 2018