OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 // If we didn't have enough space at the start, we may have wrong scroll
offsets. | 534 // If we didn't have enough space at the start, we may have wrong scroll
offsets. |
535 if (document.body.scrollTop !== 0) | 535 if (document.body.scrollTop !== 0) |
536 document.body.scrollTop = 0; | 536 document.body.scrollTop = 0; |
537 if (document.body.scrollLeft !== 0) | 537 if (document.body.scrollLeft !== 0) |
538 document.body.scrollLeft = 0; | 538 document.body.scrollLeft = 0; |
539 }, | 539 }, |
540 | 540 |
541 doResize: function() | 541 doResize: function() |
542 { | 542 { |
543 var size = this.constraints().minimum; | 543 var size = this.constraints().minimum; |
544 var right = Math.min(0, window.innerWidth - size.width); | 544 var zoom = WebInspector.zoomManager.zoomFactor(); |
| 545 var right = Math.min(0, window.innerWidth - size.width / zoom); |
545 this.element.style.right = right + "px"; | 546 this.element.style.right = right + "px"; |
546 var bottom = Math.min(0, window.innerHeight - size.height); | 547 var bottom = Math.min(0, window.innerHeight - size.height / zoom); |
547 this.element.style.bottom = bottom + "px"; | 548 this.element.style.bottom = bottom + "px"; |
548 | 549 |
549 if (window.innerWidth < size.width || window.innerHeight < size.height) | 550 if (window.innerWidth < size.width || window.innerHeight < size.height) |
550 window.addEventListener("scroll", this._onScrollBound, false); | 551 window.addEventListener("scroll", this._onScrollBound, false); |
551 else | 552 else |
552 window.removeEventListener("scroll", this._onScrollBound, false); | 553 window.removeEventListener("scroll", this._onScrollBound, false); |
553 | 554 |
554 WebInspector.VBox.prototype.doResize.call(this); | 555 WebInspector.VBox.prototype.doResize.call(this); |
555 this._onScroll(); | 556 this._onScroll(); |
556 }, | 557 }, |
557 | 558 |
558 __proto__: WebInspector.VBox.prototype | 559 __proto__: WebInspector.VBox.prototype |
559 }; | 560 }; |
OLD | NEW |