Open Bug 1816542 Opened 2 years ago Updated 2 years ago

Grid highlighter draws all lines, even when they are too close together.

Categories

(DevTools :: Inspector: Layout, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: bradwerth, Unassigned)

References

Details

Attachments

(1 file)

Attached file grid-wide.html

The grid highlighter takes a long time to draw the lines of a grid with many columns. Ideally, the highlighter drawing code should have an alternative approach for times when the gaps between lines are too small to be distinguished. The attached testcase is one such case.

Depends on: 1815140
Type: enhancement → defect

Hi Brad,

Is there anything we could get from the platform in order to detect such bad cases?
Or would we have to implement custom logic in DevTools? Is this something you would be interested to tackle? :)

Note: we show a Cannot show outline for this grid in the sidepanel, so we should check why we bail out in this case and if this something worth reusing.

Severity: -- → S3
Flags: needinfo?(bwerth)
Priority: -- → P3

(In reply to Julian Descottes [:jdescottes] from comment #1)

Hi Brad,

Is there anything we could get from the platform in order to detect such bad cases?
Or would we have to implement custom logic in DevTools? Is this something you would be interested to tackle? :)

I think DevTools has all the info it needs to handle this. The logic would be something like measuring the device pixel distance between one line and the next and if it's less than N, instead of drawing the line, either don't draw it or add a shaded region or something. It's just a visual choice and we wouldn't be denying the user an affordance because the line wouldn't have been usable anyway.

And, no, this is not a bug for me. I don't know anything about Canvas drawing.

Flags: needinfo?(bwerth)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: