textnode is located outside of element

VERIFIED FIXED in Firefox 55

Status

()

Firefox
Developer Tools: Inspector
P1
normal
VERIFIED FIXED
9 months ago
6 months ago

People

(Reporter: Alice0775 White, Assigned: pbro)

Tracking

({regression})

55 Branch
Firefox 55
x86
Windows 10
regression
Points:
---
Bug Flags:
qe-verify +

Firefox Tracking Flags

(firefox-esr45 unaffected, firefox52 unaffected, firefox-esr52 unaffected, firefox53 unaffected, firefox54 unaffected, firefox55 verified)

Details

(URL)

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Reporter)

Description

9 months ago
Reproducible: always

Steps To Reproduce:
1. Open data:text/html,<h1>textnode</h1> for example
2. Right click on textnode and choose "Inspect Element"

Actual Results:
<h1></h1>textnode

Ecpected Results:
<h1>textnode</h1>

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=6c7077f794e71b96be34695e91b643614f6fcacc&tochange=fbe6aa624f57bdbbe5408733e9e588a290c7f078
(Assignee)

Comment 1

9 months ago
Thanks for finding this regression quickly after I landed bug 1355064!

Turns out the old way of generating the markup also generated comment nodes, and these nodes aren't there anymore.
When inserting the 'textnode' between <h1> and </h1> we are navigation the DOM using nextSibling, and it's very prone to errors because if we change the DOM even a little bit, this part will break.
So it's an easy fix. I'll do that quickly.
Unfortunately we didn't have an automated test to prevent this in the first place. I'll add one.
Assignee: nobody → pbrosset
Status: NEW → ASSIGNED
Priority: -- → P1
Comment hidden (mozreview-request)

Comment 4

9 months ago
mozreview-review
Comment on attachment 8858646 [details]
Bug 1356873 - Insert inline text nodes between open and close tags;

https://reviewboard.mozilla.org/r/130616/#review133234
Attachment #8858646 - Flags: review?(gl) → review+
status-firefox52: --- → unaffected
status-firefox53: --- → unaffected
status-firefox54: --- → unaffected
status-firefox-esr45: --- → unaffected
status-firefox-esr52: --- → unaffected
(Reporter)

Updated

9 months ago
Duplicate of this bug: 1357293

Comment 6

9 months ago
Pushed by pbrosset@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/16be1871115c
Insert inline text nodes between open and close tags; r=gl

Comment 7

9 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/16be1871115c
Status: ASSIGNED → RESOLVED
Last Resolved: 9 months ago
status-firefox55: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55

Comment 8

9 months ago
I have reproduced this bug with Nightly 55.0a1 (2017-04-16) on Windows 8.1 , 64 Bit ! 

This bug's fix is Verified with latest Nightly !

Build   ID    20170419030223
User Agent    Mozilla/5.0 (Windows NT 6.3; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0

[bugday-20170419]

Updated

6 months ago
Status: RESOLVED → VERIFIED
status-firefox55: fixed → verified
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.