Closed
Bug 1498143
Opened 2 years ago
Closed 2 years ago
Screenshot node menu item doesn't do anything
Categories
(DevTools :: General, defect, P1)
Tracking
(firefox65 verified)
VERIFIED
FIXED
Firefox 65
Tracking | Status | |
---|---|---|
firefox65 | --- | verified |
People
(Reporter: gk, Assigned: jdescottes)
References
()
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0 Steps to reproduce: 1. Go to 2. Select div id="dvz-1842_ai2html_trojan-box" 3. Right-click and click on Screenshot node Actual results: Nothing Expected results: A screenshot is saved
https://www.bloomberg.com/news/features/2018-10-04/the-big-hack-how-china-used-a-tiny-chip-to-infiltrate-america-s-top-companies
Flags: needinfo?(gk)
Comment 3•2 years ago
|
||
>2. Select div id="dvz-1842_ai2html_trojan-box" How do you select that div ? >https://www.bloomberg.com/news/features/2018-10-04/the-big-hack-how-china-used-a-tiny-chip-to-infiltrate-america-s-top-companies There is no div with that name in the source of that page. Please provide a screenshot of your selection (use the windows screenshot function).
Flags: needinfo?(gk)
Updated•2 years ago
|
Component: Untriaged → Screenshots
Comment 5•2 years ago
|
||
This looks like dev tools screenshot issue
Component: Screenshots → General
Product: Firefox → DevTools
Comment 6•2 years ago
|
||
Thanks for filing, I was able to reproduce the issue, and when it happened the following JS errors appeared in the Browser Console: > Error while calling actor 'screenshot's method 'capture' node is null; can't access its "ownerDocument" property > getRect@resource://devtools/shared/base-loader.js -> resource://devtools/shared/layout/utils.js:282:7 > createScreenshotDataURL@resource://devtools/shared/base-loader.js -> resource://devtools/shared/screenshot/capture.js:70:37 > captureScreenshot@resource://devtools/shared/base-loader.js -> resource://devtools/shared/screenshot/capture.js:41:10 > capture@resource://devtools/shared/base-loader.js -> resource://devtools/server/actors/screenshot.js:18:12 > handler@resource://devtools/shared/base-loader.js -> resource://devtools/shared/protocol.js:1198:21 > onPacket@resource://devtools/shared/base-loader.js -> resource://devtools/server/main.js:1313:15 > receiveMessage@resource://devtools/shared/base-loader.js -> resource://devtools/shared/transport/child-transport.js:66:5 > Protocol error (unknownError): node is null; can't access its "ownerDocument" property
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P1
Comment 7•2 years ago
|
||
I think this is related to capturing nodes within iframes. The code in devtools/shared/screenshot/capture.js:70 seems to always use the top level document, but then can't find the target node by its selector if that node is inside a sub-document (in an iframe).
Comment 8•2 years ago
|
||
Minimal test URL: data:text/html,<iframe srcdoc="<div id=test>screenshot me</div>"> Inspect the element inside of the iframe, right click on it in the inspector, try to use the "screenshot node" menu.
Comment 9•2 years ago
|
||
This is an idea for how this might work. This is creating an array of parent iframe selectors in the inspector, and then using this array to find the correct node. I do not have time to work on this right now, but if this is the right approach, then we need to polish this up and potentially add: - tests (there does not seem to be any tests today for the node screenshot feature) - supports for shadow DOM (although this could be done in a follow-up too)
Assignee: nobody → pbrosset
Updated•2 years ago
|
Assignee: pbrosset → nobody
Assignee | ||
Updated•2 years ago
|
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Assignee | ||
Comment 10•2 years ago
|
||
Comment 11•2 years ago
|
||
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9ee66620694f Pass nodeActorID to screenshot actor to enable feature in iframes and shadowroots;r=pbro,yulia
Comment 12•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9ee66620694f
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
Updated•2 years ago
|
Flags: qe-verify+
Comment 13•2 years ago
|
||
I have managed to reproduce this issue on an affected Firefox 62.0.3 build using Windows 10 x64 by following the STR from comment 0. This issue is verified fixed using Firefox 65.0b6 on the following OSes: Windows 10 x64, Ubuntu 18.04 x64, macOS 10.14.
Updated•2 years ago
|
Flags: qe-verify+
Updated•2 years ago
|
Flags: qe-verify+
You need to log in
before you can comment on or make changes to this bug.
Description
•