Open Bug 1360074 Opened 7 years ago Updated 2 years ago

Anonymous/XUL inspection: some bindings are destroyed when inspected, if they contain whitespace text nodes

Categories

(DevTools :: Inspector, defect, P3)

52 Branch
defect

Tracking

(firefox-esr52 wontfix, firefox-esr60 wontfix, firefox61 wontfix, firefox62 wontfix, firefox63 fixed)

REOPENED
Firefox 63
Tracking Status
firefox-esr52 --- wontfix
firefox-esr60 --- wontfix
firefox61 --- wontfix
firefox62 --- wontfix
firefox63 --- fixed

People

(Reporter: 684sigma, Unassigned)

References

Details

(Keywords: regression)

Attachments

(1 file)

I noticed a problem in Firefox Beta 53. It also happens in Beta 52, Nightly 55. Doesn't happen in ESR 45.
When inspecting some bindings containing whitespace text nodes, they are destroyed and created again.
Here's how to reproduce the bug:

1. Set pref devtools.inspector.showAllAnonymousContent to true.
2. Open https://www.w3schools.com/html/mov_bbb.mp4
3. Open inspector and Alt+Click on the arrow at the left side of <video> tag

Result: All contents of <video> are expanded, then immediately destroyed*
Expected: Bindings shouldn't be destroyed just because they are being inspected
See Also: → 1360072
* - it's a little tricky to enable logging in video bindings to make them log messages on create/destroy, but it's not necessary, because Comment #2 provides a better way to reproduce the bug.
** - you can verify that the issue is triggered by whitespace text nodes and doesn't happen without them:
1) Open https://www.w3schools.com/html/mov_bbb.mp4 in non-e10s window.
2) Inspect <videocontrols> tag in browser toolbox (without changing frame)
3) Right-click "<videocontrols>", click "Use in Console". Execute "v1 = temp0" in console (in browser toolbox)
4) Execute this code to remove anonymous whitespace nodes:
document.getAnonymousNodes(v1)[0].removeChild(document.getAnonymousNodes(v1)[0].childNodes[0]);
document.getAnonymousNodes(v1)[0].removeChild(document.getAnonymousNodes(v1)[0].childNodes[1]);
document.getAnonymousNodes(v1)[0].removeChild(document.getAnonymousNodes(v1)[0].childNodes[2]);
5) Open inspector in normal devtools and Alt+Click on the arrow at the left side of <video> tag
Attached file test_bindings.xml
1. Save attached file with bindings
2. Apply this global style in Firefox using Stylish or userChrome.css and restart browser:
        /* AGENT_SHEET */
        videocontrols {
            -moz-binding: url("file:///C:/<path_to_the_saved_file>/test_bindings.xml#test")!important;
        }
3. Open https://www.w3schools.com/html/mov_bbb.mp4
4. Follow the instruction from Comment #0

Result: Child nodes of <videocontrols> disappear just like in Comment #0, but now you can see in browser console that bindings are actually destroyed
Expected: Bindings shouldn't be destroyed just because they are being inspected
Note that Comment #0 isn't reproducible in Beta 52, because the new bindings of video controls weren't applied, but Comment #2 is reproducible.
Has Regression Range: --- → yes
Has STR: --- → yes
Keywords: regression
See Also: → 1360077
Has Regression Range: yes → ---
Too late to fix this in 53, and unlikely we will get a fix into 54.
DevTools bug triage (filter on CLIMBING SHOES).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Product: Firefox → DevTools
I think this was fixed by Bug 1465873 as per local testing of Comment 0 and https://bugzilla.mozilla.org/show_bug.cgi?id=1465873#c9. Would you be able to confirm the fix on Nightly?
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(684sigma)
Resolution: --- → FIXED
FYI, the reporter is inactive.
Assignee: nobody → jdescottes
Flags: needinfo?(684sigma)
Target Milestone: --- → Firefox 63
Flags: qe-verify+
The issue is still reproducible using the STR from Comment 0 on the first try. If the arrow is clicked the second time, the information from the video tag is no longer dismissed, same as on the affected builds.
The tests were performed on Firefox 64.0a1 (2018-09-13) and on Firefox 63.0b5, under Windows 10x64 and Ubuntu 16.04x64.

Note that the issue is not reproducible if the `dom.ua_widget.enabled` pref is set as true, no matter what value does devtools.inspector.showAllAnonymousContent pref has.

I am reopening this issue.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee: jdescottes → nobody
Since this doesn't affect the UA widget, I think we should wait for that to ship. I don't expect we'll fix inspection of the in-content XBL implementation in the meantime.
Depends on: 1484048
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: