Changeset 240318 in webkit


Ignore:
Timestamp:
Jan 22, 2019 8:17:06 PM (5 years ago)
Author:
Devin Rousso
Message:

Web Inspector: expose Audit and Recording versions to the frontend
https://bugs.webkit.org/show_bug.cgi?id=193262
<rdar://problem/47130684>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/Audit.json:
  • inspector/protocol/Recording.json:

Add version values.

  • inspector/scripts/codegen/models.py:

(Protocol.parse_domain):
(Domain.init):
(Domain.version): Added.
(Domains):

  • inspector/scripts/codegen/generator.py:

(Generator.version_for_domain): Added.

  • inspector/scripts/codegen/generate_cpp_protocol_types_header.py:

(CppProtocolTypesHeaderGenerator.generate_output):
(CppProtocolTypesHeaderGenerator._generate_versions): Added.

  • inspector/scripts/codegen/generate_js_backend_commands.py:

(JSBackendCommandsGenerator.should_generate_domain):
(JSBackendCommandsGenerator.generate_domain):

  • inspector/scripts/tests/generic/version.json: Added.
  • inspector/scripts/tests/generic/expected/version.json-result: Added.
  • inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
  • inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
  • inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
  • inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result:
  • inspector/scripts/tests/generic/expected/domain-availability.json-result:
  • inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result:
  • inspector/scripts/tests/generic/expected/enum-values.json-result:
  • inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
  • inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
  • inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result:
  • inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result:
  • inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
  • inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result:
  • inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result:
  • inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:

Source/WebCore:

Tests: inspector/audit/version.html

inspector/recording/version.html

  • inspector/agents/InspectorCanvasAgent.cpp:

(WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):

Source/WebInspectorUI:

  • UserInterface/Protocol/InspectorBackend.js:

(InspectorBackendClass.prototype.registerVersion): Added.

  • UserInterface/Models/AuditTestCase.js:
  • UserInterface/Models/Recording.js:

(WI.Recording.fromPayload):
Add Interface version values.

LayoutTests:

  • inspector/audit/version.html: Added.
  • inspector/audit/version-expected.txt: Added.
  • inspector/recording/version.html: Added.
  • inspector/recording/version-expected.txt: Added.
Location:
trunk
Files:
6 added
33 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r240314 r240318  
     12019-01-22  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: expose Audit and Recording versions to the frontend
     4        https://bugs.webkit.org/show_bug.cgi?id=193262
     5        <rdar://problem/47130684>
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        * inspector/audit/version.html: Added.
     10        * inspector/audit/version-expected.txt: Added.
     11        * inspector/recording/version.html: Added.
     12        * inspector/recording/version-expected.txt: Added.
     13
    1142019-01-22  Nikita Vasilyev  <nvasilyev@apple.com>
    215
  • trunk/Source/JavaScriptCore/ChangeLog

    r240273 r240318  
     12019-01-22  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: expose Audit and Recording versions to the frontend
     4        https://bugs.webkit.org/show_bug.cgi?id=193262
     5        <rdar://problem/47130684>
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        * inspector/protocol/Audit.json:
     10        * inspector/protocol/Recording.json:
     11        Add `version` values.
     12
     13        * inspector/scripts/codegen/models.py:
     14        (Protocol.parse_domain):
     15        (Domain.__init__):
     16        (Domain.version): Added.
     17        (Domains):
     18
     19        * inspector/scripts/codegen/generator.py:
     20        (Generator.version_for_domain): Added.
     21
     22        * inspector/scripts/codegen/generate_cpp_protocol_types_header.py:
     23        (CppProtocolTypesHeaderGenerator.generate_output):
     24        (CppProtocolTypesHeaderGenerator._generate_versions): Added.
     25
     26        * inspector/scripts/codegen/generate_js_backend_commands.py:
     27        (JSBackendCommandsGenerator.should_generate_domain):
     28        (JSBackendCommandsGenerator.generate_domain):
     29
     30        * inspector/scripts/tests/generic/version.json: Added.
     31        * inspector/scripts/tests/generic/expected/version.json-result: Added.
     32
     33        * inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
     34        * inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
     35        * inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
     36        * inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result:
     37        * inspector/scripts/tests/generic/expected/domain-availability.json-result:
     38        * inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result:
     39        * inspector/scripts/tests/generic/expected/enum-values.json-result:
     40        * inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
     41        * inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
     42        * inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result:
     43        * inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result:
     44        * inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result:
     45        * inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result:
     46        * inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result:
     47        * inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result:
     48        * inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
     49        * inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result:
     50        * inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result:
     51        * inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:
     52
    1532019-01-22  Yusuke Suzuki  <ysuzuki@apple.com>
    254
  • trunk/Source/JavaScriptCore/inspector/protocol/Audit.json

    r239976 r240318  
    22    "domain": "Audit",
    33    "description": "",
     4    "version": 1,
    45    "commands": [
    56        {
  • trunk/Source/JavaScriptCore/inspector/protocol/Recording.json

    r237997 r240318  
    33    "description": "General types used for recordings of actions performed in the inspected page.",
    44    "availability": ["web"],
     5    "version": 1,
    56    "types": [
    67        {
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_header.py

    r239427 r240318  
    6666        sections.append(Template(CppTemplates.HeaderPrelude).substitute(None, **header_args))
    6767        sections.append('namespace Protocol {')
     68        sections.append(self._generate_versions(domains))
    6869        sections.append(self._generate_forward_declarations(domains))
    6970        sections.append(self._generate_typedefs(domains))
     
    8990
    9091        return '\n'.join(self.generate_includes_from_entries(header_includes))
     92
     93    def _generate_versions(self, domains):
     94        sections = []
     95
     96        for domain in domains:
     97            version = self.version_for_domain(domain)
     98            if not version:
     99                continue
     100
     101            domain_lines = []
     102            domain_lines.append('namespace %s {' % domain.domain_name)
     103
     104            if isinstance(version, int):
     105                domain_lines.append('static const unsigned VERSION = %s;' % version)
     106
     107            domain_lines.append('} // %s' % domain.domain_name)
     108            sections.append(self.wrap_with_guard_for_domain(domain, '\n'.join(domain_lines)))
     109
     110        if len(sections) == 0:
     111            return ''
     112
     113        return """// Versions.
     114%s
     115// End of versions.
     116""" % '\n\n'.join(sections)
    91117
    92118    def _generate_forward_declarations(self, domains):
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_js_backend_commands.py

    r237997 r240318  
    5353        type_declarations = self.type_declarations_for_domain(domain)
    5454        domain_enum_types = [declaration for declaration in type_declarations if isinstance(declaration.type, EnumType)]
    55         return len(self.commands_for_domain(domain)) > 0 or len(self.events_for_domain(domain)) > 0 or len(domain_enum_types) > 0
     55        return self.version_for_domain(domain) is not None or len(self.commands_for_domain(domain)) > 0 or len(self.events_for_domain(domain)) > 0 or len(domain_enum_types) > 0
    5656
    5757    def domains_to_generate(self):
     
    7272        lines.append('// %(domain)s.' % args)
    7373
     74        version = self.version_for_domain(domain)
    7475        type_declarations = self.type_declarations_for_domain(domain)
    7576        commands = self.commands_for_domain(domain)
     
    7980        if len(events) > 0 or has_async_commands:
    8081            lines.append('InspectorBackend.register%(domain)sDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "%(domain)s");' % args)
     82
     83        if isinstance(version, int):
     84            version_args = {
     85                'domain': domain.domain_name,
     86                'version': version
     87            }
     88            lines.append('InspectorBackend.registerVersion("%(domain)s", %(version)s);' % version_args)
    8189
    8290        for declaration in type_declarations:
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generator.py

    r238192 r240318  
    109109        return model_platform is Platforms.Generic or self._platform is Platforms.All or model_platform is self._platform
    110110
     111    def version_for_domain(self, domain):
     112        return domain.version()
     113
    111114    def type_declarations_for_domain(self, domain):
    112115        return [type_declaration for type_declaration in domain.all_type_declarations() if self.can_generate_platform(type_declaration.platform)]
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/models.py

    r237997 r240318  
    369369        log.debug("parse domain " + json['domain'])
    370370
     371        version = None
    371372        types = []
    372373        commands = []
    373374        events = []
     375
     376        if 'version' in json:
     377            if not isinstance(json['version'], int):
     378                raise ParseException("Malformed domain specification: version is not a number or string")
     379            version = json['version']
    374380
    375381        if 'types' in json:
     
    396402                    raise ParseException('Malformed domain specification: availability is an unsupported string. Was: "%s", Allowed values: %s' % (json['availability'], ', '.join(allowed_activation_strings)))
    397403
    398         self.domains.append(Domain(json['domain'], json.get('description', ''), json.get('featureGuard'), json.get('availability'), isSupplemental, types, commands, events))
     404        self.domains.append(Domain(json['domain'], json.get('description', ''), json.get('featureGuard'), json.get('availability'), isSupplemental, version, types, commands, events))
    399405
    400406    def parse_type_declaration(self, json):
     
    566572
    567573class Domain:
    568     def __init__(self, domain_name, description, feature_guard, availability, isSupplemental, type_declarations, commands, events):
     574    def __init__(self, domain_name, description, feature_guard, availability, isSupplemental, version, type_declarations, commands, events):
    569575        self.domain_name = domain_name
    570576        self.description = description
     
    572578        self.availability = availability
    573579        self.is_supplemental = isSupplemental
     580        self._version = version
    574581        self._type_declarations = type_declarations
    575582        self._commands = commands
    576583        self._events = events
     584
     585    def version(self):
     586        return self._version
    577587
    578588    def all_type_declarations(self):
     
    600610
    601611class Domains:
    602     GLOBAL = Domain("", "The global domain, in which primitive types are implicitly declared.", None, None, False, [], [], [])
     612    GLOBAL = Domain("", "The global domain, in which primitive types are implicitly declared.", None, None, False, None, [], [], [])
    603613
    604614
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result

    r239427 r240318  
    410410namespace Protocol {
    411411
     412
     413
    412414// Forward declarations.
    413415namespace Network {
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result

    r239846 r240318  
    603603
    604604namespace Protocol {
     605
     606
    605607
    606608// Forward declarations.
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result

    r239839 r240318  
    518518
    519519namespace Protocol {
     520
     521
    520522
    521523// Forward declarations.
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result

    r239427 r240318  
    313313
    314314namespace Protocol {
     315
     316
    315317
    316318
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-availability.json-result

    r239427 r240318  
    477477
    478478
     479
     480
    479481} // namespace Protocol
    480482
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result

    r239427 r240318  
    635635
    636636
     637
     638
    637639// Typedefs.
    638640namespace Network2 {
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/enum-values.json-result

    r239427 r240318  
    438438namespace Protocol {
    439439
     440
     441
    440442// Forward declarations.
    441443namespace TypeDomain {
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result

    r239427 r240318  
    375375
    376376namespace Protocol {
     377
     378
    377379
    378380// Forward declarations.
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result

    r239427 r240318  
    429429namespace Protocol {
    430430
     431
     432
    431433// Forward declarations.
    432434#if PLATFORM(WEB_TYPES)
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result

    r239427 r240318  
    313313
    314314namespace Protocol {
     315
     316
    315317
    316318
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result

    r239427 r240318  
    313313
    314314namespace Protocol {
     315
     316
    315317
    316318// Forward declarations.
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result

    r239427 r240318  
    313313
    314314namespace Protocol {
     315
     316
    315317
    316318
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result

    r239427 r240318  
    317317
    318318namespace Protocol {
     319
     320
    319321
    320322// Forward declarations.
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result

    r239427 r240318  
    318318
    319319namespace Protocol {
     320
     321
    320322
    321323// Forward declarations.
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result

    r239427 r240318  
    319319
    320320namespace Protocol {
     321
     322
    321323
    322324// Forward declarations.
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result

    r239427 r240318  
    318318
    319319namespace Protocol {
     320
     321
    320322
    321323// Forward declarations.
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result

    r239427 r240318  
    313313
    314314namespace Protocol {
     315
     316
    315317
    316318// Forward declarations.
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/version.json-result

    r240317 r240318  
    2727 */
    2828
    29 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     29// DO NOT EDIT THIS FILE. It is automatically generated from version.json
     30// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     31
     32// VersionDomain.
     33InspectorBackend.registerVersion("VersionDomain", 42);
     34InspectorBackend.activateDomain("VersionDomain");
    3135### End File: InspectorBackendCommands.js
    3236
     
    5963 */
    6064
    61 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
     65// DO NOT EDIT THIS FILE. It is automatically generated from version.json
    6266// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    6367
     
    116120 */
    117121
    118 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
     122// DO NOT EDIT THIS FILE. It is automatically generated from version.json
    119123// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    120124
     
    162166 */
    163167
    164 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
     168// DO NOT EDIT THIS FILE. It is automatically generated from version.json
    165169// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    166170
     
    213217 */
    214218
    215 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
     219// DO NOT EDIT THIS FILE. It is automatically generated from version.json
    216220// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    217221
     
    257261 */
    258262
    259 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
     263// DO NOT EDIT THIS FILE. It is automatically generated from version.json
    260264// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    261265
     
    300304 */
    301305
    302 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
     306// DO NOT EDIT THIS FILE. It is automatically generated from version.json
    303307// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    304308
     
    314318namespace Protocol {
    315319
     320// Versions.
     321namespace VersionDomain {
     322static const unsigned VERSION = 42;
     323} // VersionDomain
     324// End of versions.
     325
     326
    316327
    317328
     
    353364 */
    354365
    355 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
     366// DO NOT EDIT THIS FILE. It is automatically generated from version.json
    356367// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    357368
     
    402413 */
    403414
    404 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
     415// DO NOT EDIT THIS FILE. It is automatically generated from version.json
    405416// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    406417
     
    445456 */
    446457
    447 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
     458// DO NOT EDIT THIS FILE. It is automatically generated from version.json
    448459// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    449460
     
    489500 */
    490501
    491 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
     502// DO NOT EDIT THIS FILE. It is automatically generated from version.json
    492503// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    493504
     
    529540 */
    530541
    531 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
     542// DO NOT EDIT THIS FILE. It is automatically generated from version.json
    532543// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    533544
     
    596607 */
    597608
    598 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
     609// DO NOT EDIT THIS FILE. It is automatically generated from version.json
    599610// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    600611
     
    637648 */
    638649
    639 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
     650// DO NOT EDIT THIS FILE. It is automatically generated from version.json
    640651// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    641652
     
    693704 */
    694705
    695 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
     706// DO NOT EDIT THIS FILE. It is automatically generated from version.json
    696707// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    697708
     
    734745 */
    735746
    736 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
     747// DO NOT EDIT THIS FILE. It is automatically generated from version.json
    737748// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    738749
     
    805816 */
    806817
    807 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
     818// DO NOT EDIT THIS FILE. It is automatically generated from version.json
    808819// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    809820
     
    851862 */
    852863
    853 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
     864// DO NOT EDIT THIS FILE. It is automatically generated from version.json
    854865// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    855866
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result

    r239427 r240318  
    313313
    314314namespace Protocol {
     315
     316
    315317
    316318
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result

    r239427 r240318  
    410410namespace Protocol {
    411411
     412
     413
    412414// Forward declarations.
    413415namespace Network {
  • trunk/Source/WebCore/ChangeLog

    r240315 r240318  
     12019-01-22  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: expose Audit and Recording versions to the frontend
     4        https://bugs.webkit.org/show_bug.cgi?id=193262
     5        <rdar://problem/47130684>
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        Tests: inspector/audit/version.html
     10               inspector/recording/version.html
     11
     12        * inspector/agents/InspectorCanvasAgent.cpp:
     13        (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
     14
    1152019-01-22  Wenson Hsieh  <wenson_hsieh@apple.com>
    216
  • trunk/Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp

    r239535 r240318  
    559559
    560560    auto recording = Inspector::Protocol::Recording::Recording::create()
    561         .setVersion(1)
     561        .setVersion(Inspector::Protocol::Recording::VERSION)
    562562        .setType(type)
    563563        .setInitialState(inspectorCanvas->releaseInitialState())
  • trunk/Source/WebInspectorUI/ChangeLog

    r240314 r240318  
     12019-01-22  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: expose Audit and Recording versions to the frontend
     4        https://bugs.webkit.org/show_bug.cgi?id=193262
     5        <rdar://problem/47130684>
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        * UserInterface/Protocol/InspectorBackend.js:
     10        (InspectorBackendClass.prototype.registerVersion): Added.
     11
     12        * UserInterface/Models/AuditTestCase.js:
     13        * UserInterface/Models/Recording.js:
     14        (WI.Recording.fromPayload):
     15        Add Interface version values.
     16
    1172019-01-22  Nikita Vasilyev  <nvasilyev@apple.com>
    218
  • trunk/Source/WebInspectorUI/UserInterface/Models/AuditTestCase.js

    r239976 r240318  
    280280};
    281281
     282// Keep this in sync with Inspector::Protocol::Audit::VERSION.
     283WI.AuditTestCase.Version = 1;
     284
    282285WI.AuditTestCase.TypeIdentifier = "test-case";
  • trunk/Source/WebInspectorUI/UserInterface/Models/Recording.js

    r238199 r240318  
    5252            return null;
    5353
    54         if (isNaN(payload.version) || payload.version <= 0)
     54        if (isNaN(payload.version) || payload.version <= 0 || payload.version > WI.Recording.Version)
    5555            return null;
    5656
     
    473473};
    474474
     475// Keep this in sync with Inspector::Protocol::Recording::VERSION.
     476WI.Recording.Version = 1;
     477
    475478WI.Recording.Event = {
    476479    ProcessedAction: "recording-processed-action",
  • trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js

    r238750 r240318  
    141141    }
    142142
     143    registerVersion(domainName, version)
     144    {
     145        let agent = this._agentForDomain(domainName);
     146        agent.VERSION = version;
     147    }
     148
    143149    registerCommand(qualifiedName, callSignature, replySignature)
    144150    {
Note: See TracChangeset for help on using the changeset viewer.