Bug 72733 - Web Inspector: [protocol] actual JSON messages do not conform to Inspector.json in CSS
Summary: Web Inspector: [protocol] actual JSON messages do not conform to Inspector.js...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexander Pavlov (apavlov)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-18 08:48 PST by Peter Rybin
Modified: 2011-11-22 03:15 PST (History)
12 users (show)

See Also:


Attachments
Patch (6.69 KB, patch)
2011-11-21 04:34 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
Patch (15.79 KB, patch)
2011-11-21 08:33 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Rybin 2011-11-18 08:48:38 PST
InspectorStyleSheet.cpp:141
'sourceLine' is declared 'string' but actual value is 'integer'

InspectorStyleSheet.cpp:246
'styleId' property must be set unconditionally, it is not optional.

InspectorStyleSheet.cpp:248-249
'witdh' and 'height' property are declared 'integer', but actual values are 'string'

InspectorStyleSheet.cpp:448
warning: 'text' property is undeclared

InspectorStyleSheet.cpp:499
'shorthandName' must be set unconditionally, it is not optional

InspectorStyleSheet.cpp:795
'ruleId' must be set unconditionally, it is not optional

(all line numbers are as in r100177)

This should be fixed to conform to protocol declaration AND to prepare switching to type-safe JSON API.
Comment 1 Alexander Pavlov (apavlov) 2011-11-21 04:34:57 PST
Created attachment 116068 [details]
Patch
Comment 2 Pavel Feldman 2011-11-21 07:09:26 PST
Comment on attachment 116068 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=116068&action=review

> Source/WebCore/inspector/Inspector.json:1520
> +                    { "name": "styleId", "$ref": "CSSStyleId", "optional": true, "description": "The CSS style identifier (absent for computed styles and attribute styles)." },

You should use different structure for computed and matched styles.
Comment 3 Alexander Pavlov (apavlov) 2011-11-21 08:33:11 PST
Created attachment 116094 [details]
Patch
Comment 4 WebKit Review Bot 2011-11-21 08:34:33 PST
Attachment 116094 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/insp..." exit_code: 1

Source/WebCore/inspector/InspectorCSSAgent.cpp:317:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InspectorCSSAgent.h:67:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Total errors found: 2 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 WebKit Review Bot 2011-11-22 03:15:11 PST
Comment on attachment 116094 [details]
Patch

Clearing flags on attachment: 116094

Committed r100987: <http://trac.webkit.org/changeset/100987>
Comment 6 WebKit Review Bot 2011-11-22 03:15:16 PST
All reviewed patches have been landed.  Closing bug.