* SUMMARY WebInspector.Setting should have a "reset" method. Restoring a setting to it's default value would come in handy for the future Settings tab (https://bugs.webkit.org/show_bug.cgi?id=149284).
<rdar://problem/24544101>
<rdar://problem/24544167>
Created attachment 270839 [details] [Patch] Proposed Fix
Created attachment 270840 [details] [Patch] Proposed Fix
Comment on attachment 270840 [details] [Patch] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=270840&action=review r=me > Source/WebInspectorUI/UserInterface/Base/Setting.js:97 > + this.value = JSON.parse(JSON.stringify(this._defaultValue)); Can we extract this to Utilities.js, something like Object.deepCopyIfSerializable ? We do this idiom in several places, but we never check that _defaultValue is actually serializable, so this can throw an exception. The helper could be more paranoid.
Comment on attachment 270840 [details] [Patch] Proposed Fix Clearing flags on attachment: 270840 Committed r196255: <http://trac.webkit.org/changeset/196255>
All reviewed patches have been landed. Closing bug.
Comment on attachment 270840 [details] [Patch] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=270840&action=review > Source/WebInspectorUI/UserInterface/Base/Setting.js:94 > + reset() This could, and should, have a test. LayoutTests/inspector/unit-tests/setting.html
(In reply to comment #8) > Comment on attachment 270840 [details] > [Patch] Proposed Fix > > View in context: > https://bugs.webkit.org/attachment.cgi?id=270840&action=review > > > Source/WebInspectorUI/UserInterface/Base/Setting.js:94 > > + reset() > > This could, and should, have a test. > LayoutTests/inspector/unit-tests/setting.html https://bugs.webkit.org/show_bug.cgi?id=154092