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

Side by Side Diff: chrome/browser/resources/new_new_tab.js

Issue 159466: Fix issue where the width of the sections was not updated correctly.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 4 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
« no previous file with comments | « no previous file | no next file » | 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 // Helpers 2 // Helpers
3 3
4 function $(id) { 4 function $(id) {
5 return document.getElementById(id); 5 return document.getElementById(id);
6 } 6 }
7 7
8 // TODO(arv): Remove these when classList is available in HTML5. 8 // TODO(arv): Remove these when classList is available in HTML5.
9 // https://bugs.webkit.org/show_bug.cgi?id=20709 9 // https://bugs.webkit.org/show_bug.cgi?id=20709
10 function hasClass(el, name) { 10 function hasClass(el, name) {
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 // Recent activities 673 // Recent activities
674 674
675 function layoutLowerSections() { 675 function layoutLowerSections() {
676 // This lower sections are inline blocks so all we need to do is to set the 676 // This lower sections are inline blocks so all we need to do is to set the
677 // width and opacity. 677 // width and opacity.
678 var lowerSectionsElement = $('lower-sections'); 678 var lowerSectionsElement = $('lower-sections');
679 var recentElement = $('recent-activities'); 679 var recentElement = $('recent-activities');
680 var tipsElement = $('tips'); 680 var tipsElement = $('tips');
681 var spacer = recentElement.nextElementSibling; 681 var spacer = recentElement.nextElementSibling;
682 682
683 var totalWidth = useSmallGrid() ? 692 : 940; 683 var totalWidth = useSmallGrid() ? 692 : 920;
684 var spacing = 20; 684 var spacing = 20;
685 var rtl = document.documentElement.dir == 'rtl'; 685 var rtl = document.documentElement.dir == 'rtl';
686 686
687 var recentShown = shownSections & Section.RECENT; 687 var recentShown = shownSections & Section.RECENT;
688 var tipsShown = shownSections & Section.TIPS; 688 var tipsShown = shownSections & Section.TIPS;
689 689
690 if (recentShown || tipsShown) { 690 if (recentShown || tipsShown) {
691 lowerSectionsElement.style.height = '198px'; 691 lowerSectionsElement.style.height = '198px';
692 lowerSectionsElement.style.opacity = ''; 692 lowerSectionsElement.style.opacity = '';
693 } else { 693 } else {
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
1402 el.addEventListener('dragover', bind(this.handleDragOver, this)); 1402 el.addEventListener('dragover', bind(this.handleDragOver, this));
1403 el.addEventListener('dragleave', bind(this.handleDragLeave, this)); 1403 el.addEventListener('dragleave', bind(this.handleDragLeave, this));
1404 el.addEventListener('drop', bind(this.handleDrop, this)); 1404 el.addEventListener('drop', bind(this.handleDrop, this));
1405 el.addEventListener('dragend', bind(this.handleDragEnd, this)); 1405 el.addEventListener('dragend', bind(this.handleDragEnd, this));
1406 el.addEventListener('drag', bind(this.handleDrag, this)); 1406 el.addEventListener('drag', bind(this.handleDrag, this));
1407 el.addEventListener('mousedown', bind(this.handleMouseDown, this)); 1407 el.addEventListener('mousedown', bind(this.handleMouseDown, this));
1408 } 1408 }
1409 }; 1409 };
1410 1410
1411 dnd.init(); 1411 dnd.init();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698