| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Dependencies that we should remove/formalize: | 5 // Dependencies that we should remove/formalize: |
| 6 // ../shared/js/class_list.js | 6 // ../shared/js/class_list.js |
| 7 // util.js | 7 // util.js |
| 8 // | 8 // |
| 9 // afterTransition | 9 // afterTransition |
| 10 // chrome.send | 10 // chrome.send |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 a.textContent = item.title; | 572 a.textContent = item.title; |
| 573 a.style.backgroundImage = url('chrome://favicon/' + item.url); | 573 a.style.backgroundImage = url('chrome://favicon/' + item.url); |
| 574 a.className = 'item'; | 574 a.className = 'item'; |
| 575 this.miniview.appendChild(span); | 575 this.miniview.appendChild(span); |
| 576 | 576 |
| 577 if ((a.offsetLeft + a.offsetWidth) > this.miniview.offsetWidth) { | 577 if ((a.offsetLeft + a.offsetWidth) > this.miniview.offsetWidth) { |
| 578 this.miniview.removeChild(span); | 578 this.miniview.removeChild(span); |
| 579 return; | 579 return; |
| 580 } | 580 } |
| 581 } | 581 } |
| 582 updateMiniviewClipping(this.miniview); |
| 582 }, | 583 }, |
| 583 | 584 |
| 584 handleClick_: function(e) { | 585 handleClick_: function(e) { |
| 585 var target = e.target; | 586 var target = e.target; |
| 586 if (target.classList.contains('pin')) { | 587 if (target.classList.contains('pin')) { |
| 587 this.togglePinned_(getItem(target)); | 588 this.togglePinned_(getItem(target)); |
| 588 e.preventDefault(); | 589 e.preventDefault(); |
| 589 } else if (target.classList.contains('remove')) { | 590 } else if (target.classList.contains('remove')) { |
| 590 this.blacklist(getItem(target)); | 591 this.blacklist(getItem(target)); |
| 591 e.preventDefault(); | 592 e.preventDefault(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 606 handleKeyDown_: function(e) { | 607 handleKeyDown_: function(e) { |
| 607 if (!IS_MAC && e.keyCode == 46 || // Del | 608 if (!IS_MAC && e.keyCode == 46 || // Del |
| 608 IS_MAC && e.metaKey && e.keyCode == 8) { // Cmd + Backspace | 609 IS_MAC && e.metaKey && e.keyCode == 8) { // Cmd + Backspace |
| 609 this.blacklist(e.target); | 610 this.blacklist(e.target); |
| 610 } | 611 } |
| 611 } | 612 } |
| 612 }; | 613 }; |
| 613 | 614 |
| 614 return MostVisited; | 615 return MostVisited; |
| 615 })(); | 616 })(); |
| OLD | NEW |