Closed Bug 1437539 Opened 6 years ago Closed 2 years ago

[Find Toolbar] Background for matching words is not correctly centered on the word.

Categories

(Firefox :: PDF Viewer, defect, P3)

defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox-esr60 --- wontfix
firefox58 --- wontfix
firefox59 --- wontfix
firefox60 --- wontfix
firefox61 --- wontfix
firefox62 --- wontfix

People

(Reporter: obotisan, Unassigned)

References

Details

(Keywords: regression)

Attachments

(3 files)

[Affected versions]:
- Nightly 60.0a1
- beta 59.0b8
- Firefox 58.0.1

[Affected platforms]:
- Windows 10 x64
- Ubuntu 16.04 x64
- macOS 10.13

[Steps to reproduce]:
1. Open any site or a pdf in Firefox (e.g. http://www.pdf995.com/samples/pdf.pdf)
2. Open "Find Toolbar" (Ctrl/Cmd + F)
3. Search for a word (e.g. pdf). To notice the issue better activate "Highlight All".

[Expected result]:
- The background is perfectly centered on the matching word.

[Actual result]:
- The background is misplaced on the matching word.

[Regression range]:
- Last good revision: 202b199b9fcf37a687bef882f2513e191f079622 (2015-11-14)
- First bad revision: 51fa3e0d4f7bb2bf3457261091b1cb7a75e1255d (2015-11-15)
- Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=202b199b9fcf37a687bef882f2513e191f079622&tochange=51fa3e0d4f7bb2bf3457261091b1cb7a75e1255d

[Additional notes]:
- Using Ubuntu the misplacement can be seen better than using Windows or mac.
This seems like a PDF.js bug, rather than a find toolbar bug, given that we updated pdf.js in that range. 

Oana, can you please upload a screenshot?
Flags: needinfo?(oana.botisan)
Attached image not centered 1.png
This behaviour is not reproduced only on pdfs. I used that example because the issue can be seen easier, but as you can see from the screenshots this happens even on sites.
Flags: needinfo?(oana.botisan)
Attached image not centered 2.png
Attached image not centered 3.png
In fact, this does only reproduce on PDFs, since they're using a different highlighting mechanism than the browser does.

In the browser, the text may not be centered, because of the font and its offset specification related to the line-height: a font may choose to shift the characters up to make room for dangling letters or ligatures.
What the browser renderer does is fill the background of the range of a match, which is basically a rectangle that encompasses the matched text and it's (vertical) spacing.

Therefore I say this is a WONTFIX for browser, but PDF.js needs a bit of work here.
Component: Find Toolbar → PDF Viewer
Product: Toolkit → Firefox
Priority: -- → P3

It is probably fixed by Ryan VanderMeulen — Bug 1566024 - Update pdf.js to version 2.3.27. r=bdahl

Works for me with Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0

Mozregression
fixed between 2019-07-14 and 2019-07-15
pushlog_url: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=d6eed298a41b1536a7f8624a5a4728847ac0b77a&tochange=c0bcda96a954fe7a3700466bda256aea58189ac9

Status: NEW → RESOLVED
Closed: 2 years ago
Depends on: 1566024
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: