Closed Bug 1351997 Opened 8 years ago Closed 7 years ago

CSS Grid highlighter offset when the page is zoomed out

Categories

(DevTools :: Inspector, defect, P3)

defect

Tracking

(firefox56 fixed)

RESOLVED FIXED
Firefox 56
Tracking Status
firefox56 --- fixed

People

(Reporter: pbro, Assigned: zer0)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Attached image offset.PNG (deleted) —
STR: - open http://codepen.io/rachelandrew/pen/QKwvxJ - open the grid inspector in the layout panel - highlight the grid - zoom out many times (up to 30%) ==> The grid lines have a visible offset compared to the actual grid on the page. The offset can be even bigger in some other use cases. For instance, I tested on http://gridbyexample.com/examples/ and highlighted the 11th example down the page. The offset there was maybe 5px. See the attached screenshot.
Assignee: nobody → zer0
Status: NEW → ASSIGNED
Priority: -- → P3
No longer blocks: 1347964
We the current implementation, the issue should be limited now. I do believe the patch in bug 1297072 mitigate this. In my tests at least, it happens only with specific zoom's value (67%, for example) and the offset is just one pixel. I'm going to make this bug depends by bug 1370278 for the time being, since I think using the new native API would also solve this issue.
Depends on: 1370278
Okay, this issue bugged me for a while, especially when I found that the amount of offset could be related to the position of the grid – the offset was greater if the grid had higher top / left position, e.g. in magnitude of thousands pixels. You can test it using the `grid.html` as test case I'm going to attach, zoom out makes the issue more obvious and frequent. (if you zoom in instead, you will probably see another bug I just filed: bug 1371912) about zoom in and virtual canvas. I discovered that the culprit was a piece of the original grid implementation I wrongly kept once I implemented the virtual canvas. It's a one-line fixed that is obvious once you found it. :) I spent too much time thinking that the matrix calculation was somehow wrong, or the rounding of the grid / lines values.
Attached file grid.html (deleted) —
Comment on attachment 8876384 [details] Bug 1351997 - removing any approximation when virtual canvas is updated; https://reviewboard.mozilla.org/r/147768/#review152304
Attachment #8876384 - Flags: review?(pbrosset) → review+
Pushed by mferretti@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/b60f8b19a691 removing any approximation when virtual canvas is updated; r=pbro
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56
I have successfully reproduced this bug with Nightly 55.0a1 (2017-03-30) (32-bit) on windows 10(32bit) this bug is verified fix with latest Nightly 56.0a1 (2017-06-14) (32-bit) Build ID: 20170614030206 Mozilla/5.0 (Windows NT 10.0; rv:56.0) Gecko/20100101 Firefox/56.0
QA Whiteboard: [bugday-20170614]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: