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

Side by Side Diff: Source/devtools/front_end/StatusBarButton.js

Issue 71633003: DevTools: added "overlayContents" mode, where DevTools content is placed around and underneath inse… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 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
« no previous file with comments | « Source/devtools/front_end/SourcesPanel.js ('k') | Source/devtools/front_end/externs.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) 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
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
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 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/SourcesPanel.js ('k') | Source/devtools/front_end/externs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698