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

Side by Side Diff: Source/devtools/front_end/ui/TextPrompt.js

Issue 1113813002: [DevTools] Rename View to Widget. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/ui/TabbedPane.js ('k') | Source/devtools/front_end/ui/Toolbar.js » ('j') | 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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 throw "Cannot attach an attached TextPrompt"; 114 throw "Cannot attach an attached TextPrompt";
115 this._element = element; 115 this._element = element;
116 116
117 this._boundOnKeyDown = this.onKeyDown.bind(this); 117 this._boundOnKeyDown = this.onKeyDown.bind(this);
118 this._boundOnInput = this.onInput.bind(this); 118 this._boundOnInput = this.onInput.bind(this);
119 this._boundOnMouseWheel = this.onMouseWheel.bind(this); 119 this._boundOnMouseWheel = this.onMouseWheel.bind(this);
120 this._boundSelectStart = this._selectStart.bind(this); 120 this._boundSelectStart = this._selectStart.bind(this);
121 this._boundRemoveSuggestionAids = this._removeSuggestionAids.bind(this); 121 this._boundRemoveSuggestionAids = this._removeSuggestionAids.bind(this);
122 this._proxyElement = element.ownerDocument.createElement("span"); 122 this._proxyElement = element.ownerDocument.createElement("span");
123 var shadowRoot = this._proxyElement.createShadowRoot(); 123 var shadowRoot = this._proxyElement.createShadowRoot();
124 shadowRoot.appendChild(WebInspector.View.createStyleElement("ui/textProm pt.css")); 124 shadowRoot.appendChild(WebInspector.Widget.createStyleElement("ui/textPr ompt.css"));
125 this._contentElement = shadowRoot.createChild("div"); 125 this._contentElement = shadowRoot.createChild("div");
126 this._contentElement.createChild("content"); 126 this._contentElement.createChild("content");
127 this._proxyElement.style.display = this._proxyElementDisplay; 127 this._proxyElement.style.display = this._proxyElementDisplay;
128 element.parentElement.insertBefore(this._proxyElement, element); 128 element.parentElement.insertBefore(this._proxyElement, element);
129 this._proxyElement.appendChild(element); 129 this._proxyElement.appendChild(element);
130 this._element.classList.add("text-prompt"); 130 this._element.classList.add("text-prompt");
131 this._element.addEventListener("keydown", this._boundOnKeyDown, false); 131 this._element.addEventListener("keydown", this._boundOnKeyDown, false);
132 this._element.addEventListener("input", this._boundOnInput, false); 132 this._element.addEventListener("input", this._boundOnInput, false);
133 this._element.addEventListener("mousewheel", this._boundOnMouseWheel, fa lse); 133 this._element.addEventListener("mousewheel", this._boundOnMouseWheel, fa lse);
134 this._element.addEventListener("selectstart", this._boundSelectStart, fa lse); 134 this._element.addEventListener("selectstart", this._boundSelectStart, fa lse);
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 915
916 return; 916 return;
917 } 917 }
918 918
919 WebInspector.TextPrompt.prototype.onKeyDown.apply(this, arguments); 919 WebInspector.TextPrompt.prototype.onKeyDown.apply(this, arguments);
920 }, 920 },
921 921
922 __proto__: WebInspector.TextPrompt.prototype 922 __proto__: WebInspector.TextPrompt.prototype
923 } 923 }
924 924
OLDNEW
« no previous file with comments | « Source/devtools/front_end/ui/TabbedPane.js ('k') | Source/devtools/front_end/ui/Toolbar.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698