[webkit-reviews] review granted: [Bug 120484] Web Inspector: Alt-up and Alt-down don't work when cursor is in unit : [Attachment 210017] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Aug 29 15:53:10 PDT 2013
Joseph Pecoraro <joepeck at webkit.org> has granted Timothy Hatcher
<timothy at apple.com>'s request for review:
Bug 120484: Web Inspector: Alt-up and Alt-down don't work when cursor is in
unit
https://bugs.webkit.org/show_bug.cgi?id=120484
Attachment 210017: Patch
https://bugs.webkit.org/attachment.cgi?id=210017&action=review
------- Additional Comments from Joseph Pecoraro <joepeck at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=210017&action=review
> Source/WebInspectorUI/UserInterface/CodeMirrorAdditions.js:387
> + var token = codeMirror.getTokenAt(position);
> + if (token && token.type && /\bnumber\b/.test(token.type))
> + return token;
It may be worth mentioning in a comment that CodeMirror outputs a single
"number" token when CSS numbers are connected to units.
It took me a while to figure out that "100px" is parsed as a single token in
CodeMirror:
Token: 'number' Position: '9' Stack: 'propertyValue' Current:
'100px'
More information about the webkit-reviews
mailing list