Text search highlighting incorrect
Reported by
isakovi...@gmail.com,
Dec 28 2017
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36 Steps to reproduce the problem: 1. Go to homeguides.sfgate.com/indoor-plants-produce-oxygen-64950.html 2. Ctrl-F text search for "nasa". 3. Notice that "ASA)" gets highlighted. What is the expected behavior? "NASA" should be highlighted. What went wrong? Character highlighting is incorrect. Appears to be shifted to the right by one character. Did this work before? N/A Chrome version: 63.0.3239.108 Channel: stable OS Version: Ubuntu 14.04 Flash Version:
,
Jan 2 2018
Seems to be a Blink editing bug. We used to have a lot of issues with first-letter. Some are fixed recently, some are still there. Minimized repro: https://jsfiddle.net/3s1u4j0t/ Search "bar" and see "arr" gets highlighted
,
Jan 2 2018
yosin@ described how to fix this here: https://bugs.chromium.org/p/chromium/issues/detail?id=17528#c26 I'm working on this right now, I'll put up a CL. Note: this does not actually fix highlighting the drop cap itself, but it fixes the off-by-one error.
,
Jan 2 2018
Thanks for taking it over. Btw, other markers (e.g., spelling) are also off by one character.
,
Jan 3 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/abf98057c347e32294768dda0efc45edfb8f74d2 commit abf98057c347e32294768dda0efc45edfb8f74d2 Author: Ryan Landay <rlanday@chromium.org> Date: Wed Jan 03 18:09:53 2018 Fix off-by-one bug with Find In Page highlights caused by :first-letter This CL fixes a bug where using Find In Page to search for text in an element using a :first-letter CSS psuedo element highlights one extra character at the end of the result text and skips a character at the beginning. We have the same bug in the function we use for other marker types (e.g. composition and spelling) so I'm fixing it there too. There's still another issue that this CL does not fix that prevents the first letter itself from becoming highlighted. I am not yet sure what else needs to be changed to fix this. Bug: 798004 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: If1f09dd5485be8f2817e06b3b3ef65f8b1bb11ec Reviewed-on: https://chromium-review.googlesource.com/847834 Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org> Commit-Queue: Ryan Landay <rlanday@chromium.org> Cr-Commit-Position: refs/heads/master@{#526740} [add] https://crrev.com/abf98057c347e32294768dda0efc45edfb8f74d2/third_party/WebKit/LayoutTests/paint/markers/first-letter.html [add] https://crrev.com/abf98057c347e32294768dda0efc45edfb8f74d2/third_party/WebKit/LayoutTests/platform/linux/paint/markers/first-letter-expected.png [add] https://crrev.com/abf98057c347e32294768dda0efc45edfb8f74d2/third_party/WebKit/LayoutTests/platform/linux/paint/markers/first-letter-expected.txt [add] https://crrev.com/abf98057c347e32294768dda0efc45edfb8f74d2/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/paint/markers/first-letter-expected.png [add] https://crrev.com/abf98057c347e32294768dda0efc45edfb8f74d2/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/paint/markers/first-letter-expected.txt [add] https://crrev.com/abf98057c347e32294768dda0efc45edfb8f74d2/third_party/WebKit/LayoutTests/platform/mac/paint/markers/first-letter-expected.png [add] https://crrev.com/abf98057c347e32294768dda0efc45edfb8f74d2/third_party/WebKit/LayoutTests/platform/mac/paint/markers/first-letter-expected.txt [add] https://crrev.com/abf98057c347e32294768dda0efc45edfb8f74d2/third_party/WebKit/LayoutTests/platform/win/paint/markers/first-letter-expected.png [add] https://crrev.com/abf98057c347e32294768dda0efc45edfb8f74d2/third_party/WebKit/LayoutTests/platform/win/paint/markers/first-letter-expected.txt [modify] https://crrev.com/abf98057c347e32294768dda0efc45edfb8f74d2/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
,
Jan 3 2018
Will be fixed in Chrome 65 |
||||
►
Sign in to add a comment |
||||
Comment 1 by vamshi.k...@techmahindra.com
, Dec 29 2017Components: -UI UI>Browser>Search
Labels: -Type-Bug -Pri-2 hasbisect-per-revision M-65 Triaged-ET OS-Mac OS-Windows Pri-1 Type-Bug-Regression
Owner: xiaoche...@chromium.org
Status: Assigned (was: Unconfirmed)