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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/SearchableView.js

Issue 2565113002: DevTools: update console viewport scroll when prompt is resized (Closed)
Patch Set: DevTools: console should update viewport when codemirror resizes Created 4 years 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) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * Copyright (C) 2011 Google Inc. All rights reserved. 5 * Copyright (C) 2011 Google Inc. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 10 *
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 var cancelButtonElement = this._firstRowElement.createChild('td').createChil d('button', 'search-action-button'); 146 var cancelButtonElement = this._firstRowElement.createChild('td').createChil d('button', 'search-action-button');
147 cancelButtonElement.textContent = Common.UIString('Cancel'); 147 cancelButtonElement.textContent = Common.UIString('Cancel');
148 cancelButtonElement.tabIndex = -1; 148 cancelButtonElement.tabIndex = -1;
149 cancelButtonElement.addEventListener('click', this.closeSearch.bind(this), f alse); 149 cancelButtonElement.addEventListener('click', this.closeSearch.bind(this), f alse);
150 this._minimalSearchQuerySize = 3; 150 this._minimalSearchQuerySize = 3;
151 151
152 this._loadSetting(); 152 this._loadSetting();
153 } 153 }
154 154
155 /** 155 /**
156 * @override
157 */
158 onLayout() {
159 this.invalidateSize();
160 }
161
162 /**
156 * @param {?Element} element 163 * @param {?Element} element
157 * @return {?UI.SearchableView} 164 * @return {?UI.SearchableView}
158 */ 165 */
159 static fromElement(element) { 166 static fromElement(element) {
160 var view = null; 167 var view = null;
161 while (element && !view) { 168 while (element && !view) {
162 view = element[UI.SearchableView._symbol]; 169 view = element[UI.SearchableView._symbol];
163 element = element.parentElementOrShadowHost(); 170 element = element.parentElementOrShadowHost();
164 } 171 }
165 return view; 172 return view;
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 // Silent catch. 618 // Silent catch.
612 } 619 }
613 620
614 // Otherwise just do a plain text search. 621 // Otherwise just do a plain text search.
615 if (!regex) 622 if (!regex)
616 regex = createPlainTextSearchRegex(query, modifiers); 623 regex = createPlainTextSearchRegex(query, modifiers);
617 624
618 return regex; 625 return regex;
619 } 626 }
620 }; 627 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698