Closed Bug 1355886 Opened 7 years ago Closed 7 years ago

Deleted element in inspector is incorrectly restored on Ctrl+Z, if whitespace text node is present

Categories

(DevTools :: Inspector, defect, P1)

55 Branch
defect

Tracking

(firefox-esr52 unaffected)

RESOLVED FIXED
Firefox 55
Tracking Status
firefox-esr52 --- unaffected

People

(Reporter: 684sigma, Assigned: jdescottes)

References

Details

(Keywords: regression)

Attachments

(1 file)

I decided to check how Bug 1345529 was fixed, and noticed a new bug in Nightly 55 (2017-04-11). It doesn't happen in earlier versions, but I don't know if it should be threated like a new bug, because delete operation in markup is partially broken since Bug 1304685
Here's how to reproduce the bug:

1. Navigate to this url - data:text/html,<div><p><a>test1</a> <b>test2</b></p></div>
2. Open inspector, delete node <a>
3. Press Ctrl+Z

Result: Sequence of elements in markup: <b>, then <a>
Expected: Sequence of elements in markup: <a>, then <b>
Mozregression-gui generated this regression range:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=e2bcdd1501405f8bc8e5841a06088fd3fc179878&tochange=d508a91f09e9de268da1b7831c823c6a42f16526
->
1345529 – [Regression] Partially elements may lost when remove element in Inspector
https://bugzilla.mozilla.org/show_bug.cgi?id=1345529
Blocks: 1345529
Has Regression Range: --- → yes
Has STR: --- → yes
Keywords: regression
Assignee: nobody → jdescottes
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P1
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=57224f12d8e47b208abab450eeb5ed2a1fe356de 

(the eslint failure was fixed in the version submitted to mozreview)
Comment on attachment 8857574 [details]
Bug 1355886 - fix regression when undoing delete node next to a whitespace sibling;

https://reviewboard.mozilla.org/r/129552/#review132900
Attachment #8857574 - Flags: review?(pbrosset) → review+
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/86b5e409e093
fix regression when undoing delete node next to a whitespace sibling;r=pbro
https://hg.mozilla.org/mozilla-central/rev/86b5e409e093
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
I have reproduced this bug with Nightly 55.0a1 (2017-04-12) 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]
Comment on attachment 8857574 [details]
Bug 1355886 - fix regression when undoing delete node next to a whitespace sibling;

Approval Request Comment
[Feature/Bug causing the regression]: Bug 1345529
[User impact if declined]: markup view can be broken and force the user to restart devtools
[Is this code covered by automated tests?]: yes, included here
[Has the fix been verified in Nightly?]: yes
[Needs manual test from QE? If yes, steps to reproduce]: yes, see comment 0
[List of other uplifts needed for the feature/fix]: patch from 1345529 should be uplifted first
[Is the change risky?]: no
[Why is the change risky/not risky?]: devtools-only change, making an if statement more robust
[String changes made/needed]: none
Attachment #8857574 - Flags: approval-mozilla-beta?
Comment on attachment 8857574 [details]
Bug 1355886 - fix regression when undoing delete node next to a whitespace sibling;

Fix a regression. Beta54+. Should be in 54 beta 2.
Attachment #8857574 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment on attachment 8857574 [details]
Bug 1355886 - fix regression when undoing delete node next to a whitespace sibling;

Sorry for putting the wrong comment. We should let this one ride the train on 55. Beta 54-.
Attachment #8857574 - Flags: approval-mozilla-beta+ → approval-mozilla-beta-
I have reproduced this bug with Nightly 55.0a1 (2017-04-12) on Ubuntu 16.04, 64 bit!
The bug's fix is now verified on latest Nightly 55.0a1 (64-bit).

Nightly 55.0a1:

Build ID 	20170606100219
User Agent 	Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

[bugday-20170531]
I have reproduced this bug with Nightly 55.0a1 (2017-04-12) on Windows 10 64 bit
The bug's fix is now verified on latest Nightly 55.0a1.

Nightly 55.0a1: 
 
Build ID 	20170606030207
User Agent 	Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0

[bugday-20170607]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: