Open Bug 1153132 Opened 10 years ago Updated 2 years ago

Highlighter nodeinfobar isn't correctly positioned with negative margins

Categories

(DevTools :: Inspector, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: pbro, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [btpp-backlog])

Attachments

(1 file)

Attached image negative-margin-nodeinfobar.png (deleted) —
Consider the attached screenshot. The highlighted element has a negative top margin. This makes the nodeinfobar appear lower than it should, and therefore, on top of the element itself. There is some logic in the BoxModelHighlighter that places the nodeinfobar correctly in all cases, but I think it considers the margin region as the outer-most region, and it uses this to place the infobar. But that, of course, is wrong in case the margin is negative.
Depends on: 797710
Adding url & STRs: data:text/html,<style>div{margin-top:-20px;padding:30px;background:pink;border:10px solid red;width:500px;height:100px}</style><div>test</div><div>test</div> STRs: - open data:text/html,<style>div{margin-top:-20px;padding:30px;background:pink;border:10px solid red;width:500px;height:100px}</style><div>test</div><div>test</div> - highlight the second div - check the position of the "nodeinfo" tooltip (black tooltip containing "div | 580 x 180") ER: The tooltip should not overlap the element. AR: The tooltip is displayed on top of the element.
Priority: -- → P3
Whiteboard: [btpp-backlog]
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: