Summary: | Web Inspector: evaluate and show a popover for selected text in JS source when paused | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antoine Quint <graouts> | ||||||
Component: | Web Inspector | Assignee: | Antoine Quint <graouts> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, graouts, joepeck, timothy, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Antoine Quint
2013-10-01 02:56:10 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. Created attachment 213068 [details]
Patch
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! (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. Created attachment 213107 [details]
Patch for landing
Comment on attachment 213107 [details] Patch for landing Clearing flags on attachment: 213107 Committed r156728: <http://trac.webkit.org/changeset/156728> All reviewed patches have been landed. Closing bug. |