[Webkit-unassigned] [Bug 148680] New: Web Inspector: add explicit version checking for legacy backends
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 1 09:41:19 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=148680
Bug ID: 148680
Summary: Web Inspector: add explicit version checking for
legacy backends
Classification: Unclassified
Product: WebKit
Version: WebKit Nightly Build
Hardware: All
OS: All
Status: NEW
Severity: Normal
Priority: P2
Component: Web Inspector
Assignee: webkit-unassigned at lists.webkit.org
Reporter: bburg at apple.com
CC: bburg at apple.com, graouts at webkit.org,
joepeck at webkit.org, mattbaker at apple.com,
nvasilyev at apple.com, timothy at apple.com,
webkit-bug-importer at group.apple.com
In several places we do awkward things like the following since we can't directly test protocol version or supported features.
// COMPATIBILITY (iOS 9): Legacy backends don't support breakpoint ignore count. Since support
// can't be tested directly, check for CSS.getSupportedSystemFontFamilyNames.
if (CSSAgent.getSupportedSystemFontFamilyNames) {
In cases where we can't use Agent.command.supports(...), it would be better if we had checks against the shipped protocol version, like:
if (WebInspector.backendVersion.builtBefore(WebInspector.BackendVersions.iOS9))
if (WebInspector.backendVersion.equalTo(WebInspector.BackendVersions.iOS8))
if (WebInspector.backendVersion.builtAfter(WebInspector.BackendVersions.iOS6))
Feel free to suggest better comparison operator names, these are clunky. I believe WebKit uses "builtOnOrAfter(10, 10, 0)" or similar.
In the legacy protocol versions, we can embed a top-level "version" field and parse it in the frontend. And, going forward, we can use
a version string of iOS9+ once a legacy copy of iOS9 has been copied over.
We could also implement fine-grained feature checking, like WebInspector.backendVersion.supports("Debugger.BreakpointIgnoreCounts"), which will return false for old versions; once that specific feature support lands in trunk, we add the feature key "Debugger.BreakpointIgnoreCounts" in a file somewhere that feeds into backendVersion.supports(). Once the next legacy protocol version is created, we delete all the old feature key checks and replace them with backendVersion.equalOrLaterThan(new-version).
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150901/cff77a4a/attachment-0001.html>
More information about the webkit-unassigned
mailing list