Exception in getParentGridElement with subgrid style on root element
Categories
(DevTools :: Inspector: Layout, defect, P1)
Tracking
(firefox70 verified)
| Tracking | Status | |
|---|---|---|
| firefox70 | --- | verified |
People
(Reporter: MatsPalmgren_bugz, Assigned: pbro)
Details
(Keywords: testcase)
Attachments
(1 file)
STR
0. (use a recent Nightly build, or the testcase might crash the tab)
- load the testcase in bug 1569628
- open Inspector and select the HTML element
ACTUAL RESULTS
The rules panel becomes empty.
In the Terminal window I see:
console.error: "Error writing response to: getApplied"
console.error: "Error while calling actor 'pagestyle's method 'getApplied'" "Argument 1 of Window.getComputedStyle does not implement interface Element."
console.error: "getParentGridElement@resource://devtools/server/actors/utils/inactive-property-helper.js:604:38\nisGridItem@resource://devtools/server/actors/utils/inactive-property-helper.js:574:19\nget gridItem@resource://devtools/server/actors/utils/inactive-property-helper.js:410:17\nwhen@resource://devtools/server/actors/utils/inactive-property-helper.js:106:21\nisPropertyUsed/<@resource://devtools/server/actors/utils/inactive-property-helper.js:259:21\nisPropertyUsed@resource://devtools/server/actors/utils/inactive-property-helper.js:239:21\nform/form.declarations<@resource://devtools/server/actors/styles.js:1438:46\nform@resource://devtools/server/actors/styles.js:1433:40\nwrite@resource://devtools/shared/protocol/types.js:358:32\ntypes.addArrayType/write/<@resource://devtools/shared/protocol/types.js:220:33\nwrite@resource://devtools/shared/protocol/types.js:220:16\nwrite@resource://devtools/shared/protocol/types.js:268:39\nwrite@resource://devtools/shared/protocol/Response.js:98:22\nwrite@resource://devtools/shared/protocol/Response.js:43:28\nsendReturn@resource://devtools/shared/protocol/Actor.js:164:38\npromise callbackgenerateRequestHandlers/</handler/<@resource://devtools/shared/protocol/Actor.js:186:14\n_queueResponse@resource://devtools/shared/protocol/Actor.js:107:28\nhandler@resource://devtools/shared/protocol/Actor.js:183:14\nonPacket@resource://devtools/server/debugger-server-connection.js:378:58\nreceiveMessage@resource://devtools/shared/transport/child-transport.js:66:16\nMessageListener.receiveMessage_addListener@resource://devtools/shared/transport/child-transport.js:40:14\nready@resource://devtools/shared/transport/child-transport.js:57:10\n_onConnection@resource://devtools/server/debugger-server.js:491:15\nconnectToParent@resource://devtools/server/debugger-server.js:349:17\nonConnect<@resource://devtools/server/startup/frame.js:62:35\nexports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:111:22\nMessageListener.receiveMessage*@resource://devtools/server/startup/frame.js:92:23\n@resource://devtools/server/startup/frame.js:174:5\n"
console.error: "Protocol error (unknownError): Argument 1 of Window.getComputedStyle does not implement interface Element."
console.error: "Protocol error (unknownError): Argument 1 of Window.getComputedStyle does not implement interface Element."
console.error: "Protocol error (unknownError): Argument 1 of Window.getComputedStyle does not implement interface Element."
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
| Assignee | ||
Comment 1•6 years ago
|
||
The problem is on this line of code.
If the element we try to get the computed style for is actually not an ElementNode but a Document, then the call fails.
In this for loop we go up the DOM tree to find the parent grid container for an element. But the element in question is already the documentElement (the <html> node), which can't be a grid item itself, it can only be a container. So we should just bail out to prevent the breakage.
I'll take this.
| Reporter | ||
Comment 2•6 years ago
|
||
FYI, in this situation, the element will still be a grid container, just not a subgrid.
| Assignee | ||
Comment 3•6 years ago
|
||
Comment 5•6 years ago
|
||
| bugherder | ||
Comment 6•6 years ago
|
||
| bugherder uplift | ||
Updated•6 years ago
|
Comment 7•6 years ago
•
|
||
Confirmed issue with 70.0a1 (2019-08-25).
Verified fix with 70.0b14.
Updated•6 years ago
|
Description
•