RESOLVED FIXED 157483
Web Inspector: Console Evaluation links in the Console should not show normally
https://bugs.webkit.org/show_bug.cgi?id=157483
Summary Web Inspector: Console Evaluation links in the Console should not show normally
Timothy Hatcher
Reported 2016-05-09 12:41:21 PDT
Created attachment 278426 [details] Screenshot We should not show the console.log (etc) location for direct calls when a result has not been returned yet. This would let the location show up for async logs later still.
Attachments
Screenshot (15.70 KB, image/png)
2016-05-09 12:41 PDT, Timothy Hatcher
no flags
Patch (1.65 KB, patch)
2017-03-16 14:28 PDT, Devin Rousso
no flags
[Image] After Patch is applied (219.87 KB, image/png)
2017-03-16 14:28 PDT, Devin Rousso
no flags
Patch (6.37 KB, patch)
2017-03-16 14:55 PDT, Devin Rousso
no flags
Patch (6.08 KB, patch)
2017-03-16 16:27 PDT, Devin Rousso
mattbaker: review+
Patch (5.46 KB, patch)
2017-03-16 18:33 PDT, Devin Rousso
no flags
Radar WebKit Bug Importer
Comment 1 2016-05-09 12:41:57 PDT
Devin Rousso
Comment 2 2017-03-16 14:28:03 PDT
Devin Rousso
Comment 3 2017-03-16 14:28:17 PDT
Created attachment 304692 [details] [Image] After Patch is applied
Timothy Hatcher
Comment 4 2017-03-16 14:35:34 PDT
I'd argue we drop the whole right hand thing, not jus the location. I think it is only useful when it is a function call defined in the console that gets called out of line. Like: > setTimeout(100, function() { console.log("Here") }) < undefined L: "Here" [S] Console Evaluation — ConsoleEvaluation:1:13 Nothing else would have the [S] Console Evaluation line.
Matt Baker
Comment 5 2017-03-16 14:36:37 PDT
Comment on attachment 304691 [details] Patch Subtitle should only be created if we're linking to a source location. Also the cursor when hovering Console Evaluation should be the default, instead of a pointer (hand).
Matt Baker
Comment 6 2017-03-16 14:37:15 PDT
(In reply to comment #4) > I'd argue we drop the whole right hand thing, not jus the location. I think > it is only useful when it is a function call defined in the console that > gets called out of line. > > Like: > > > setTimeout(100, function() { console.log("Here") }) > < undefined > L: "Here" [S] Console Evaluation — ConsoleEvaluation:1:13 > > > Nothing else would have the [S] Console Evaluation line. Let's drop it!
Devin Rousso
Comment 7 2017-03-16 14:55:51 PDT
Matt Baker
Comment 8 2017-03-16 15:37:26 PDT
Comment on attachment 304699 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304699&action=review > Source/WebInspectorUI/UserInterface/Models/CallFrame.js:266 > + return new WebInspector.CallFrame(target, id, sourceCodeLocation, functionName, thisObject, scopeChain, nativeCode, programCode, isTailDeleted, isConsoleEvaluation); I think this change is unnecessary. Why not have CallFrame determine `isConsoleEvaluation` in its constructor?
Matt Baker
Comment 9 2017-03-16 15:40:48 PDT
Comment on attachment 304699 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304699&action=review > Source/WebInspectorUI/UserInterface/Models/CallFrame.js:259 > programCode = true; This can also move into CallFrame's constructor, guaranteeing that `isConsoleEvaluation`, `functionName`, and `programCode` are internally consistent.
Devin Rousso
Comment 10 2017-03-16 16:27:24 PDT
Matt Baker
Comment 11 2017-03-16 16:43:00 PDT
Comment on attachment 304717 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304717&action=review Looks good, r=me with a nit. > Source/WebInspectorUI/UserInterface/Models/CallFrame.js:52 > + this._isConsoleEvaluation = isConsoleEvaluation || false; Don't need to OR with false, `isConsoleEvaluation` is a boolean by definition.
Devin Rousso
Comment 12 2017-03-16 18:33:09 PDT
WebKit Commit Bot
Comment 13 2017-03-16 19:14:31 PDT
Comment on attachment 304736 [details] Patch Clearing flags on attachment: 304736 Committed r214093: <http://trac.webkit.org/changeset/214093>
WebKit Commit Bot
Comment 14 2017-03-16 19:14:43 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.