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

REOPENED
Unassigned

Status

P3
normal
REOPENED
2 years ago
3 months ago

People

(Reporter: 684sigma, Unassigned)

Tracking

({regression})

52 Branch
Firefox 63
regression
Bug Flags:
qe-verify +

Firefox Tracking Flags

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

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
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
(Reporter)

Updated

2 years ago
See Also: → bug 1360072
(Reporter)

Comment 1

2 years ago
* - 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
(Reporter)

Comment 2

2 years ago
Created attachment 8862259 [details]
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
(Reporter)

Comment 3

2 years ago
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: → bug 1360077
(Reporter)

Updated

2 years ago
Has Regression Range: yes → ---

Updated

2 years ago
status-firefox53: --- → affected
status-firefox54: --- → affected
status-firefox55: --- → affected
status-firefox-esr45: --- → affected
Too late to fix this in 53, and unlikely we will get a fix into 54.
status-firefox53: affected → wontfix
status-firefox54: affected → fix-optional
DevTools bug triage (filter on CLIMBING SHOES).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
status-firefox55: affected → wontfix
status-firefox56: --- → wontfix
status-firefox57: --- → wontfix

Updated

6 months ago
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
Last Resolved: 5 months ago
status-firefox53: wontfix → ---
status-firefox54: fix-optional → ---
status-firefox55: wontfix → ---
status-firefox56: wontfix → ---
status-firefox57: wontfix → ---
status-firefox-esr45: affected → ---
Flags: needinfo?(684sigma)
Resolution: --- → FIXED
FYI, the reporter is inactive.
Assignee: nobody → jdescottes
status-firefox61: --- → wontfix
status-firefox62: --- → wontfix
status-firefox63: --- → fixed
status-firefox-esr52: --- → wontfix
status-firefox-esr60: --- → wontfix
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
You need to log in before you can comment on or make changes to this bug.