RESOLVED FIXED122151
Web Inspector: evaluate and show a popover for selected text in JS source when paused
https://bugs.webkit.org/show_bug.cgi?id=122151
Summary Web Inspector: evaluate and show a popover for selected text in JS source whe...
Antoine Quint
Reported 2013-10-01 02:56:10 PDT
Attachments
Patch (5.10 KB, patch)
2013-10-01 03:00 PDT, Antoine Quint
no flags
Patch for landing (5.05 KB, patch)
2013-10-01 12:10 PDT, Antoine Quint
no flags
Antoine Quint
Comment 1 2013-10-01 02:56:29 PDT
Expanding the popover on hover, we should show the popover for the expression of the selected text. This gives the user more control over what to evaluate if the expression is hard to figure out by hover alone.
Antoine Quint
Comment 2 2013-10-01 03:00:56 PDT
Joseph Pecoraro
Comment 3 2013-10-01 10:10:22 PDT
Comment on attachment 213068 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=213068&action=review r=me > Source/WebInspectorUI/UserInterface/CodeMirrorTokenTrackingController.js:168 > + if (highlightedRange.from.line === range.start.line && > + highlightedRange.from.ch === range.start.ch && > + highlightedRange.to.line === range.end.line && > + highlightedRange.to.ch === range.end.ch) This could use WebInspector.compareCodeMirrorPositions: if (WebInspector.compareCodeMirrorPositions(highlightedRange.from, range.start) === 0 && WebInspector.compareCodeMirrorPositions(highlightedRange.to, range.end) === 0) But what you have is just fine!
Antoine Quint
Comment 4 2013-10-01 12:10:07 PDT
(In reply to comment #3) > (From update of attachment 213068 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=213068&action=review > > r=me > > > Source/WebInspectorUI/UserInterface/CodeMirrorTokenTrackingController.js:168 > > + if (highlightedRange.from.line === range.start.line && > > + highlightedRange.from.ch === range.start.ch && > > + highlightedRange.to.line === range.end.line && > > + highlightedRange.to.ch === range.end.ch) > > This could use WebInspector.compareCodeMirrorPositions: > > if (WebInspector.compareCodeMirrorPositions(highlightedRange.from, range.start) === 0 && > WebInspector.compareCodeMirrorPositions(highlightedRange.to, range.end) === 0) > > But what you have is just fine! Much better, I'll change that in the commit.
Antoine Quint
Comment 5 2013-10-01 12:10:21 PDT
Created attachment 213107 [details] Patch for landing
WebKit Commit Bot
Comment 6 2013-10-01 12:54:05 PDT
Comment on attachment 213107 [details] Patch for landing Clearing flags on attachment: 213107 Committed r156728: <http://trac.webkit.org/changeset/156728>
WebKit Commit Bot
Comment 7 2013-10-01 12:54:07 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.