OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 | 404 |
405 /** | 405 /** |
406 * @constructor | 406 * @constructor |
407 * // FIXME: make SuggestBox work for multiple documents. | 407 * // FIXME: make SuggestBox work for multiple documents. |
408 * @suppressGlobalPropertiesCheck | 408 * @suppressGlobalPropertiesCheck |
409 */ | 409 */ |
410 WebInspector.SuggestBox.Overlay = function() | 410 WebInspector.SuggestBox.Overlay = function() |
411 { | 411 { |
412 this.element = createElementWithClass("div", "suggest-box-overlay"); | 412 this.element = createElementWithClass("div", "suggest-box-overlay"); |
413 var root = this.element.createShadowRoot(); | 413 var root = this.element.createShadowRoot(); |
414 root.appendChild(WebInspector.View.createStyleElement("ui/suggestBox.css")); | 414 root.appendChild(WebInspector.Widget.createStyleElement("ui/suggestBox.css")
); |
415 this._leftSpacerElement = root.createChild("div", "suggest-box-left-spacer")
; | 415 this._leftSpacerElement = root.createChild("div", "suggest-box-left-spacer")
; |
416 this._horizontalElement = root.createChild("div", "suggest-box-horizontal"); | 416 this._horizontalElement = root.createChild("div", "suggest-box-horizontal"); |
417 this._topSpacerElement = this._horizontalElement.createChild("div", "suggest
-box-top-spacer"); | 417 this._topSpacerElement = this._horizontalElement.createChild("div", "suggest
-box-top-spacer"); |
418 this._bottomSpacerElement = this._horizontalElement.createChild("div", "sugg
est-box-bottom-spacer"); | 418 this._bottomSpacerElement = this._horizontalElement.createChild("div", "sugg
est-box-bottom-spacer"); |
419 this._resize(); | 419 this._resize(); |
420 document.body.appendChild(this.element); | 420 document.body.appendChild(this.element); |
421 } | 421 } |
422 | 422 |
423 WebInspector.SuggestBox.Overlay.prototype = { | 423 WebInspector.SuggestBox.Overlay.prototype = { |
424 /** | 424 /** |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 this.element.style.top = containerBox.y + "px"; | 463 this.element.style.top = containerBox.y + "px"; |
464 this.element.style.height = containerBox.height + "px"; | 464 this.element.style.height = containerBox.height + "px"; |
465 this.element.style.width = containerBox.width + "px"; | 465 this.element.style.width = containerBox.width + "px"; |
466 }, | 466 }, |
467 | 467 |
468 dispose: function() | 468 dispose: function() |
469 { | 469 { |
470 this.element.remove(); | 470 this.element.remove(); |
471 } | 471 } |
472 } | 472 } |
OLD | NEW |