Summary: | Web Inspector: Audit: add supports key to test/group for compatibility | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Devin Rousso <hi> | ||||||||
Component: | Web Inspector | Assignee: | Devin Rousso <hi> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, hi, inspector-bugzilla-changes, joepeck, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Bug Depends on: | 190754, 193262 | ||||||||||
Bug Blocks: | 193476 | ||||||||||
Attachments: |
|
Description
Devin Rousso
2019-01-22 14:38:33 PST
Created attachment 359932 [details]
Patch
Created attachment 359933 [details]
[Image] After Patch is applied
This "fakely" makes one of the default audits have `supports: 0;` for the sake of testing/demonstration. The default audit is not actually being changed in this patch.
Comment on attachment 359932 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=359932&action=review > Source/WebInspectorUI/UserInterface/Models/AuditTestBase.js:49 > + if (this._supports < WI.AuditTestBase.Version) > + this._supported = false; > + else if (InspectorBackend.domains.Audit && this._supports < InspectorBackend.domains.Audit.VERSION) > + this._supported = false; I just realized, I have these written backwards. It should be `this._supports > ...`. Created attachment 359965 [details]
Patch
Comment on attachment 359965 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=359965&action=review r=me > Source/WebInspectorUI/UserInterface/Models/AuditTestBase.js:52 > + if (!this.supported) Nit: _supported when used inside this class since the getter is simple. > Source/WebInspectorUI/UserInterface/Models/AuditTestBase.js:89 > + if (!this.supported) Nit: _supported when used inside this class since the getter is simple. Comment on attachment 359965 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=359965&action=review >> Source/WebInspectorUI/UserInterface/Models/AuditTestBase.js:52 >> + if (!this.supported) > > Nit: _supported when used inside this class since the getter is simple. Considering that it's overridden by a subclass (`WI.AuditTestGroup`), I thought it best to use the non-member version. This is somewhat similar to what I did with `this.disabled`. Comment on attachment 359965 [details] Patch Clearing flags on attachment: 359965 Committed r240469: <https://trac.webkit.org/changeset/240469> All reviewed patches have been landed. Closing bug. |