| OLD | NEW |
| 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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 }, false); | 542 }, false); |
| 543 } else { | 543 } else { |
| 544 // Something went wrong; don't make it clickable. | 544 // Something went wrong; don't make it clickable. |
| 545 root = DOM('span'); | 545 root = DOM('span'); |
| 546 } | 546 } |
| 547 | 547 |
| 548 /* Create the thumbnail */ | 548 /* Create the thumbnail */ |
| 549 var img_thumbnail = DOM('img', {className:'thumbnail'}); | 549 var img_thumbnail = DOM('img', {className:'thumbnail'}); |
| 550 img_thumbnail.setAttribute('onload', "logEvent('image loaded');"); | 550 img_thumbnail.setAttribute('onload', "logEvent('image loaded');"); |
| 551 img_thumbnail.src = 'chrome-ui://thumb/' + page.url; | 551 img_thumbnail.src = 'chrome-ui://thumb/' + page.url; |
| 552 img_thumbnail.alt = page.title; |
| 552 | 553 |
| 553 /* Create the title */ | 554 /* Create the title */ |
| 554 var div_title = DOM('div', {className:'thumbnail-title'}); | 555 var div_title = DOM('div', {className:'thumbnail-title'}); |
| 555 div_title.style.backgroundImage = | 556 div_title.style.backgroundImage = |
| 556 'url("chrome-ui://favicon/' + page.url + '")'; | 557 'url("chrome-ui://favicon/' + page.url + '")'; |
| 557 /* Set the title's directionality independently of the overall page | 558 /* Set the title's directionality independently of the overall page |
| 558 directionality. We need to do this since a purely LTR title should always | 559 directionality. We need to do this since a purely LTR title should always |
| 559 have it's direction set as ltr. We only set the title direction to rtl if | 560 have it's direction set as ltr. We only set the title direction to rtl if |
| 560 it contains a strong RTL character. Please refer to http://crbug.com/5926 | 561 it contains a strong RTL character. Please refer to http://crbug.com/5926 |
| 561 for more information. | 562 for more information. |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 processData(); | 929 processData(); |
| 929 | 930 |
| 930 // In case renderMostVisitedItems doesn't come back quickly enough, begin | 931 // In case renderMostVisitedItems doesn't come back quickly enough, begin |
| 931 // the first-run fade-in. If it has started or if this is not a first | 932 // the first-run fade-in. If it has started or if this is not a first |
| 932 // run new tab, this will be a no-op. | 933 // run new tab, this will be a no-op. |
| 933 setTimeout(function(){document.getElementById('main').className = 'visible'}, | 934 setTimeout(function(){document.getElementById('main').className = 'visible'}, |
| 934 1000); | 935 1000); |
| 935 </script> | 936 </script> |
| 936 </body> | 937 </body> |
| 937 </html> | 938 </html> |
| OLD | NEW |