Summary: | Web Inspector: Show formatted content of JSON request | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sergey Ryazanov <serya> | ||||||||||||||||
Component: | Web Inspector (Deprecated) | Assignee: | Sergey Ryazanov <serya> | ||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||
Severity: | Normal | CC: | apavlov, keishi, loislo, pfeldman, pmuellr, vsevik, web-inspector-bugs, webkit.review.bot, yurys | ||||||||||||||||
Priority: | P2 | ||||||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||||||
Hardware: | All | ||||||||||||||||||
OS: | All | ||||||||||||||||||
URL: | http://crbug.com/166874 | ||||||||||||||||||
Attachments: |
|
Description
Sergey Ryazanov
2013-01-15 06:29:20 PST
Created attachment 182765 [details]
Patch
Comment on attachment 182765 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=182765&action=review > Source/WebCore/ChangeLog:1 > +2013-01-15 robert@webkit.org <robert@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> Please fix the name > Source/WebCore/ChangeLog:3 > + Web Inspector: [Chromium] Show formatted content of JSON request It is not chromium-specific. > Source/WebCore/inspector/front-end/RequestHeadersView.js:202 > + this._refreshParams(WebInspector.UIString("Form Data"), formParameters, formData, this._formDataTreeElement, "URLEncoded"); Please don't use hard coded string constants for behavior logic. You could use booleans instead or enums if you really need such constants. > Source/WebCore/inspector/front-end/RequestHeadersView.js:206 > + if (json) { No brackets for one-line conditionals/loops in webkit. > Source/WebCore/inspector/front-end/RequestHeadersView.js:258 > + var object = WebInspector.RemoteObject.fromLocalObject(params); You don't need header count for JSON, do you? I would rather move this to a separate method, there is no much to reuse anyway. Created attachment 182920 [details]
Patch
Comment on attachment 182920 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=182920&action=review Please attach a screenshot. > Source/WebCore/inspector/front-end/RequestHeadersView.js:272 > + _refreshRequestJSONPayload: function(parsedObject, sourceText, viewSource) Please add compiler annotations to all funcitons and make sure this compiles without warnings. Comment on attachment 182920 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=182920&action=review > Source/WebCore/inspector/front-end/RequestHeadersView.js:278 > + listItem.appendChild(document.createTextNode(WebInspector.UIString("Request Payload"))); a new string? if so, add it to WebCore/English.lproj/localizedStrings.js Created attachment 182976 [details]
Patch
Created attachment 182977 [details]
JSON preview screenshot
Created attachment 182982 [details]
Patch
Created attachment 182983 [details]
Updated screenshot
Removed bold font in JSON payload.
Comment on attachment 182982 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=182982&action=review > Source/WebCore/ChangeLog:1 > +2013-01-15 serya@chromium.org <serya@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> Please remove these weird numbers/characters in the end of this line. Created attachment 182988 [details]
Patch
Comment on attachment 182988 [details] Patch Clearing flags on attachment: 182988 Committed r139886: <http://trac.webkit.org/changeset/139886> All reviewed patches have been landed. Closing bug. |