WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 192210
Web Inspector: Audit: allow audits to be enabled/disabled
https://bugs.webkit.org/show_bug.cgi?id=192210
Summary
Web Inspector: Audit: allow audits to be enabled/disabled
Devin Rousso
Reported
2018-11-29 19:41:17 PST
.
Attachments
Patch
(43.61 KB, patch)
2018-11-29 21:12 PST
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
[Image] After Patch is applied
(788.42 KB, image/png)
2018-11-29 21:15 PST
,
Devin Rousso
no flags
Details
Patch
(47.18 KB, patch)
2019-01-10 20:35 PST
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Patch
(47.87 KB, patch)
2019-01-10 20:54 PST
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Devin Rousso
Comment 1
2018-11-29 21:12:07 PST
Created
attachment 356125
[details]
Patch
Devin Rousso
Comment 2
2018-11-29 21:15:09 PST
Created
attachment 356126
[details]
[Image] After Patch is applied
Radar WebKit Bug Importer
Comment 3
2018-12-03 10:41:35 PST
<
rdar://problem/46423583
>
Joseph Pecoraro
Comment 4
2019-01-10 15:34:20 PST
Comment on
attachment 356125
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=356125&action=review
r=me
> Source/WebInspectorUI/UserInterface/Base/ObjectStore.js:55 > + if (Array.isArray(WI.ObjectStore._databaseCallbacks)) {
A simple if check be sufficient. Is there a benefit to the extra isArray() check? Also this should be covered in the ChangeLog somewhere. Does this reduce duplicate IndexedDB open() calls?
> Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js:78 > + WI.objectStores.audits.clear(); > + for (let test of this._tests) > + WI.objectStores.audits.addObject(test);
This feels like it could be put into a well named method. Something like `_resaveAudits`?
Devin Rousso
Comment 5
2019-01-10 18:55:26 PST
Comment on
attachment 356125
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=356125&action=review
>> Source/WebInspectorUI/UserInterface/Base/ObjectStore.js:55 >> + if (Array.isArray(WI.ObjectStore._databaseCallbacks)) { > > A simple if check be sufficient. Is there a benefit to the extra isArray() check? > > Also this should be covered in the ChangeLog somewhere. Does this reduce duplicate IndexedDB open() calls?
Yes, this is meant to be a way of batching operations together, so that if you performed 3 actions in a row, they'd all be called on the same `open()` call. WI.objectStores.foo.a(); // initializes `WI.ObjectStore._databaseCallbacks` WI.objectStores.foo.b(); // enqueued WI.objectStores.foo.c(); // enqueued // once the "open" event fires, all three calls will happen, rather than having each have a separate open, which may resolve in different orders.
>> Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js:78 >> + WI.objectStores.audits.addObject(test); > > This feels like it could be put into a well named method. Something like `_resaveAudits`?
Sure. I'll have to modify this slightly anyways since we are no longer saving default audits.
Devin Rousso
Comment 6
2019-01-10 20:35:47 PST
Created
attachment 358868
[details]
Patch Merged <
https://webkit.org/b/192211
> into this change, as there were issues with reloading audit test groups from the IndexedDB due to the fact that the `disabled` value wasn't propagated to the sub-tests, meaning that they would always appear as not disabled (since the children wouldn't be disabled) even though the actual model object would be disabled.
Joseph Pecoraro
Comment 7
2019-01-10 20:47:22 PST
Comment on
attachment 358868
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=358868&action=review
> Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js:81 > + let saveDisabled = (test) => {
Might be better to have a more searchable name: saveDisabledDefaultTest.
> Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js:303 > + let checkDisabled = (test) => {
Might be better to have a more searchable name: checkDisabledDefaultTest.
Devin Rousso
Comment 8
2019-01-10 20:54:22 PST
Created
attachment 358871
[details]
Patch
WebKit Commit Bot
Comment 9
2019-01-10 21:55:01 PST
Comment on
attachment 358871
[details]
Patch Clearing flags on attachment: 358871 Committed
r239858
: <
https://trac.webkit.org/changeset/239858
>
WebKit Commit Bot
Comment 10
2019-01-10 21:55:03 PST
All reviewed patches have been landed. Closing bug.
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