Closed Bug 1218808 Opened 9 years ago Closed 9 years ago

[ruleview] edit to element style doesn't work correctly

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(firefox44 fixed, firefox45 fixed, b2g-v2.5 fixed)

RESOLVED FIXED
Firefox 45
Tracking Status
firefox44 --- fixed
firefox45 --- fixed
b2g-v2.5 --- fixed

People

(Reporter: tromey, Assigned: tromey)

Details

Attachments

(1 file, 1 obsolete file)

This is a regression introduced by as-authored.

Inspect any element with the rule view.
Add a "background-color" property to the element and apply it.
Now, edit it to be a "color" property instead.

Note that the background color did not change.
Click on some other element and then back to the original element,
and you'll see both background-color and color properties.

Instead, editing the property name should cause the old property
to be removed.
This was just a small thinko in setPropertyName.
git add the test
Attachment #8679655 - Attachment is obsolete: true
Attachment #8679656 - Flags: review?(pbrosset)
Comment on attachment 8679656 [details] [diff] [review]
make renaming a property on an element work

Review of attachment 8679656 [details] [diff] [review]:
-----------------------------------------------------------------

Looks great to me. Thanks for catching this regression. Let's try to get it in time for 44 (uplift is today, but it's small regression fix anyway, so we can easily get approval for uplift later if it doesn't make it)
Attachment #8679656 - Flags: review?(pbrosset) → review+
Keywords: checkin-needed
Comment on attachment 8679656 [details] [diff] [review]
make renaming a property on an element work

Approval Request Comment
[Feature/regressing bug #]:
This is a regression introduced by bug 984880, which implemented
a new devtools feature ("as-authored styles")
[User impact if declined]:
If the user uses the rule view to rename a property, the old property
will not be removed, causing confusion.
[Describe test coverage new/current, TreeHerder]:
New test case covering the new code.
[Risks and why]: 
Low risk; first it is a reasonably obvious thinko in the code; and second
there is a test case covering the new behavior.
[String/UUID change made/needed]: No.
Attachment #8679656 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/4b8c70ee14ed
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Comment on attachment 8679656 [details] [diff] [review]
make renaming a property on an element work

Patch seems simple enough and has new tests. Seems safe to uplift to Aurora44.
Attachment #8679656 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: