Closed Bug 1496716 Opened 6 years ago Closed 6 years ago

Flexbox inspector fails when encountering text node as flex item

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1497181

People

(Reporter: rcaliman, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Steps:

- Run this in a new tab:
data:text/html,<style>div {display: flex }</style><div>test

- Open DevTools, switch to Inspector, Layout sidebar
- In the Elements panel, select the DIV with the "flex" badge

Result:

Errors thrown in the toolbox console. Layout sidebar doesn't update to show information about the flex container.


Expected:

Information about the flex container should show up in the Layout sidebar.


The cause seems to be that FlexItemActor calls getBoundingClientRect() on the text node which throws an uncaught error that cascades through the protocol:
https://searchfox.org/mozilla-central/source/devtools/server/actors/layout.js#157
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: