New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 798004 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Text search highlighting incorrect

Reported by isakovi...@gmail.com, Dec 28 2017

Issue description

UserAgent: 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:
 
Screenshot from 2017-12-28 15:33:47.png
461 KB View Download
Cc: vamshi.k...@techmahindra.com
Components: -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)
Able to reproduce this issue on reported version 63.0.3239.108 and latest canary 65.0.3305.0 using Windows 10, Ubuntu 14.04 and Mac 10.13.1 with the confirmation given by reporter from comment#8.

Good Build: 57.0.2942.0
Bad Build: 57.0.2943.0

You are probably looking for a change made after 436254 (known good), but no later than 436255 (first known bad).
CHANGELOG URL:
The script might not always return single CL as suspect as some perf builds might get missing due to failure.
  https://chromium.googlesource.com/chromium/src/+log/a253a1bb314e9563c8fc45d3bf6b9651855e0f45..5185769b9ba7e9239d68c7dc672a27dd19b1685f
Reviewed-on: https://codereview.chromium.org/2541163003

Suspecting same from changelog.

@xiaochengh: Please confirm the issue and help in re-assigning if it is not related to your change. 

Thanks!
Components: -UI>Browser>Search Blink>Editing
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
Owner: rlanday@chromium.org
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.
Thanks for taking it over.

Btw, other markers (e.g., spelling) are also off by one character.
Project Member

Comment 5 by bugdroid1@chromium.org, 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

Status: Fixed (was: Assigned)
Will be fixed in Chrome 65

Sign in to add a comment