Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(591)

Issue 2397933005: DevTools: ConsoleViewMessage rewrite signatures for formatter functions (Closed)

Created:
4 years, 2 months ago by luoe
Modified:
4 years, 1 month ago
Reviewers:
lushnikov
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, pfeldman, kozyatinskiy+blink_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: ConsoleViewMessage rewrite signatures for formatter functions Object type formatters now return an element instead of taking one as an argument. Function signatures are also updated with the necessary dependencies to isolate them from the rest of ConsoleViewMessage. DO NOT COMMIT This CL has been split up: - https://codereview.chromium.org/2454923003/ - https://codereview.chromium.org/2449973005/

Patch Set 1 #

Patch Set 2 : obj/elem >> object/element #

Patch Set 3 : Return elements instead of taking them from the outside #

Patch Set 4 : undo the obj/elem rename changes #

Patch Set 5 : rewrite signatures #

Total comments: 10

Patch Set 6 : Explicitly define classes inside builders #

Patch Set 7 : update tests, fix classes #

Patch Set 8 : address comments, simplify params #

Patch Set 9 : remove patches 6, 7 #

Total comments: 16
Unified diffs Side-by-side diffs Delta from patch set Stats (+141 lines, -96 lines) Patch
M third_party/WebKit/LayoutTests/inspector/console/console-log-linkify-links-expected.txt View 1 2 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/devtools/front_end/components/objectValue.css View 1 2 6 7 8 1 chunk +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js View 1 2 3 4 5 6 7 8 28 chunks +134 lines, -94 lines 16 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 22 (12 generated)
luoe
ptal
4 years, 2 months ago (2016-10-07 22:16:19 UTC) #4
lushnikov
let's not land this for now - it doesn't give much benefit
4 years, 2 months ago (2016-10-07 22:29:14 UTC) #5
luoe
CL updated. No more renaming obj >> object. This should take into account comments from ...
4 years, 2 months ago (2016-10-10 21:50:37 UTC) #10
lushnikov
https://codereview.chromium.org/2397933005/diff/80001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js (left): https://codereview.chromium.org/2397933005/diff/80001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js#oldcode706 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:706: elem.classList.remove("object-value-string"); let's address this separately by moving "object-value-.." css ...
4 years, 2 months ago (2016-10-12 20:58:23 UTC) #11
luoe
Patches 6+7 - moving classname defs into each builder - remove unnecessary classes for typedarray, ...
4 years, 2 months ago (2016-10-13 20:44:21 UTC) #12
lushnikov
let's make patchst #6 as a separate CL
4 years, 2 months ago (2016-10-14 00:20:40 UTC) #13
luoe
On 2016/10/14 00:20:40, lushnikov wrote: > let's make patchst #6 as a separate CL Patches ...
4 years, 2 months ago (2016-10-14 18:49:17 UTC) #16
lushnikov
https://chromiumcodereview.appspot.com/2397933005/diff/160001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js (left): https://chromiumcodereview.appspot.com/2397933005/diff/160001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js#oldcode706 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:706: elem.classList.remove("object-value-string"); this is non-trivial change in this mostly mechanical ...
4 years, 2 months ago (2016-10-18 23:07:40 UTC) #19
luoe
https://codereview.chromium.org/2397933005/diff/160001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js (left): https://codereview.chromium.org/2397933005/diff/160001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js#oldcode706 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:706: elem.classList.remove("object-value-string"); This "object-value-string-inner" change should* be the only class-related ...
4 years, 2 months ago (2016-10-20 23:01:57 UTC) #20
lushnikov
4 years, 2 months ago (2016-10-22 03:10:19 UTC) #21
https://codereview.chromium.org/2397933005/diff/160001/third_party/WebKit/Sou...
File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
(right):

https://codereview.chromium.org/2397933005/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:138:
table = this._parameterToRemoteObject(table, this._target());
consoleMessage.target();

https://codereview.chromium.org/2397933005/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:287:
anchorElement = this._linkifyScriptId(linkifier, consoleMessage);
1. the order should be consistent
2. can we pass just scriptId?

can we inline linkifyScriptId right away?

https://codereview.chromium.org/2397933005/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:289:
anchorElement = this._linkifyStackTraceTopFrame(linkifier, consoleMessage);
inline this as well

https://codereview.chromium.org/2397933005/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:291:
anchorElement = this._linkifyLocation(linkifier, consoleMessage);
inline this as well

https://codereview.chromium.org/2397933005/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:358:
_linkifyLocation: function(linkifier, consoleMessage)
will be removed

https://codereview.chromium.org/2397933005/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:363:
return this._linkifier.linkifyScriptLocation(target, null, consoleMessage.url ||
"", consoleMessage.line, consoleMessage.column, "console-message-url");
linkifier

https://codereview.chromium.org/2397933005/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:370:
*/
will be removed

https://codereview.chromium.org/2397933005/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:384:
_linkifyScriptId: function(linkifier, consoleMessage)
will be removed

https://codereview.chromium.org/2397933005/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:485:
element = this._formatParameterAsObject(output, linkifier, includePreview);
element= createElement("span");
element.appendChild(this._formatParameterAsObject(output, linkifier,
includePreview));

https://codereview.chromium.org/2397933005/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:529:
_formatParameterAsObject: function(obj, linkifier, includePreview)
let's not split this into two - we don't need more functions!

https://codereview.chromium.org/2397933005/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:655:
_formatParameterAsArray: function(array, linkifier, messageType)
let's pass linkifier as the last argument -- everywhere?

https://codereview.chromium.org/2397933005/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:657:
var element = createElement("span");
var result = .. -- everywhere

https://codereview.chromium.org/2397933005/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:703:
var entryElement = elements[i];
discard this

https://codereview.chromium.org/2397933005/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:816:
* @param {!WebInspector.Linkifier} linkifier
make it last -- everywhere

Powered by Google App Engine
This is Rietveld 408576698