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

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

Issue 165147: Merge 22320 - Fix issue where the favicon was not shown on the NNTP... (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:r22320
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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // There was some concern that a malformed malicious URL could cause an XSS 249 // There was some concern that a malformed malicious URL could cause an XSS
250 // attack but setting style.backgroundImage = 'url(javascript:...)' does 250 // attack but setting style.backgroundImage = 'url(javascript:...)' does
251 // not execute the JavaScript in WebKit. 251 // not execute the JavaScript in WebKit.
252 252
253 var thumbnailUrl = d.thumbnailUrl || 'chrome://thumb/' + d.url; 253 var thumbnailUrl = d.thumbnailUrl || 'chrome://thumb/' + d.url;
254 t.querySelector('.thumbnail-wrapper').style.backgroundImage = 254 t.querySelector('.thumbnail-wrapper').style.backgroundImage =
255 url(thumbnailUrl); 255 url(thumbnailUrl);
256 var titleDiv = t.querySelector('.title > div'); 256 var titleDiv = t.querySelector('.title > div');
257 titleDiv.xtitle = titleDiv.textContent = d.title; 257 titleDiv.xtitle = titleDiv.textContent = d.title;
258 var faviconUrl = d.faviconUrl || 'chrome://favicon/' + d.url; 258 var faviconUrl = d.faviconUrl || 'chrome://favicon/' + d.url;
259 titleDiv.style.backgroundImage = encodeURI(url); 259 titleDiv.style.backgroundImage = url(faviconUrl);
260 titleDiv.dir = d.direction; 260 titleDiv.dir = d.direction;
261 } 261 }
262 } 262 }
263 263
264 /** 264 /**
265 * Calls chrome.send with a callback and restores the original afterwards. 265 * Calls chrome.send with a callback and restores the original afterwards.
266 */ 266 */
267 function chromeSend(name, params, callbackName, callback) { 267 function chromeSend(name, params, callbackName, callback) {
268 var old = global[callbackName]; 268 var old = global[callbackName];
269 global[callbackName] = function() { 269 global[callbackName] = function() {
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1427 el.addEventListener('dragover', bind(this.handleDragOver, this)); 1427 el.addEventListener('dragover', bind(this.handleDragOver, this));
1428 el.addEventListener('dragleave', bind(this.handleDragLeave, this)); 1428 el.addEventListener('dragleave', bind(this.handleDragLeave, this));
1429 el.addEventListener('drop', bind(this.handleDrop, this)); 1429 el.addEventListener('drop', bind(this.handleDrop, this));
1430 el.addEventListener('dragend', bind(this.handleDragEnd, this)); 1430 el.addEventListener('dragend', bind(this.handleDragEnd, this));
1431 el.addEventListener('drag', bind(this.handleDrag, this)); 1431 el.addEventListener('drag', bind(this.handleDrag, this));
1432 el.addEventListener('mousedown', bind(this.handleMouseDown, this)); 1432 el.addEventListener('mousedown', bind(this.handleMouseDown, this));
1433 } 1433 }
1434 }; 1434 };
1435 1435
1436 dnd.init(); 1436 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