Closed Bug 1355233 Opened 7 years ago Closed 7 years ago

Devtools CSS Inspector inserts a bogus "\" before manually-entered values with unclosed parens

Categories

(DevTools :: Inspector: Rules, defect)

defect
Not set
normal

Tracking

(firefox-esr52 unaffected, firefox53 unaffected, firefox54 unaffected, firefox55 fixed)

RESOLVED FIXED
Firefox 55
Tracking Status
firefox-esr52 --- unaffected
firefox53 --- unaffected
firefox54 --- unaffected
firefox55 --- fixed

People

(Reporter: dholbert, Assigned: tromey)

References

Details

(Keywords: regression)

Attachments

(2 files)

STR:
 1. Open the DevTools CSS Rules inspector
 2. Click inside of a rule (e.g. inside of "element{ ... }" at the top) and 
type a declaration with an unclosed paren -- for example, any of the following:
   width:calc(
   color:rgb(
   transform:rotate(
...and then hit enter.

EXPECTED RESULTS:
The decl should simply be struck out, indicating that it's invalid.

ACTUAL RESULTS:
The decl is struck out, AND a slash is added at the beginning for no clear reason!!! So if I type in "width:calc(", then I'm left looking at "\width:calc("

Moreover, if I click the invalid decl to edit it again and then I press Esc, another slash is added, so then it's "\\width:calc(". You can repeat this over and over to get additional slashes.


This bug is a regression -- I can reproduce it in Nightly 55, but not in Release 52.
Additionally: if I use a close-paren instead of an open-paren, e.g....
  width:calc)
...then I end up with:
  width:calc\)

But in this case, clicking + pressing "esc" doesn't cause slashes to accumulate (so it's less weird than the styles in comment 0).
Probably a regression caused by bug 1321970
I was able to reproduce the issue on latest Nightly build. I've used mozregression to find the below regression range:

Last good revision: ef9b3cb0421e6a12e972eb83be5c94dbe81d05c7
First bad revision: fd493f2795334e978367aae446913a4ebb2963dd
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=ef9b3cb0421e6a12e972eb83be5c94dbe81d05c7&tochange=fd493f2795334e978367aae446913a4ebb2963dd
Thanks, Stefan!  That confirms Tom's suspicion. Marking as regression from that bug. (bug 1321970)
Assignee: nobody → ttromey
Comment on attachment 8858804 [details]
Bug 1355233 - quote unmatched open paren in function tokens correctly;

https://reviewboard.mozilla.org/r/130828/#review133942
Attachment #8858804 - Flags: review?(gl) → review+
Pushed by ttromey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5323eee5a384
quote unmatched open paren in function tokens correctly; r=gl
https://hg.mozilla.org/mozilla-central/rev/5323eee5a384
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
I have reproduced this bug with Nightly 55.0a1 (2017-04-10) on Windows 10 , 64 Bit ! 

This bug's fix is Verified with latest Nightly !

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

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

Attachment

General

Created:
Updated:
Size: