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

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

Issue 165145: Merge 21781 - Fix issue where the width of the sections was not updated corre... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/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')
Property Changes:
Modified: svn:mergeinfo
Merged /trunk/src/chrome/browser/resources/new_new_tab.js:r21781
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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 // Recent activities 679 // Recent activities
680 680
681 function layoutLowerSections() { 681 function layoutLowerSections() {
682 // This lower sections are inline blocks so all we need to do is to set the 682 // This lower sections are inline blocks so all we need to do is to set the
683 // width and opacity. 683 // width and opacity.
684 var lowerSectionsElement = $('lower-sections'); 684 var lowerSectionsElement = $('lower-sections');
685 var recentElement = $('recent-activities'); 685 var recentElement = $('recent-activities');
686 var tipsElement = $('tips'); 686 var tipsElement = $('tips');
687 var spacer = recentElement.nextElementSibling; 687 var spacer = recentElement.nextElementSibling;
688 688
689 var totalWidth = useSmallGrid() ? 692 : 940; 689 var totalWidth = useSmallGrid() ? 692 : 920;
690 var spacing = 20; 690 var spacing = 20;
691 var rtl = document.documentElement.dir == 'rtl'; 691 var rtl = document.documentElement.dir == 'rtl';
692 692
693 var recentShown = shownSections & Section.RECENT; 693 var recentShown = shownSections & Section.RECENT;
694 var tipsShown = shownSections & Section.TIPS; 694 var tipsShown = shownSections & Section.TIPS;
695 695
696 if (recentShown || tipsShown) { 696 if (recentShown || tipsShown) {
697 lowerSectionsElement.style.height = '198px'; 697 lowerSectionsElement.style.height = '198px';
698 lowerSectionsElement.style.opacity = ''; 698 lowerSectionsElement.style.opacity = '';
699 } else { 699 } else {
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 el.addEventListener('dragover', bind(this.handleDragOver, this)); 1413 el.addEventListener('dragover', bind(this.handleDragOver, this));
1414 el.addEventListener('dragleave', bind(this.handleDragLeave, this)); 1414 el.addEventListener('dragleave', bind(this.handleDragLeave, this));
1415 el.addEventListener('drop', bind(this.handleDrop, this)); 1415 el.addEventListener('drop', bind(this.handleDrop, this));
1416 el.addEventListener('dragend', bind(this.handleDragEnd, this)); 1416 el.addEventListener('dragend', bind(this.handleDragEnd, this));
1417 el.addEventListener('drag', bind(this.handleDrag, this)); 1417 el.addEventListener('drag', bind(this.handleDrag, this));
1418 el.addEventListener('mousedown', bind(this.handleMouseDown, this)); 1418 el.addEventListener('mousedown', bind(this.handleMouseDown, this));
1419 } 1419 }
1420 }; 1420 };
1421 1421
1422 dnd.init(); 1422 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