Text highlight mismatch in view-source when layout.css.devPixelsPerPx is >= 1.2

Bug #1798103 reported by Jani Uusitalo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Confirmed
Unknown
firefox (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

== The issue ==
Search and text selection highlighting visuals get mismatched with the actual selection in view-source when the value of `layout.css.devPixelsPerPx` is 1.2 or larger.

== Steps to reproduce ==
* Open `about:config`, find `layout.css.devPixelsPerPx` and change the value from default (-1.0) to 1.2.
* Open a view-source view with long lines: `view-source:https://www.youtube.com/user/10asti10`
* hit Ctrl+f, search for rss
* using the LMB, try selecting some text, then copy and paste it somewhere

== What happens ==
Screenshot 1: the highlighted text on the page is not ”rss”. The highlight doesn’t even adhere to letter widths.

Screenshot 2: the pasted text is not even close to what you’ve selected to copy.

== What I expect to happen ==
For the search to hightlight an occurence of ”rss”, and for the pasted text to correspond to what I’ve selected from the view-source view.

== Other info ==
* In my testing, a devPixelsPerPx value of 1.1 seems to not trigger this, whereas 1.2 and anything above does.
* In addition to 18.04 (whence the attached info is from) I’ve reproduced this in a VM running up-to-date 18.10.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: firefox 62.0.3+build1-0ubuntu0.18.04.1
ProcVersionSignature: Ubuntu 4.15.0-36.39-generic 4.15.18
Uname: Linux 4.15.0-36-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.9-0ubuntu7.4
Architecture: amd64
BuildID: 20181002130007
CurrentDesktop: ubuntu:GNOME
Date: Tue Oct 16 16:59:28 2018
InstallationDate: Installed on 2016-10-13 (733 days ago)
InstallationMedia: Ubuntu-Server 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=fi_FI.UTF-8
 SHELL=/bin/bash
SourcePackage: firefox
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jani Uusitalo (uusijani) wrote :
Revision history for this message
Jani Uusitalo (uusijani) wrote :
Changed in firefox (Ubuntu):
importance: Undecided → Low
Revision history for this message
Olivier Tilloy (osomon) wrote :

I can reliably reproduce the bug with the steps provided.

@Jani: would you mind reporting the bug upstream at https://bugzilla.mozilla.org/enter_bug.cgi#h=dupes%7CFirefox and sharing the link to it here?

When I search for upstream bug reports containing "layout.css.devPixelsPerPx", I find several issues that are probably related to what you're seeing, but none mention the view-source: view, so I think a new bug would be useful.

Thanks!

Changed in firefox (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Jani Uusitalo (uusijani) wrote :

Created attachment 9025870
screenshot 1: highlighted text on the page is not ”rss”

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0

Steps to reproduce:

1. Open `about:config`, find `layout.css.devPixelsPerPx` and change the value from default (-1.0) to 1.2.
2. Open a view-source view with long lines: `view-source:https://www.youtube.com/user/10asti10`
3. hit Ctrl+f, search for rss
4. using the LMB, try selecting some text, then copy and paste it somewhere

Actual results:

After step 3, the highlighted text on the page is not "rss". The highlight doesn’t even adhere to letter widths (screenshot 1).

After step 4, the pasted text is not even close to what you’ve selected to copy.

Expected results:

For the search to hightlight an occurence of "rss", and for the pasted text to correspond to what I’ve selected from the view-source view.

Revision history for this message
In , Jani Uusitalo (uusijani) wrote :

I first reported this against 62 in Launchpad: https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1798103

Firefox was since updated to 63 in Ubuntu and the issue remains.

Revision history for this message
Jani Uusitalo (uusijani) wrote :

Thanks Olivier, I've now added the link to my upstream report.

Revision history for this message
In , Adrian-florinescu (adrian-florinescu) wrote :

I tried to reproduce with no luck this issue on Ubuntu 16.04 with:
- Firefox 63 canonical version (63.0 20181023214907)
- Firefox 63.0.3 Mozilla Release (63.0.3 20181114214635)
- Firefox 65.0a1 20181120220133

For step 3 on `view-source:https://www.youtube.com/user/10asti10` with `layout.css.devPixelsPerPx` set to 1.2 I get two "rss" results, the Ctrl+F finds and focuses the first rss and the copy paste works properly.

Jani, what am I missing here?

Revision history for this message
In , Jani Uusitalo (uusijani) wrote :

Adrian: Thanks for taking a look! I'm using Ubuntu 18.04, and that appears to be crucial here: I created a 16.04 VM, installed all in-release updates (including Firefox 63), and just as you, was unable to reproduce the issue. I then upgraded the VM to 18.04 and the bug immediately manifested again.

Revision history for this message
In , Adrian-florinescu (adrian-florinescu) wrote :

(In reply to Jani Uusitalo from comment #3)
> I then upgraded the VM to 18.04 and the bug immediately manifested again.

Now that makes sense, reproduced the issue on Ubuntu 18.04.1 with:
-63.0.3 20181114214635
-64.0b11 20181119162153
-65.0a1 20181121220101

So, since this issue cannot be reproduced on Ubuntu 16.04 or Widows 10 or Osx 10.13, I would assume that this is localized to Ubuntu 18.04.

Revision history for this message
In , Jani Uusitalo (uusijani) wrote :

So I did a little more digging, and found that this actually first cropped up in Ubuntu 17.10.

I then ran mozregression (back on 18.04, my main desktop) and here's what it found:

    7:12.48 INFO: Last good revision: 64bab5cbb9b63808d04babfbcfba3175fd99f69d (2017-10-25)
    7:12.48 INFO: First bad revision: aa958b29c149a67fce772f8473e9586e71fbdb46 (2017-10-26)
    7:12.48 INFO: Pushlog:
    https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=64bab5cbb9b63808d04babfbcfba3175fd99f69d&tochange=aa958b29c149a67fce772f8473e9586e71fbdb46

After that "There are no build artifacts on inbound for these changesets (they are probably too old)."

As this was my first time ever using mozregression, I have no idea how useful that was, but if there's some way I can narrow this down further, I'd be happy to.

Changed in firefox:
status: Unknown → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.