Closed Bug 1356873 Opened 4 years ago Closed 4 years ago
textnode is located outside of element
59 bytes, text/x-review-board-request
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
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 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+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/16be1871115c Insert inline text nodes between open and close tags; r=gl
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]
Screenshots of the: * regression: https://screenshots.mattn.ca/compare/?oldProject=mozilla-central&oldRev=1a1069b27f40edbfbcf1aa81a5e7dfb39845a5fe&newProject=mozilla-central&newRev=d09143959b1af76d12d4429e92b1cd07544d0bef * fix: https://screenshots.mattn.ca/compare/?oldProject=mozilla-central&oldRev=722fdbff1efc308a22060e75b603311d23541bb5&newProject=mozilla-central&newRev=1a81aadc2510f227792cd4d789c8333329468351&filter=Toolbox
You need to log in before you can comment on or make changes to this bug.