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

Side by Side Diff: Source/devtools/front_end/components/InspectorView.js

Issue 342683008: [DevTools] Fix UI extreme cases: very small window and very large zoom. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
OLDNEW
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
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 };
OLDNEW
« no previous file with comments | « Source/devtools/front_end/components/InspectedPagePlaceholder.js ('k') | Source/devtools/front_end/inspector.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698