| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 | 314 |
| 315 var mouseUpListener = mouseUp.bind(this); | 315 var mouseUpListener = mouseUp.bind(this); |
| 316 document.documentElement.addEventListener("mouseup", mouseUpListener, fa
lse); | 316 document.documentElement.addEventListener("mouseup", mouseUpListener, fa
lse); |
| 317 | 317 |
| 318 var optionsGlassPane = new WebInspector.GlassPane(); | 318 var optionsGlassPane = new WebInspector.GlassPane(); |
| 319 var optionsBarElement = optionsGlassPane.element.createChild("div", "alt
ernate-status-bar-buttons-bar"); | 319 var optionsBarElement = optionsGlassPane.element.createChild("div", "alt
ernate-status-bar-buttons-bar"); |
| 320 const buttonHeight = 23; | 320 const buttonHeight = 23; |
| 321 | 321 |
| 322 var hostButtonPosition = this.element.totalOffset(); | 322 var hostButtonPosition = this.element.totalOffset(); |
| 323 | 323 |
| 324 var topNotBottom = hostButtonPosition.top < document.documentElement.off
setHeight / 2; | 324 var topNotBottom = hostButtonPosition.top + buttonHeight * buttons.lengt
h < document.documentElement.offsetHeight; |
| 325 | 325 |
| 326 if (topNotBottom) | 326 if (topNotBottom) |
| 327 buttons = buttons.reverse(); | 327 buttons = buttons.reverse(); |
| 328 | 328 |
| 329 optionsBarElement.style.height = (buttonHeight * buttons.length) + "px"; | 329 optionsBarElement.style.height = (buttonHeight * buttons.length) + "px"; |
| 330 if (topNotBottom) | 330 if (topNotBottom) |
| 331 optionsBarElement.style.top = (hostButtonPosition.top + 1) + "px"; | 331 optionsBarElement.style.top = (hostButtonPosition.top + 1) + "px"; |
| 332 else | 332 else |
| 333 optionsBarElement.style.top = (hostButtonPosition.top - (buttonHeigh
t * (buttons.length - 1))) + "px"; | 333 optionsBarElement.style.top = (hostButtonPosition.top - (buttonHeigh
t * (buttons.length - 1))) + "px"; |
| 334 optionsBarElement.style.left = (hostButtonPosition.left + 1) + "px"; | 334 optionsBarElement.style.left = (hostButtonPosition.left + 1) + "px"; |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 /** | 516 /** |
| 517 * @return {boolean} | 517 * @return {boolean} |
| 518 */ | 518 */ |
| 519 checked: function() | 519 checked: function() |
| 520 { | 520 { |
| 521 return this._checkbox.checked; | 521 return this._checkbox.checked; |
| 522 }, | 522 }, |
| 523 | 523 |
| 524 __proto__: WebInspector.StatusBarItem.prototype | 524 __proto__: WebInspector.StatusBarItem.prototype |
| 525 } | 525 } |
| OLD | NEW |