WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
153971
Web Inspector: WebInspector.Setting should have a "reset" method
https://bugs.webkit.org/show_bug.cgi?id=153971
Summary
Web Inspector: WebInspector.Setting should have a "reset" method
Matt Baker
Reported
2016-02-07 19:25:12 PST
* 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
).
Attachments
[Patch] Proposed Fix
(803 bytes, patch)
2016-02-07 19:49 PST
,
Matt Baker
no flags
Details
Formatted Diff
Diff
[Patch] Proposed Fix
(1.81 KB, patch)
2016-02-07 19:51 PST
,
Matt Baker
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-02-07 19:25:24 PST
<
rdar://problem/24544101
>
Radar WebKit Bug Importer
Comment 2
2016-02-07 19:49:28 PST
<
rdar://problem/24544167
>
Matt Baker
Comment 3
2016-02-07 19:49:35 PST
Created
attachment 270839
[details]
[Patch] Proposed Fix
Matt Baker
Comment 4
2016-02-07 19:51:18 PST
Created
attachment 270840
[details]
[Patch] Proposed Fix
Blaze Burg
Comment 5
2016-02-08 09:36:24 PST
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.
WebKit Commit Bot
Comment 6
2016-02-08 10:23:11 PST
Comment on
attachment 270840
[details]
[Patch] Proposed Fix Clearing flags on attachment: 270840 Committed
r196255
: <
http://trac.webkit.org/changeset/196255
>
WebKit Commit Bot
Comment 7
2016-02-08 10:23:15 PST
All reviewed patches have been landed. Closing bug.
Joseph Pecoraro
Comment 8
2016-02-09 15:30:05 PST
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
Matt Baker
Comment 9
2016-02-10 14:57:18 PST
(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
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug