Closed Bug 1463843 Opened 6 years ago Closed 6 years ago

Save the initial commited value in the first update call after text property editor calls create

Categories

(DevTools :: Inspector: Rules, enhancement, P3)

enhancement

Tracking

(firefox62 fixed)

RESOLVED FIXED
Firefox 62
Tracking Status
firefox62 --- fixed

People

(Reporter: gl, Assigned: gl)

References

Details

Attachments

(1 file)

We parse the property value and store it in this.committed when we are creating the text property editors https://searchfox.org/mozilla-central/source/devtools/client/inspector/rules/views/text-property-editor.js#188. However, this isn't really necessary since we will just this.prop.value elsewhere anyways. See https://searchfox.org/mozilla-central/source/devtools/client/inspector/rules/views/text-property-editor.js#922.

We can reduce the cost of parsing the css which is really expensive and unnecessary in this case by simply storing this.prop.value in this.committed when the value is created.
(In reply to Gabriel [:gl] (ΦωΦ) from comment #0)
> However, this isn't really necessary
> since we will just this.prop.value elsewhere anyways. See
> https://searchfox.org/mozilla-central/source/devtools/client/inspector/rules/
> views/text-property-editor.js#922.
I'm confused though, cause we use this.committed.value here and we compare it to another parsed value:
https://searchfox.org/mozilla-central/rev/eb51d734a8c06ac5973291be9bcc74ed4e999bca/devtools/client/inspector/rules/views/text-property-editor.js#888-894
Isnt't that test going to start returning false in some cases now?
Flags: needinfo?(gl)
Flags: needinfo?(gl)
Does you turning off the needinfo flag means you'll change this and post a new patch?
(In reply to Patrick Brosset <:pbro> from comment #4)
> Does you turning off the needinfo flag means you'll change this and post a
> new patch?

Yes
Attachment #8980050 - Flags: review?(pbrosset)
Summary: Don't parse the property value when storing the last committed value → Save the initial commited value in the first update call after text property editor calls create
Comment on attachment 8980050 [details]
Bug 1463843 - Save the initial commited value in the first update call after text property editor calls create.

https://reviewboard.mozilla.org/r/246216/#review257072
Attachment #8980050 - Flags: review?(pbrosset) → review+
Pushed by gabriel.luong@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6ce4f1c08f25
Save the initial commited value in the first update call after text property editor calls create. r=pbro
Product: Firefox → DevTools
https://hg.mozilla.org/mozilla-central/rev/6ce4f1c08f25
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: