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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/source_frame/SourceFrame.js

Issue 2173553002: DevTools: Immediately hide on scroll for source color picker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 this._sourcePosition.setText(WebInspector.UIString("%d characters se lected", selectedText.length)); 627 this._sourcePosition.setText(WebInspector.UIString("%d characters se lected", selectedText.length));
628 else 628 else
629 this._sourcePosition.setText(WebInspector.UIString("%d lines, %d cha racters selected", textRange.endLine - textRange.startLine + 1, selectedText.len gth)); 629 this._sourcePosition.setText(WebInspector.UIString("%d lines, %d cha racters selected", textRange.endLine - textRange.startLine + 1, selectedText.len gth));
630 }, 630 },
631 631
632 /** 632 /**
633 * @param {number} lineNumber 633 * @param {number} lineNumber
634 */ 634 */
635 scrollChanged: function(lineNumber) 635 scrollChanged: function(lineNumber)
636 { 636 {
637 this.dispatchEventToListeners(WebInspector.SourceFrame.Events.ScrollChan ged, lineNumber); 637 if (this._scrollTimer)
638 clearTimeout(this._scrollTimer);
639 this._scrollTimer = setTimeout(this.dispatchEventToListeners.bind(this, WebInspector.SourceFrame.Events.ScrollChanged, lineNumber), 100);
638 }, 640 },
639 641
640 _handleKeyDown: function(e) 642 _handleKeyDown: function(e)
641 { 643 {
642 var shortcutKey = WebInspector.KeyboardShortcut.makeKeyFromEvent(e); 644 var shortcutKey = WebInspector.KeyboardShortcut.makeKeyFromEvent(e);
643 var handler = this._shortcuts[shortcutKey]; 645 var handler = this._shortcuts[shortcutKey];
644 if (handler && handler()) 646 if (handler && handler())
645 e.consume(true); 647 e.consume(true);
646 }, 648 },
647 649
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 /** 722 /**
721 * @override 723 * @override
722 * @param {?WebInspector.TextRange} from 724 * @param {?WebInspector.TextRange} from
723 * @param {?WebInspector.TextRange} to 725 * @param {?WebInspector.TextRange} to
724 */ 726 */
725 onJumpToPosition: function(from, to) 727 onJumpToPosition: function(from, to)
726 { 728 {
727 this._sourceFrame.onJumpToPosition(from, to); 729 this._sourceFrame.onJumpToPosition(from, to);
728 } 730 }
729 } 731 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698