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

Side by Side Diff: chrome/browser/resources/new_tab.html

Issue 112025: revert 12598 now that text-overflow:ellipsis has been fixed in WebKit. (Closed)
Patch Set: Created 11 years, 7 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
« 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 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html id="t" jsvalues="dir:textdirection;firstview:firstview"> 2 <html id="t" jsvalues="dir:textdirection;firstview:firstview">
3 <!-- 3 <!--
4 This page is optimized for perceived performance. Our enemies are the time 4 This page is optimized for perceived performance. Our enemies are the time
5 taken for the backend to generate our data, and the time taken to parse 5 taken for the backend to generate our data, and the time taken to parse
6 and render the starting HTML/CSS content of the page. This page is 6 and render the starting HTML/CSS content of the page. This page is
7 designed to let Chrome do both of those things in parallel. 7 designed to let Chrome do both of those things in parallel.
8 8
9 1. Defines temporary content callback functions 9 1. Defines temporary content callback functions
10 2. Fires off requests for content (these can come back 20-150ms later) 10 2. Fires off requests for content (these can come back 20-150ms later)
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 var div_title = DOM('div', {className:'thumbnail-title disabled-on-edit'}); 539 var div_title = DOM('div', {className:'thumbnail-title disabled-on-edit'});
540 div_title.style.backgroundImage = 540 div_title.style.backgroundImage =
541 'url("chrome://favicon/' + page.url + '")'; 541 'url("chrome://favicon/' + page.url + '")';
542 /* Set the title's directionality independently of the overall page 542 /* Set the title's directionality independently of the overall page
543 directionality. We need to do this since a purely LTR title should always 543 directionality. We need to do this since a purely LTR title should always
544 have it's direction set as ltr. We only set the title direction to rtl if 544 have it's direction set as ltr. We only set the title direction to rtl if
545 it contains a strong RTL character. Please refer to http://crbug.com/5926 545 it contains a strong RTL character. Please refer to http://crbug.com/5926
546 for more information. 546 for more information.
547 */ 547 */
548 div_title.style.direction = page.direction; 548 div_title.style.direction = page.direction;
549 /* The following if statement is a temporary workaround for
550 http://crbug.com/7252 and http://crbug.com/7697. It should be removed
551 before closing these bugs.
552 */
553 if (page.direction == 'rtl') {
554 div_title.style.textOverflow = 'clip';
555 }
556 if (page.title) { 549 if (page.title) {
557 div_title.appendChild(document.createTextNode(page.title)); 550 div_title.appendChild(document.createTextNode(page.title));
558 } else { 551 } else {
559 // Make the empty title at least push down the icon. 552 // Make the empty title at least push down the icon.
560 div_title.innerHTML = '&nbsp;'; 553 div_title.innerHTML = '&nbsp;';
561 } 554 }
562 555
563 root.appendChild(div_title); 556 root.appendChild(div_title);
564 root.appendChild(img_thumbnail); 557 root.appendChild(img_thumbnail);
565 558
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 title:entry.title}); 693 title:entry.title});
701 link.addEventListener("mousedown", function(event) { 694 link.addEventListener("mousedown", function(event) {
702 chrome.send("metrics", ["NTP_Bookmark" + i]) 695 chrome.send("metrics", ["NTP_Bookmark" + i])
703 }, false); 696 }, false);
704 link.style.backgroundImage = 697 link.style.backgroundImage =
705 'url("chrome://favicon/' + entry.url + '")'; 698 'url("chrome://favicon/' + entry.url + '")';
706 /* Set the bookmark title's directionality independently of the page, see 699 /* Set the bookmark title's directionality independently of the page, see
707 comment about setting div_title.style.direction above for details. 700 comment about setting div_title.style.direction above for details.
708 */ 701 */
709 link.style.direction = entry.direction; 702 link.style.direction = entry.direction;
710 /* The following if statement is a temporary workaround for
711 http://crbug.com/7252 and http://crbug.com/7697. It should be removed
712 before closing these bugs.
713 */
714 if (entry.direction == 'rtl') {
715 link.style.textOverflow = 'clip';
716 }
717 link.appendChild(document.createTextNode(entry.title)); 703 link.appendChild(document.createTextNode(entry.title));
718 container.appendChild(link); 704 container.appendChild(link);
719 } 705 }
720 } 706 }
721 707
722 logEvent('renderRecentlyBookmarked done'); 708 logEvent('renderRecentlyBookmarked done');
723 } 709 }
724 710
725 /* This function adds incoming information about tabs to the new tab UI. */ 711 /* This function adds incoming information about tabs to the new tab UI. */
726 function renderRecentlyClosedTabs(entries) { 712 function renderRecentlyClosedTabs(entries) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 */ 799 */
814 function createRecentBookmark(tagName, data) { 800 function createRecentBookmark(tagName, data) {
815 var link = DOM(tagName, {className:'recent-bookmark', title:data.title}); 801 var link = DOM(tagName, {className:'recent-bookmark', title:data.title});
816 if (tagName == 'a') 802 if (tagName == 'a')
817 link.href = data.url; 803 link.href = data.url;
818 link.style.backgroundImage = 'url("chrome://favicon/' + data.url + '")'; 804 link.style.backgroundImage = 'url("chrome://favicon/' + data.url + '")';
819 /* Set the title's directionality independently of the page, see comment 805 /* Set the title's directionality independently of the page, see comment
820 about setting div_title.style.direction above for details. 806 about setting div_title.style.direction above for details.
821 */ 807 */
822 link.style.direction = data.direction; 808 link.style.direction = data.direction;
823 /* The following if statement is a temporary workaround for
824 http://crbug.com/7252 and http://crbug.com/7697. It should be removed
825 before closing these bugs.
826 */
827 if (data.direction == 'rtl') {
828 link.style.textOverflow = 'clip';
829 }
830
831 link.appendChild(document.createTextNode(data.title)); 809 link.appendChild(document.createTextNode(data.title));
832 return link; 810 return link;
833 } 811 }
834 812
835 /** 813 /**
836 * A hover card for windows in the recently closed list to show more details. 814 * A hover card for windows in the recently closed list to show more details.
837 * 815 *
838 * @param {Node} target The element the hover card is for. 816 * @param {Node} target The element the hover card is for.
839 * @param {Object} data Object containing all the data for the card. 817 * @param {Object} data Object containing all the data for the card.
840 */ 818 */
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 background: url('../../app/theme/closed_window.png'); 991 background: url('../../app/theme/closed_window.png');
1014 background-repeat: no-repeat; 992 background-repeat: no-repeat;
1015 } 993 }
1016 html[dir='rtl'] .recent-window-container { 994 html[dir='rtl'] .recent-window-container {
1017 background-position: right; 995 background-position: right;
1018 padding-right: 22px; 996 padding-right: 22px;
1019 } 997 }
1020 </style> 998 </style>
1021 999
1022 </html> 1000 </html>
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