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

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

Issue 2734213003: [DevTools] Do not use Dialog.detach as it doesn't exist. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } 54 }
55 55
56 /** 56 /**
57 * @override 57 * @override
58 * @param {!Document|!Element=} where 58 * @param {!Document|!Element=} where
59 */ 59 */
60 show(where) { 60 show(where) {
61 var document = /** @type {!Document} */ ( 61 var document = /** @type {!Document} */ (
62 where instanceof Document ? where : (where || UI.inspectorView.element). ownerDocument); 62 where instanceof Document ? where : (where || UI.inspectorView.element). ownerDocument);
63 if (UI.Dialog._instance) 63 if (UI.Dialog._instance)
64 UI.Dialog._instance.detach(); 64 UI.Dialog._instance.hide();
65 UI.Dialog._instance = this; 65 UI.Dialog._instance = this;
66 this._disableTabIndexOnElements(document); 66 this._disableTabIndexOnElements(document);
67 super.show(document); 67 super.show(document);
68 this._focusRestorer = new UI.WidgetFocusRestorer(this.widget()); 68 this._focusRestorer = new UI.WidgetFocusRestorer(this.widget());
69 } 69 }
70 70
71 /** 71 /**
72 * @override 72 * @override
73 */ 73 */
74 hide() { 74 hide() {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 /** 110 /**
111 * @param {!Event} event 111 * @param {!Event} event
112 */ 112 */
113 _onKeyDown(event) { 113 _onKeyDown(event) {
114 if (event.keyCode === UI.KeyboardShortcut.Keys.Esc.code) { 114 if (event.keyCode === UI.KeyboardShortcut.Keys.Esc.code) {
115 event.consume(true); 115 event.consume(true);
116 this.hide(); 116 this.hide();
117 } 117 }
118 } 118 }
119 }; 119 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698