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

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

Issue 2565113002: DevTools: update console viewport scroll when prompt is resized (Closed)
Patch Set: yay Created 3 years, 9 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
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 this._textEditor = new SourceFrame.SourcesTextEditor(this); 47 this._textEditor = new SourceFrame.SourcesTextEditor(this);
48 48
49 this._currentSearchResultIndex = -1; 49 this._currentSearchResultIndex = -1;
50 this._searchResults = []; 50 this._searchResults = [];
51 51
52 this._textEditor.addEventListener( 52 this._textEditor.addEventListener(
53 SourceFrame.SourcesTextEditor.Events.EditorFocused, this._resetCurrentSe archResultIndex, this); 53 SourceFrame.SourcesTextEditor.Events.EditorFocused, this._resetCurrentSe archResultIndex, this);
54 this._textEditor.addEventListener( 54 this._textEditor.addEventListener(
55 SourceFrame.SourcesTextEditor.Events.SelectionChanged, this._updateSourc ePosition, this); 55 SourceFrame.SourcesTextEditor.Events.SelectionChanged, this._updateSourc ePosition, this);
56 this._textEditor.addEventListener( 56 this._textEditor.on(UI.TextEditor.TextChangedEvent, event => this.onTextChan ged(event.oldRange, event.newRange));
pfeldman 2017/03/24 22:28:33 So I encapsulate this._textEditor, I call editRang
luoe 2017/03/28 17:40:41 We want to redo the search highlight when text cha
57 SourceFrame.SourcesTextEditor.Events.TextChanged,
58 event => this.onTextChanged(event.data.oldRange, event.data.newRange));
59 57
60 this._shortcuts = {}; 58 this._shortcuts = {};
61 this.element.addEventListener('keydown', this._handleKeyDown.bind(this), fal se); 59 this.element.addEventListener('keydown', this._handleKeyDown.bind(this), fal se);
62 60
63 this._sourcePosition = new UI.ToolbarText(); 61 this._sourcePosition = new UI.ToolbarText();
64 62
65 /** 63 /**
66 * @type {?UI.SearchableView} 64 * @type {?UI.SearchableView}
67 */ 65 */
68 this._searchableView = null; 66 this._searchableView = null;
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 } 574 }
577 } 575 }
578 576
579 _handleKeyDown(e) { 577 _handleKeyDown(e) {
580 var shortcutKey = UI.KeyboardShortcut.makeKeyFromEvent(e); 578 var shortcutKey = UI.KeyboardShortcut.makeKeyFromEvent(e);
581 var handler = this._shortcuts[shortcutKey]; 579 var handler = this._shortcuts[shortcutKey];
582 if (handler && handler()) 580 if (handler && handler())
583 e.consume(true); 581 e.consume(true);
584 } 582 }
585 }; 583 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698